• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet

 
Dipanjan Paul
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to test my servlets using Java Web Server. After I load the servlet and try to run it, it runs fine. But if I modify the servlet code, recompile it and try to rerun the servlet the old copy of the servlet gets executed (whichever was loaded previously). However if I shut down the webserver and restart and then try to rerun the servlet, it takes the modified version of the servlet and executes it.
Can anyone please tell me why is this happenning.
Thanx
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a feature of most Servlet engines called cacheing. Basically the servlet engine loads the necessary servlet on the first call and uses the code stored in memory for subsequent calls. This allows rapid response of the server to subsuquent calls for your servlet. Consult the documentation to determine if there is a way to force the webserver to reload the servlet on each call.
Hope this helps
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am experiencing the same problem using the servletrunner that comes with JSDK. I actually have to turn the PC off and on before the updated version of my servlet gets loaded.
Bosun
 
Srivatsan Raman
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I had the same problem. Then i switched to Java Web server and JRun check this out. this will solve the problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic