Can't update Servlet in Tomcat

Discussions

Web tier: servlets, JSP, Web frameworks: Can't update Servlet in Tomcat

  1. Can't update Servlet in Tomcat (5 messages)

    Hi everybody,

    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

    Threaded Messages (5)

  2. Can't update Servlet in Tomcat[ Go to top ]

    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.
  3. Can't update Servlet in Tomcat[ Go to top ]

    I cleared my browser cache and refreshed the page, also I set Tomcat 3.2 auto-reload in server.xml as follows:

    <Context path="/examples"
    docBase="webapps/examples"
    crossContext="false"
    debug="0"
    reloadable="true" >
    </Context>

    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.

  4. Can't update Servlet in Tomcat[ Go to top ]

    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.

    Christian
  5. Can't update Servlet in Tomcat[ Go to top ]

    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
  6. 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! :-((

     

    Please help!

    Cheers Oli