×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

Let me try to answer your question

Under .../jakarta-tomcat/webapps/, there are several contexts there: 1) examples: 2) admin; 3)Root. You may add your application there. I think you have done that. Reminder:
In tomcat's terms, we call it a context, not an application. Of course, we need to add our
context in server.xml file.

If you want to get rid of your context(or application), you need to do 3 things:
1) delete or remove the directory under
.../jakarta-tomcat/webapps/; 2) delete entry
in server.xml; 3) restart the tomcat. IT IS IMPOSSIBLE to clear the things without restarting tomcat. Tomcat is only a lightweight development tool.

Even in Weblogic and Websphere, one needs to restart the servlet engine to
get rid of those unwanted Java servlets and jsp files. Actually, you are lucky because you use Tomcat... It takes you only a few minutes to restart tomcat. I am using Websphere now. It always takes me 10-30 minutes as we update a servlet.

Last but not least, the reason is: Load once, run forever!
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / A servlet question
    I setup an application in my machine, which is
    linux+tomcat3+jdk1.3. The problem is whenever I
    do some changes in this application, the tomcat
    still show me the orignal one, and I have to stop
    and restart the tomcat, the changed application
    then take effective.
    I know tomcat must buffer the orignal class files,
    Dose someone can tell me how to clear those things
    without stop and restart tomcat ? Thanks !
    • Let me try to answer your question
      Under .../jakarta-tomcat/webapps/, there are several contexts there: 1) examples: 2) admin; 3)Root. You may add your application there. I think you have done that. Reminder:
      In tomcat's terms, we call it a context, not an application. Of course, we need to add our
      context in server.xml file.

      If you want to get rid of your context(or application), you need to do 3 things:
      1) delete or remove the directory under
      .../jakarta-tomcat/webapps/; 2) delete entry
      in server.xml; 3) restart the tomcat. IT IS IMPOSSIBLE to clear the things without restarting tomcat. Tomcat is only a lightweight development tool.

      Even in Weblogic and Websphere, one needs to restart the servlet engine to
      get rid of those unwanted Java servlets and jsp files. Actually, you are lucky because you use Tomcat... It takes you only a few minutes to restart tomcat. I am using Websphere now. It always takes me 10-30 minutes as we update a servlet.

      Last but not least, the reason is: Load once, run forever!
      • I see,thank you!