How to *not* restart a servlet?

Discussion in 'Java' started by Bura Tino, Jun 30, 2003.

  1. Bura Tino

    Bura Tino Guest

    Hi,

    About a month ago I started a similar thread, but upon further
    reflection I reasized that I didn't ask my question very clearly,
    although I learned a lot from the responses. (By the way, into what
    file do you put "$ant clean compile reload"?) So I'll try my question
    again.

    What I change something in a jsp page, the servlet engine does not
    restart and and the context does not get reloaded. I want the same
    behavior when I recompile one of the classes found in WEB-INF/classes
    directory. I'm not able to achieve that. Whenever I change a class and
    recompile the entire context gets reloaded, which for me takes about 5
    minutes (and there is no way to reduce that time). I can see why the
    reload might need to take place, but is there a way to avoid it?


    As an afterthought question, I use JBuilder to code the key classes
    which support the application and NetBeans to code that .jsp files. Is
    there a better free combination (on w2k)?

    Very many thanks in advance!

    Bura
    Bura Tino, Jun 30, 2003
    #1
    1. Advertising

  2. Set 'reloadable' to FALSE in context description (in server.xml file)


    Bura Tino wrote:
    > Hi,
    >
    > About a month ago I started a similar thread, but upon further
    > reflection I reasized that I didn't ask my question very clearly,
    > although I learned a lot from the responses. (By the way, into what
    > file do you put "$ant clean compile reload"?) So I'll try my question
    > again.
    >
    > What I change something in a jsp page, the servlet engine does not
    > restart and and the context does not get reloaded. I want the same
    > behavior when I recompile one of the classes found in WEB-INF/classes
    > directory. I'm not able to achieve that. Whenever I change a class and
    > recompile the entire context gets reloaded, which for me takes about 5
    > minutes (and there is no way to reduce that time). I can see why the
    > reload might need to take place, but is there a way to avoid it?
    >
    >
    > As an afterthought question, I use JBuilder to code the key classes
    > which support the application and NetBeans to code that .jsp files. Is
    > there a better free combination (on w2k)?
    >
    > Very many thanks in advance!
    >
    > Bura
    Henryka Stolarz, Jun 30, 2003
    #2
    1. Advertising

  3. I guess we're talking Tomcat here? In that case, setting
    reloadable to false will prevent the context being
    reloaded, but also prevent the app from picking
    up any class changes. Quote from Tomcat docs:

    "Set to true if you want Catalina to monitor classes in
    /WEB-INF/classes/ and /WEB-INF/lib for changes,
    and automatically reload the web application if a change
    is detected."

    What the OP is after, I think,
    is hot code replacement of webapp classes, while
    keeping the context. As this is possible in JDK1.4
    (e.g. when using Tomcat inside Eclipse) I also wonder
    if this might not be supported when Tomact is running
    standalone.

    -- Sebastian

    "Henryka Stolarz" <> schrieb im Newsbeitrag
    news:...
    > Set 'reloadable' to FALSE in context description (in server.xml file)
    >
    >
    > Bura Tino wrote:
    > > Hi,
    > >
    > > About a month ago I started a similar thread, but upon further
    > > reflection I reasized that I didn't ask my question very clearly,
    > > although I learned a lot from the responses. (By the way, into what
    > > file do you put "$ant clean compile reload"?) So I'll try my question
    > > again.
    > >
    > > What I change something in a jsp page, the servlet engine does not
    > > restart and and the context does not get reloaded. I want the same
    > > behavior when I recompile one of the classes found in WEB-INF/classes
    > > directory. I'm not able to achieve that. Whenever I change a class and
    > > recompile the entire context gets reloaded, which for me takes about 5
    > > minutes (and there is no way to reduce that time). I can see why the
    > > reload might need to take place, but is there a way to avoid it?
    > >
    > >
    > > As an afterthought question, I use JBuilder to code the key classes
    > > which support the application and NetBeans to code that .jsp files. Is
    > > there a better free combination (on w2k)?
    > >
    > > Very many thanks in advance!
    > >
    > > Bura

    >
    Sebastian Millies, Jul 1, 2003
    #3
  4. Bura Tino

    Bura Tino Guest

    "Sebastian Millies" <-THIS.de> wrote in message news:<3f01647d$0$10132$>...
    > I guess we're talking Tomcat here? In that case, setting
    > reloadable to false will prevent the context being
    > reloaded, but also prevent the app from picking
    > up any class changes. Quote from Tomcat docs:
    >
    > "Set to true if you want Catalina to monitor classes in
    > /WEB-INF/classes/ and /WEB-INF/lib for changes,
    > and automatically reload the web application if a change
    > is detected."
    >
    > What the OP is after, I think,
    > is hot code replacement of webapp classes, while
    > keeping the context. As this is possible in JDK1.4
    > (e.g. when using Tomcat inside Eclipse) I also wonder
    > if this might not be supported when Tomact is running
    > standalone.


    What I'm gathering from the responces is that what I'm trying to do is
    not possible. That's too bad. But still, how come the context does not
    need to reload when a jsp rather than a servlet is changed?

    In any case, would you agree that this restart behavior makes the
    development process a little more cumbersome than it has to be?

    Bura

    >
    > -- Sebastian
    >
    > "Henryka Stolarz" <> schrieb im Newsbeitrag
    > news:...
    > > Set 'reloadable' to FALSE in context description (in server.xml file)
    > >
    > >
    > > Bura Tino wrote:
    > > > Hi,
    > > >
    > > > About a month ago I started a similar thread, but upon further
    > > > reflection I reasized that I didn't ask my question very clearly,
    > > > although I learned a lot from the responses. (By the way, into what
    > > > file do you put "$ant clean compile reload"?) So I'll try my question
    > > > again.
    > > >
    > > > What I change something in a jsp page, the servlet engine does not
    > > > restart and and the context does not get reloaded. I want the same
    > > > behavior when I recompile one of the classes found in WEB-INF/classes
    > > > directory. I'm not able to achieve that. Whenever I change a class and
    > > > recompile the entire context gets reloaded, which for me takes about 5
    > > > minutes (and there is no way to reduce that time). I can see why the
    > > > reload might need to take place, but is there a way to avoid it?
    > > >
    > > >
    > > > As an afterthought question, I use JBuilder to code the key classes
    > > > which support the application and NetBeans to code that .jsp files. Is
    > > > there a better free combination (on w2k)?
    > > >
    > > > Very many thanks in advance!
    > > >
    > > > Bura

    > >
    Bura Tino, Jul 3, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christian Hanke

    Restart Tomcat when recompiling servlet?

    Christian Hanke, Nov 5, 2003, in forum: Java
    Replies:
    4
    Views:
    610
    Christian Hanke
    Nov 7, 2003
  2. circuit_breaker
    Replies:
    2
    Views:
    1,989
    Jack Jia
    Apr 4, 2004
  3. Doug McCann
    Replies:
    1
    Views:
    993
    William Brogden
    Aug 5, 2004
  4. Replies:
    4
    Views:
    13,234
    Simon Brooke
    Nov 11, 2006
  5. Josef Moellers

    Restart Perl Application upon KDE Restart

    Josef Moellers, Jul 18, 2013, in forum: Perl Misc
    Replies:
    18
    Views:
    265
    Adam H. Kerman
    Jul 26, 2013
Loading...

Share This Page