Win a copy of Head First Android this week in the Android 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Servlet

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1512
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic