From: Siva Sankara Reddy
> When i am invoking a servlet, the browser is gettting the old one from
> cache. How can i prevent this.
Just to be clear:
The browser isn't getting the *servlet* since all your browser sees is
HTML pages, which may in turn have been generated on the server-side
by a servlet.
If the browser is getting the page from it's local cache, rather than
calling the server, that's one possible problem. If the browser is
getting the page from your ISP's HTTP proxy, that's another possible
problem. In either case you need to read up on cache control:
http://www.mnot.net/cache_docs/
The above is the first question you need to answer...
If you can determine that the request is in fact making it back to
the server, and you are getting an "old" response, then that would
be a different problem. In this case you have presumably updated
the servlet (likely in a ./servlets directory) on the web server
but are still seeing responses from the old logic.
You have a couple choices.
You could restart the web server entirely. If this works and new
requests return responses from the new servlet, then you at least
know that you are putting your new servlet in more or less the
right place.
I say "more or less" because most servlet engines will automatically
reload servlets when the servlet .class file changes on disk.
So you shouldn't have to restart your web server to get the new
servlet invoked. If your servlet is *not* getting reloaded, then
you need to dig into the configuration of your servlet engine
(whichever one that is).
[ Am I mistaken, or have the quality of answers taken a dive?? ]
From: Manish Bhatnagar
> Whe you compile your servlet... put the class files in <server_root>/classes
> and <server_root>/servlets... and remember to terminate the Web server before
> firing your browser... You can do that by pressing Crtl+C and then... press
> Ctrl+Alt+Del... and say 'End Task' to Jrew service (All this holdes good if you
> are using Java Web Server 2.0).
From: Ch.Srinivas Kumar
> if u r using Apache web server(3.0) go to the admin servlet .there u have
> option called "Server Side Include(SSI)" uder this there is an option "File
> cache" click on it.by default this is enabled and the cache size is 100k,now
> disable this and ur problem will be solved.let me know if it is solved.Bye.
From: Ritesh Sinha
> The solution is to restart your server. The servlet remains in the memory
> of the webserver. It is flushed when you restart it.
I was going to respond to these individually,
but don't have *that* much time :).
--
Preston L. Bannister
[EMAIL PROTECTED]
http://members.home.com/preston
pbannister via Yahoo! Messenger
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html