How to *not* restart a servlet?

B

Bura Tino

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
 
S

Sebastian Millies

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
 
B

Bura Tino

Sebastian Millies said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top