I have a JSP which uses HTML forms in them. The form's action attribute sends the request to a servlet. This servlet processes the request and sends a response to a DIFFERENT JSP page. I made some changes to my JSP and servlet. When I reloaded the page, the old versions of the JSP showed up. Why? I saved the jsp, and servlet in the correct directory. I compiled the servlet. But still the old version of the JSP shows up. Why does this happen? Is it because the cache has versions of the old JSP? How can I correct this? I am using Netscape Navigator v 4.7 as my browser. Why does it do this? How can I get rid of it?
Hi Shuaib, Are you using the Tomcat container ? This is a common problem and is indeed because of caching. If you make a minor change to the root of the transaction (which I think would be the form page in this case) then the container should automatically be forced to reload the JSP's as well. Hope this sorts you. Otherwise - if you are using Tomcat then the cache is somewhere like : C:\Program Files\jakarta-tomcat-3.2.2\work\localhost_8080<context> where <context> is, strangely - your context.
Its not what you do, its the way you say you've done it.
I'm using Jrun 3.0 on my local machine. I make the changes, complie the .java files, restart the server and hit reload. Nothing happens. When I changed a servlet to do a simple test, I commented out the RequestDispatcher so it would not forward the response to a JSP. However I compiled the java program and it still went to the next jsp page upon user request. Why? How can I get rid of caching?
I think that this is not a problem with caching. I use Jrun and it works on the same lines as you mentioned without any caching problem. I think the problem might be something like the presence of a duplicate of the .class file in your classpath. Do a check for that.
yes I had multiple .class of the same java file, so I got rid of some of the ones I did not need. Well, I keep getting an error on my jsp pages. When I hit submit from an html form, the servlet does some processing and forwards a response to a 2nd jsp. No prob, so far so good right? Well, when I do the same thing in a new session, the 2nd jsp says error on the browser, why?