bash - how can I check if portlet is deployed or active? -


in job have portal (liferay customized) our own portlets, works deployment of them take long(30-40 minutes), 1 of goals know when every single portlet up, tipically user have go portlet view , check if portlet available, considered unpractically.

i'm making bash script, executes http requests through curl views of every portlet, not working in way wanted, because when portlet not deployed, resource marked available, have suggestion or issue?, i'll attach piece of code below

#!/bin/bash  portlet='web/view/your_first_portlet web/view/your_second_portlet'; in $portlet;do    if [ -z "$(curl -v --silent http://portal/$i 2>&1 | grep "the requested resource not found.")" ]          echo "$i ready"     else       echo "$i not ready"     fi done 

when curl command runs , search ocurrence of string "the requested resource not found." because discovered when resource not available, in catalina ouput(tomcat) throws null, http request shows message inside code returned, portlet not deployed , script says otherwise.

if deployment of single webapp (with portlet) takes 30-40 minutes, i'd start working on that aspect, rather on workaround waiting more patiently.

that being said, instead of accessing full page happens have portlet deployed, how implement serveresource method in portlets, obtain resourceurl each portlet you're interested in , access url. resource request handled if portlet deployed. way evaluating http error code should trick.

but first , foremost: find out takes long , shorten it.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -