tomcat servlet reload

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kimbuba

    tomcat servlet reload

    Hi all,
    i'm writing cause i'm not able to find any good resources about this topic.
    I'm programming on tomcat and i have my browser open to see changes i made.
    The problem is that i'd like to see changes immediatly,
    is there a way to do this, but using start-stop-reload from tomcato manager
    admin?

    I tried to add this to server.xml

    <Context path="/info" docBase="info" debug="0" reloadable="tru e">
    </Context>

    the webapp servlet seems to reload only after 10-15 seconds. or it doesn't
    reload at all.
    Of course i set browser to no cache.

    what can i do?

    Thnx to all.



  • Nathan Zumwalt

    #2
    Re: tomcat servlet reload

    I've run into this problem before as well, and never found a good
    answer. It seems that Tomcat has a thread that looks at the currently
    deployed webapps and reloads any class and jar files as needed. The
    problem is that this doesn't happen often enough.

    In the end, it took less time to restart Tomcat. I had by ant script
    deploy into the webapps directory when ever I did a build, then I
    created a script to restart Tomcat that looked like this:

    %JAVA_HOME%\bin \java.exe -jar -Duser.dir="C:\T omcat 4.1" "C:\Tomcat
    4.1\bin\bootstr ap.jar" stop
    %JAVA_HOME%\bin \java.exe -jar -Duser.dir="C:\T omcat 4.1" "C:\Tomcat
    4.1\bin\bootstr ap.jar" start

    If you find a better solution, please post it to the group.

    -Nathan

    "kimbuba" <kimbuba3_NOSPA [email protected]> wrote in message news:<29Mbb.874 $Zh.541@tornado .fastwebnet.it> ...[color=blue]
    > Hi all,
    > i'm writing cause i'm not able to find any good resources about this topic.
    > I'm programming on tomcat and i have my browser open to see changes i made.
    > The problem is that i'd like to see changes immediatly,
    > is there a way to do this, but using start-stop-reload from tomcato manager
    > admin?
    >
    > I tried to add this to server.xml
    >
    > <Context path="/info" docBase="info" debug="0" reloadable="tru e">
    > </Context>
    >
    > the webapp servlet seems to reload only after 10-15 seconds. or it doesn't
    > reload at all.
    > Of course i set browser to no cache.
    >
    > what can i do?
    >
    > Thnx to all.[/color]

    Comment

    • kimbuba

      #3
      Re: tomcat servlet reload

      mmh yah.. i guess the only solution is putting a script to the build editor
      you are using.
      every time it compiles it restart the webapp.

      that's strange since i think i'm not the only one who develop under
      tomcat/servlet.
      maybe commercial containers works more well.

      thnx


      "Nathan Zumwalt" <nathanz@hotmai l.com> ha scritto nel messaggio
      news:521673fd.0 309230648.5a424 [email protected] gle.com...[color=blue]
      > I've run into this problem before as well, and never found a good
      > answer. It seems that Tomcat has a thread that looks at the currently
      > deployed webapps and reloads any class and jar files as needed. The
      > problem is that this doesn't happen often enough.
      >
      > In the end, it took less time to restart Tomcat. I had by ant script
      > deploy into the webapps directory when ever I did a build, then I
      > created a script to restart Tomcat that looked like this:
      >
      > %JAVA_HOME%\bin \java.exe -jar -Duser.dir="C:\T omcat 4.1" "C:\Tomcat
      > 4.1\bin\bootstr ap.jar" stop
      > %JAVA_HOME%\bin \java.exe -jar -Duser.dir="C:\T omcat 4.1" "C:\Tomcat
      > 4.1\bin\bootstr ap.jar" start
      >
      > If you find a better solution, please post it to the group.
      >
      > -Nathan
      >
      > "kimbuba" <kimbuba3_NOSPA [email protected]> wrote in message[/color]
      news:<29Mbb.874 $Zh.541@tornado .fastwebnet.it> ...[color=blue][color=green]
      > > Hi all,
      > > i'm writing cause i'm not able to find any good resources about this[/color][/color]
      topic.[color=blue][color=green]
      > > I'm programming on tomcat and i have my browser open to see changes i[/color][/color]
      made.[color=blue][color=green]
      > > The problem is that i'd like to see changes immediatly,
      > > is there a way to do this, but using start-stop-reload from tomcato[/color][/color]
      manager[color=blue][color=green]
      > > admin?
      > >
      > > I tried to add this to server.xml
      > >
      > > <Context path="/info" docBase="info" debug="0" reloadable="tru e">
      > > </Context>
      > >
      > > the webapp servlet seems to reload only after 10-15 seconds. or it[/color][/color]
      doesn't[color=blue][color=green]
      > > reload at all.
      > > Of course i set browser to no cache.
      > >
      > > what can i do?
      > >
      > > Thnx to all.[/color][/color]


      Comment

      Working...