Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] web app deployment

James,

Do you have any kind of logging enabled on your server? Even with the basic console-capture module, you can see contexts start and stop.

Using the demo base as an example, I removed the context xml file for our JAAS Test webapp. Console output/log is as follows:

2019-10-22 13:58:48.878:INFO:oejsh.ContextHandler:Scanner-0: Stopped o.e.j.w.WebAppContext@48c76607{JAAS Test,/test-jaas,null,UNAVAILABLE}{PATH\TO\JETTY\jetty-distribution-9.4.22.v20191022\demo-base\webapps/test-jaas.war}

By contrast, replacing the context XML re-deploys the webapp. Console output/log is as follows:

2019-10-22 14:04:08.260:WARN::Scanner-0: test-jaas webapp is deployed. DO NOT USE IN PRODUCTION!
2019-10-22 14:04:08.280:INFO:oejsh.ContextHandler:Scanner-0: Started o.e.j.w.WebAppContext@168b947{JAAS Test,/test-jaas,file:///C:/Users/cleve/AppData/Local/Temp/jetty-0_0_0_0-8080-test-jaas_war-_test-jaas-any-10326669567532780878.dir/webapp/,AVAILABLE}{PATH\TO\JETTY\jetty-distribution-9.4.22.v20191022\demo-base\webapps/test-jaas.war}

If you have logging set up you should easily be able to capture this and do what you want with the info. If there are any errors/warnings you will see them in the log when trying to deploy/remove the context in question.

As for a console command, there isn't one really. Editing the Context XML or the WAR will automatically reload the context and will be accompanied by log information. You can find more about Hot Deployment like this in the documentation.

https://www.eclipse.org/jetty/documentation/current/hot-deployment.html

Best,
Chris

On Tue, Oct 22, 2019 at 9:32 AM James Sanderson <James.Sanderson@xxxxxxxxxx> wrote:

My first post – please be gentle!

 

We’ve been using jetty for some time (currently 9.4.19), not embedded we start up the server and use xml deployment files to deploy and undeploy our web applications.

 

One puzzling question I have is how can I find out when the deployment or un-deployment has completed and whether it was successful or not; clearly we could ping a status url in the app to see if its alive or not – but this seems a bit on the clunky side.

 

Ideally I would love a command line to deploy / undeploy a war from a running jetty but I cant seem to find how to do that.

 

Any pointers would be appreciated.

 

thanks

James

 



Zellis is the trading name for Zellis Holdings Ltd and its associated companies “Zellis”.

The contents of this email are confidential to Zellis and are solely for the use of the intended recipient. If you received this email in error, please inform the sender immediately and delete the email from your system. Unless Zellis have given you express permission to do so, please do not disclose, distribute or copy the contents of this email.

Unless this email expressly states that it is a contractual offer or acceptance, it is not sent with the intention of creating a legal relationship and does not constitute an offer or acceptance which could give rise to a contract.

Any views expressed in this email are those of the individual sender unless the email specifically states them to be the views of Zellis.

Zellis Holdings Ltd - registered in England and Wales - Company No: 10975623 - Registered Office: Peoplebuilding 2, Peoplebuilding Estate, Maylands Avenue, Hemel Hempstead, Hertfordshire, HP2 4NW, UK.
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users

Back to the top