• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Able to see servletConfig init parameter changed value without restarting sever

 
Veena Pointi
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am able to see servletConfig init parameter changed value without restarting sever.I meant if I change value for servlertConfig init param in DD,I am able to see changed value in browser just by refreshing the page .But in HFSJ it says we have to redeploy the servlet which I think will happen when we restart the server. Am I missing something ? Can anyone please explain about this confusion?

Thanks
Veena
 
Mateus Lucio
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there!

Init parameters are set only once ... when the context/servlet is been initialized, but tomcat default configuration when you plug it in eclipse is to redeploy your app once it realizes something has been changed, if you're using eclipse and tomcat to study like I am everytime you save a file (servlet, jsp, web.xml or whatever) your app is automatically redeployed.

I believe that is what is happening!


[]s

 
Chinmaya Chowdary
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Veena. I think, what HFSJ says is according to Servlet or JSP specifications. But the behavior is not guarenteed. It depends on the implementors. The page directive's <%@ include file="Header.html" %> actually it is a static one. If any changes made in the file(Header.html), the Tomcat detects that, and reflects that change. But this behavior is not guranteed.
Thankyou.
 
Veena Pointi
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for replying.I am using ultra edit to edit xml file.I run tomcat separately using startup batch file.If it is not guaranteed what we should answer if asked in exam?I think we need to answer that app has to be redeployed in order to see changed value of init parameter.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think we need to answer that app has to be redeployed in order to see changed value of init parameter.

Yes. Autodetection of changes and autodeployment is container specific.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic