This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes Servlets and the fly likes servlet program always show same result after modifing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet program always show same result after modifing" Watch "servlet program always show same result after modifing" New topic
Author

servlet program always show same result after modifing

nikhil agrawal
Greenhorn

Joined: Apr 04, 2010
Posts: 3
when I edit my servlet program after 1st run, code result can't show edit result but show result of previous code,which is code widout modification. Why I can't see result of modified code
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

What servlet container are you using?

Servlets get loaded once, either at startup or the first time they are hit (depending on how you've configured them in web.xml).
If you restart your application or container, you will see the new version.

Some containers such as Tomcat have an reloadable attribute that you can configure which will cause the application to automatically reload itself if a loaded class file is updated.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
nikhil agrawal
Greenhorn

Joined: Apr 04, 2010
Posts: 3


i am using apache TomCat 4.0
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Tomcat 4?!

In any case--have you redeployed the servlet class?
 
Consider Paul's rocket mass heater.
 
subject: servlet program always show same result after modifing