I placed my servlet in the C:\Tomcat4.0\webapps\NZServlet\web-inf\classes directory...after compiling...it load successfully in the browser... BUT..if I edit it, compile and try to refresh the browser...new servlet failed to load...just show the previous one...I have to restrat my tomcat again to load the servlet.... is there any solution ?
add reloadable="true" as an attribute/value in the context tag in server.xml for your context. Like this.. <Context path="/session" docBase="c:\MyServlets\session" debug="0" reloadable="true"> </Context> Hope this helps, Manjunath
uuuuummmm...I have a different approach! Try reloading the page with < shift_key > + Reload button of your browser. Then you might want to add a "System.out.print" stmt in your Servlet methods so you know that the method was executed. This will tell you that your request is being processed by the server rather than your browser cache. I think you path is wrong. Should be: c:\Tomcat4\webapps\ROOT\WEB-INF\classes\.... Not necessarily. You can add a servlet to your own webapp. In this case "NZServlet" would be treated as the web-app. I would agree with you if you had picked on the "web-inf" in the original path, but then he said he could access it so I assume it is a typo here. You clearly have added your servlet in to your web.xml file too. Where was this suggested, I din't pick this from the original post. It is NOT necessary that you should add each servlet into the "web.xml" for you to access it through a browser. My Tomcat 4.0 does refresh without restarting but with a delay, by which I mean that if I refresh about 5-10 times it picks the new one up. Try to reload with < shift_key > + "Reload" buttons. This, in most cases, will attempt to call the server and not load from the page cache. My two cents......... - satya
Take a Minute, Donate an Hour, Change a Life
Hello Stephen Why should I use root or even the installation folder as my developing folder...I think this is not a good practice... I dont try the other suggestions yet...let me check...hope some of these will help me... Regards Nazmul
Nazmul, i know resin auto reloads the changed servlet class files and Tomcat also do that. When i used in standalone pc at my home, tomcat auto relaods the changed class files without any problem. But when i used in my previous office's 20 pc network, it did not relaod automatically ....i had to restart tomcat. Possbile an entry in server.xml file should be the right solution...
If my development path is C:\Tomcat4.0\webapps\NZServlet\web-inf\classes then what should be the Context path in server.xml ??? Hello satya, I'm using Internet Explorer 5 ...where is the reload button in IE ??? I think u mean the Refresh button....no effect shift+refresh .... Hey Ashik...I placed the servelt in the C:\Tomcat4.0/webapps/example/web-inf/classes folder and in LAN or Standalone no problem reloading... :-( but problem facing when it is in C:\Tomcat4.0/webapps/ROOT/web-inf/classes or C:\Tomcat4.0\webapps\NZServlet\web-inf\classes folder [ March 10, 2002: Message edited by: Md. Nazmul Huda Sarkar ]
Originally posted by Md. Nazmul Huda Sarkar: If my development path is C:\Tomcat4.0\webapps\NZServlet\web-inf\classes then what should be the Context path in server.xml ??? [ March 10, 2002: Message edited by: Md. Nazmul Huda Sarkar ]
Context path is: NZServlet. (b.t.w.: it should be WEB-INF!!) very common is a structure like this: context-path: Context-path --WEB-INF ---classes ----SomeClasses.class ---web.xml --jsp ---someJsp.jsp --html ---someHtml.html --css ---someCss.css Axel
I have put this in my C:\Tomcat4.0\conf\server.xml file stil facing problem of reloading... :-( <!-- NZServlet Context --> <!-- <Context path="/NZServlet" docBase="NZServlet" debug="0" reloadable="true"/> -->