- Posted by: Parson Ho
- Posted on: February 07 2001 00:13 EST
I'm new in JSP,
My jsp file calls a servlet to connect to database,
I can load my jsp file in browser and return the my expected content.
But after I modified and complied my servlet again, my browser still return the same content to me.
Is it the servlet class is stored in server memory?
How to clear the memory automatically?
Thank in advance
- Can't update Servlet in Tomcat by siva raman on February 07 2001 03:24 EST
- Can't update Servlet in Tomcat by Parson Ho on February 07 2001 03:30 EST
The browsers will cache jsp files not servlet files. If you try reload,then jsp will be invoked again and you will get fresh output. If it is still not working then restart the server.
I cleared my browser cache and refreshed the page, also I set Tomcat 3.2 auto-reload in server.xml as follows:
However, the situation remain unchanged, the new compiled class is not being loaded. Does the tomcat auto-reload function reliable? Or any more i can config in tomcat?
Since I don't want to restart tomcat everytime I update my servlet.
Check if you are REALLY putting your new compiled classes on the right place. Then restart the server and clear the browser cache.
You should certainly have the new class running now.
my experience with Tomcat has been that sometimes the automatic reloading doesn't work, and you have to restart the server manually, this happens once in a while.. if you restart manually and the proper version of the servlet still doesn't load, then you may be putting your servlet class files in the wrong dir
I have a servlet - more or less a hello world - running.
When I change just a text part - maybe hello world two - it will not appear!
Sometimes after restart of tomcat, sometimes after reboot of the whole linux mashine it works!
This can't be the right way! :-(
Any ideas how to force a real reload!? Even when I delete the class file, force a object not found, after recreating the class file, the old content will get displayed! :-((