[jetty-dev] war deploys every time i start the jetty server

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[jetty-dev] war deploys every time i start the jetty server

Bogdan
Hello,

I am trying to develop an application and using embedded jetty. And also have a war file with some servlets inside it. I want to keep them separate but also to run in the same container. I managed to add and deploy the war but it will be deployed inside the tmp folder every time with a different name from the folder containing the webbapp. My actual problem is that every time i close the server it will delete the previously deployed files leaving me with an almost empty folder (the lib folder will still be there with all the libs inside it) and when i start the server again it will redeploy my war file again in the temp folder. Is there some parameter to stop the deployment if the war is already in the temp folder?

I googled for some time now and i came accros this WebAppContext.setPersistTempDirectory(true) but, I use an in house Injection container that starts the jetty server and my application i cannot add or modify things inside it. Is there any configuration parameter which will have the same functionality so i won't have to do it programmatically?

Thank you and if you need any additional information you can just reply to this e-mail.

Have a great day,
Bogdan

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] war deploys every time i start the jetty server

Jan Bartel
Bogdan,

The only way to get the directory persisted is to call that setter on the WebAppContext. You will also need to set the name of the temp directory so that we don't create a fresh temp dir each time. Have you seen the info page: https://www.eclipse.org/jetty/documentation/9.4.x/ref-temporary-directories.html

Jan

On 3 May 2017 at 17:09, Bogdan <[hidden email]> wrote:
Hello,

I am trying to develop an application and using embedded jetty. And also have a war file with some servlets inside it. I want to keep them separate but also to run in the same container. I managed to add and deploy the war but it will be deployed inside the tmp folder every time with a different name from the folder containing the webbapp. My actual problem is that every time i close the server it will delete the previously deployed files leaving me with an almost empty folder (the lib folder will still be there with all the libs inside it) and when i start the server again it will redeploy my war file again in the temp folder. Is there some parameter to stop the deployment if the war is already in the temp folder?

I googled for some time now and i came accros this WebAppContext.setPersistTempDirectory(true) but, I use an in house Injection container that starts the jetty server and my application i cannot add or modify things inside it. Is there any configuration parameter which will have the same functionality so i won't have to do it programmatically?

Thank you and if you need any additional information you can just reply to this e-mail.

Have a great day,
Bogdan

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev