Community
Participate
Working Groups
Build Identifier: Build id: 20090920-1017 i tried to write a simple servlet which involved session handlisg,but when i make changes to the servlet class file,the browser doesn't reflect the changes and it is giving the same old output,when i restart the eclipse by closing and opening the eclipse again,then the browser shows the new output,because of the changes in the servlet.i thought that there is a problem in tomcat ,but the problem stood same with the built web container which came with eclipse.there is problem in the programming logic,as i tried few other programs which lead to same problem. i also experienced another problem,though i stopped the tomcat server,when i try to ruin the servlet application again,eclipse gives me error that tomcat couldn't run because of the port 8080 is not empty or tomcat is still running. i can say the above problems are not due to tomcat,because i have got same problems with inbuilt web container which came with eclipse Reproducible: Always Steps to Reproduce: 1.create a servlet 2.run the servlet and test the output with the help of tomcat 6.0 3.now make some changes in servlet and try to run the servlet application.the output should remain same
please fix the above bug quickly,since it is not allowing to run any j2ee applications in the eclipse,thus it is waste of downloading eclipse Release 3.5.1 (Last revised September 8, 2009).
*** Bug 314673 has been marked as a duplicate of this bug. ***
Since this is likely expected behavior, setting the severity to normal. Please verify that once the servlet is changed and published, automatically or manually, that the class file at the publish destination is updated. This publish destination would typically default to "<your workspace>/.metadata\.plugins\org.eclipse.wst.server.core\tmp?\wtpwebapps\<your context>\WEB-INF\classes\<path to your servlet>". This is the extent to which WTP is involved. Behavior beyond that is up to the server. Note that once a class, such as a servlet, is loaded by a classloader, in general it can't be replaced, though running in debug mode allows for some level of modification to the class. This is true for all servlet containers, including Tomcat. How a servlet container deals with this is up to the container. If configured properly, Tomcat provides for auto-reloading the context when it detects a change to a class that it has loaded. It typically takes up to 5 seconds for the reload to start. Once it completes, an updated servlet should show the new output. If this reload is not occurring, then you will have to restart the Tomcat server to run the updated servlet. Be aware that Tomcat will wait *forever* for a context to "clean up". For this reason, I recommend you always "restart" by executing a Stop and then a Start instead of executing a Start when the Tomcat server is already running. The advantage is that by using Stop, if Tomcat "hangs" waiting for a context which isn't going to successfully clean up, a dialog will pop up giving you the opportunity to terminate the Tomcat server. If you execute Start while the Tomcat is already running, the server will be stuck in a permanent "Stopping" state and you will have to exit Eclipse and possibly manually kill the Tomcat server to recover. It's not clear if this could be the cause of your second problem.