This week's giveaway is in the JDBC forum.
We're giving away four copies of Java Database Connections & Transactions (e-book only) and have Marco Behler on-line!
See this thread for details.
Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

changes to web.xml requires application restart?  RSS feed

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I was just testing if changes to web.xml file requires a restart of the web application to reflect the changes...for that I just created a jsp page and tried to give it a display name as below



i could see that serverpage.jsp opens well with this URL http://localhost:8080/MyWebApp/displayname. Now if I change the displayname to some other name and save the web.xml file, the new name became the display name for that jsp without any need of restarting my web application. I heard that such changes to web.xml actually will need to require a web application restart for the changes to reflect. If that is the case I have no clue how this worked without restarting the web app.

Otherwise, in case that.. changes to only some specific elements of the web.xml file requires the application restart..can you please list them out.

Thanks
Raghav
 
Sheriff
Posts: 67260
170
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If configured to do so, Tomcat will automatically restart web apps if it detects changes.
 
Raghavender Ammagari
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey thanks for the reply, can you please elaborate your answer and help me out in knowing about those configuration settings in tomcat..and is that applicable only to web.xml file or any other configuration file that I use and is specific to my web app?

 
Bear Bibeault
Sheriff
Posts: 67260
170
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't remember off the top of my head. Look in the docs.

I seem to remember a reloadable attribute on <Context>.
 
Raghavender Ammagari
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I could see a Watchedresource tag in context.xml file

is this the same that you said in your reply ?? If yes, can i add few more .properties files along withe the web.xml file... to these watched resource tags??

 
Ranch Hand
Posts: 448
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This behaviour of automating the restart is known as Hot Deploy...
 
Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!