You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mattias Brändström <br...@ludd.luth.se> on 2002/05/04 17:23:19 UTC

JSP-pages and reloadable

Hi!

I have a simple question. Is there a way to get Tomcat to handle 
JSP-pages the same way it does classes in WEB-INF when you set 
reloadable="true" in your Context-element. It is a bit cumbersome to 
restart tomcat and apache every time I have made a change to my JSP-page...

Regards,
Mattias


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Change Classes during tests

Posted by Gianluca Gravina <g_...@virgilio.it>.
I sthere a way to change classes (I mean change code and recompile in
.class) in a web-app and see the results without restarting Tomcat??

I usually use "manager/reload" but it wouild be nicer if it can do it
automatically when a request is made.

The reloadable=true in context is set, ... Ideas?

Thanks in advance

Gianluca Gravina



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: JSP-pages and reloadable

Posted by Mattias Brändström <br...@ludd.luth.se>.
Jay Gardner wrote:
> I have run into similar problems before. It turned out to be one of two
> things. Either I had to force my browser to reload or I was making changes
> in a JSP that was an include for another JSP. I am sure you have tried the
> first. I don't know if the second is what you are doing, but if it is, you
> will need to save the outer JSP so the timestamp changes. Then both the
> outer and any included JSPs will be re-compiled. Other than that I don't
> know what the problem could be.
> 

It turned out to be a problem related to the dates on the jsp-files. I 
was editing files shared with samba to my windows box using WinEmacs. 
For some reason the dates on the files did not get updated correcty when 
I saved them so I had to 'touch' them in order to get a good date. When 
I did that everything worked fine.

Regards,
Mattias


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: JSP-pages and reloadable

Posted by Abraham Fathman <af...@one.net>.
Looks like Glenn Nielsen beat me to it. He just added this today.

Thanks Glenn!

Abe

-----Original Message-----
From: Abraham Fathman [mailto:afathman@one.net] 
Sent: Monday, May 06, 2002 12:43 AM
To: 'Tomcat Users List'
Subject: RE: JSP-pages and reloadable


Craig,

Good advice! I'll work on it. Thanks for the encouragement.

Abe

-----Original Message-----
From: Craig R. McClanahan [mailto:craigmcc@apache.org] 
Sent: Sunday, May 05, 2002 6:06 PM
To: Tomcat Users List
Cc: gjk@qwest.net
Subject: RE: JSP-pages and reloadable




On Sun, 5 May 2002, Abraham Fathman wrote:

> Date: Sun, 5 May 2002 00:16:31 -0400
> From: Abraham Fathman <af...@one.net>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: 'Tomcat Users List' <to...@jakarta.apache.org>,
> gjk@qwest.net
> Subject: RE: JSP-pages and reloadable
>
> I have had that problem before: included jsp's updating but the outer
> one not compiling. Why doesn't this feature get added to tomcat?
>

The best way to get something like this added is to send a patch
enabling this feature to the TOMCAT-DEV list.

> I know weblogic does it and it is quite an annoyance in tomcat....
>

Many of Tomcat's favorite features came out of users wanting it, so they
learned enough about the code to propose a fix themselvs.  It *is* open
source, after all :-).

> Abe
>

Craig


> -----Original Message-----
> From: Jay Gardner [mailto:gjk@qwest.net]
> Sent: Saturday, May 04, 2002 9:59 PM
> To: Tomcat Users List
> Subject: RE: JSP-pages and reloadable
>
>
> I have run into similar problems before. It turned out to be one of 
> two things. Either I had to force my browser to reload or I was making

> changes in a JSP that was an include for another JSP. I am sure you 
> have tried the first. I don't know if the second is what you are 
> doing, but if it is, you will need to save the outer JSP so the 
> timestamp changes. Then both the outer and any included JSPs will be 
> re-compiled. Other than that I don't know what the problem could be.
>
> Regards,
>
> --JG
>
>
> -----Original Message-----
> From: peter.brawley@artfulsoftware.com 
> [mailto:peter.brawley@artfulsoftware.com]
> Sent: Saturday, May 04, 2002 10:58 AM
> To: Tomcat Users List
> Subject: Re: JSP-pages and reloadable
>
> Mattias Brändström wrote:
>
> > >>I have a simple question. Is there a way to get Tomcat to handle 
> > >>JSP-pages the same way it does classes in WEB-INF when you set 
> > >>reloadable="true" in your Context-element. It is a bit cumbersome 
> > >>to
>
> > >>restart tomcat and apache every time I have made a change to my
> JSP-page...
> > >
> > > You don't have to restart Tomcat /Apache when the jsp-page is 
> > > changed. Just reload it in your browser.
> > >
> > For some reason that doesn't work for me. Is there some kind of 
> > special configuration that needs to be done or should that work 
> > automaticaly?
>
> I think it's ...
>
>   <Context ...  reloadable="true" ... />
>
> P.
>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: JSP-pages and reloadable

Posted by Abraham Fathman <af...@one.net>.
Craig,

Good advice! I'll work on it. Thanks for the encouragement.

Abe

-----Original Message-----
From: Craig R. McClanahan [mailto:craigmcc@apache.org] 
Sent: Sunday, May 05, 2002 6:06 PM
To: Tomcat Users List
Cc: gjk@qwest.net
Subject: RE: JSP-pages and reloadable




On Sun, 5 May 2002, Abraham Fathman wrote:

> Date: Sun, 5 May 2002 00:16:31 -0400
> From: Abraham Fathman <af...@one.net>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: 'Tomcat Users List' <to...@jakarta.apache.org>, 
> gjk@qwest.net
> Subject: RE: JSP-pages and reloadable
>
> I have had that problem before: included jsp's updating but the outer 
> one not compiling. Why doesn't this feature get added to tomcat?
>

The best way to get something like this added is to send a patch
enabling this feature to the TOMCAT-DEV list.

> I know weblogic does it and it is quite an annoyance in tomcat....
>

Many of Tomcat's favorite features came out of users wanting it, so they
learned enough about the code to propose a fix themselvs.  It *is* open
source, after all :-).

> Abe
>

Craig


> -----Original Message-----
> From: Jay Gardner [mailto:gjk@qwest.net]
> Sent: Saturday, May 04, 2002 9:59 PM
> To: Tomcat Users List
> Subject: RE: JSP-pages and reloadable
>
>
> I have run into similar problems before. It turned out to be one of 
> two things. Either I had to force my browser to reload or I was making

> changes in a JSP that was an include for another JSP. I am sure you 
> have tried the first. I don't know if the second is what you are 
> doing, but if it is, you will need to save the outer JSP so the 
> timestamp changes. Then both the outer and any included JSPs will be 
> re-compiled. Other than that I don't know what the problem could be.
>
> Regards,
>
> --JG
>
>
> -----Original Message-----
> From: peter.brawley@artfulsoftware.com 
> [mailto:peter.brawley@artfulsoftware.com]
> Sent: Saturday, May 04, 2002 10:58 AM
> To: Tomcat Users List
> Subject: Re: JSP-pages and reloadable
>
> Mattias Brändström wrote:
>
> > >>I have a simple question. Is there a way to get Tomcat to handle 
> > >>JSP-pages the same way it does classes in WEB-INF when you set 
> > >>reloadable="true" in your Context-element. It is a bit cumbersome 
> > >>to
>
> > >>restart tomcat and apache every time I have made a change to my
> JSP-page...
> > >
> > > You don't have to restart Tomcat /Apache when the jsp-page is 
> > > changed. Just reload it in your browser.
> > >
> > For some reason that doesn't work for me. Is there some kind of 
> > special configuration that needs to be done or should that work 
> > automaticaly?
>
> I think it's ...
>
>   <Context ...  reloadable="true" ... />
>
> P.
>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: JSP-pages and reloadable

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Sun, 5 May 2002, Abraham Fathman wrote:

> Date: Sun, 5 May 2002 00:16:31 -0400
> From: Abraham Fathman <af...@one.net>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: 'Tomcat Users List' <to...@jakarta.apache.org>, gjk@qwest.net
> Subject: RE: JSP-pages and reloadable
>
> I have had that problem before: included jsp's updating but the outer
> one not compiling. Why doesn't this feature get added to tomcat?
>

The best way to get something like this added is to send a patch enabling
this feature to the TOMCAT-DEV list.

> I know weblogic does it and it is quite an annoyance in tomcat....
>

Many of Tomcat's favorite features came out of users wanting it, so they
learned enough about the code to propose a fix themselvs.  It *is* open
source, after all :-).

> Abe
>

Craig


> -----Original Message-----
> From: Jay Gardner [mailto:gjk@qwest.net]
> Sent: Saturday, May 04, 2002 9:59 PM
> To: Tomcat Users List
> Subject: RE: JSP-pages and reloadable
>
>
> I have run into similar problems before. It turned out to be one of two
> things. Either I had to force my browser to reload or I was making
> changes in a JSP that was an include for another JSP. I am sure you have
> tried the first. I don't know if the second is what you are doing, but
> if it is, you will need to save the outer JSP so the timestamp changes.
> Then both the outer and any included JSPs will be re-compiled. Other
> than that I don't know what the problem could be.
>
> Regards,
>
> --JG
>
>
> -----Original Message-----
> From: peter.brawley@artfulsoftware.com
> [mailto:peter.brawley@artfulsoftware.com]
> Sent: Saturday, May 04, 2002 10:58 AM
> To: Tomcat Users List
> Subject: Re: JSP-pages and reloadable
>
> Mattias Brändström wrote:
>
> > >>I have a simple question. Is there a way to get Tomcat to handle
> > >>JSP-pages the same way it does classes in WEB-INF when you set
> > >>reloadable="true" in your Context-element. It is a bit cumbersome to
>
> > >>restart tomcat and apache every time I have made a change to my
> JSP-page...
> > >
> > > You don't have to restart Tomcat /Apache when the jsp-page is
> > > changed. Just reload it in your browser.
> > >
> > For some reason that doesn't work for me. Is there some kind of
> > special configuration that needs to be done or should that work
> > automaticaly?
>
> I think it's ...
>
>   <Context ...  reloadable="true" ... />
>
> P.
>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: JSP-pages and reloadable

Posted by Abraham Fathman <af...@one.net>.
I have had that problem before: included jsp's updating but the outer
one not compiling. Why doesn't this feature get added to tomcat?

I know weblogic does it and it is quite an annoyance in tomcat....

Abe

-----Original Message-----
From: Jay Gardner [mailto:gjk@qwest.net] 
Sent: Saturday, May 04, 2002 9:59 PM
To: Tomcat Users List
Subject: RE: JSP-pages and reloadable


I have run into similar problems before. It turned out to be one of two
things. Either I had to force my browser to reload or I was making
changes in a JSP that was an include for another JSP. I am sure you have
tried the first. I don't know if the second is what you are doing, but
if it is, you will need to save the outer JSP so the timestamp changes.
Then both the outer and any included JSPs will be re-compiled. Other
than that I don't know what the problem could be.

Regards,

--JG


-----Original Message-----
From: peter.brawley@artfulsoftware.com
[mailto:peter.brawley@artfulsoftware.com]
Sent: Saturday, May 04, 2002 10:58 AM
To: Tomcat Users List
Subject: Re: JSP-pages and reloadable

Mattias Brändström wrote:

> >>I have a simple question. Is there a way to get Tomcat to handle 
> >>JSP-pages the same way it does classes in WEB-INF when you set 
> >>reloadable="true" in your Context-element. It is a bit cumbersome to

> >>restart tomcat and apache every time I have made a change to my
JSP-page...
> >
> > You don't have to restart Tomcat /Apache when the jsp-page is 
> > changed. Just reload it in your browser.
> >
> For some reason that doesn't work for me. Is there some kind of 
> special configuration that needs to be done or should that work 
> automaticaly?

I think it's ...

  <Context ...  reloadable="true" ... />

P.



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: JSP-pages and reloadable

Posted by Jay Gardner <gj...@qwest.net>.
I have run into similar problems before. It turned out to be one of two
things. Either I had to force my browser to reload or I was making changes
in a JSP that was an include for another JSP. I am sure you have tried the
first. I don't know if the second is what you are doing, but if it is, you
will need to save the outer JSP so the timestamp changes. Then both the
outer and any included JSPs will be re-compiled. Other than that I don't
know what the problem could be.

Regards,

--JG


-----Original Message-----
From: peter.brawley@artfulsoftware.com
[mailto:peter.brawley@artfulsoftware.com]
Sent: Saturday, May 04, 2002 10:58 AM
To: Tomcat Users List
Subject: Re: JSP-pages and reloadable

Mattias Brändström wrote:

> >>I have a simple question. Is there a way to get Tomcat to handle
> >>JSP-pages the same way it does classes in WEB-INF when you set
> >>reloadable="true" in your Context-element. It is a bit cumbersome to
> >>restart tomcat and apache every time I have made a change to my
JSP-page...
> >
> > You don't have to restart Tomcat /Apache when the jsp-page is changed.
> > Just reload it in your browser.
> >
> For some reason that doesn't work for me. Is there some kind of special
> configuration that needs to be done or should that work automaticaly?

I think it's ...

  <Context ...  reloadable="true" ... />

P.



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: JSP-pages and reloadable

Posted by pe...@artfulsoftware.com.
Mattias Brändström wrote:

> >>I have a simple question. Is there a way to get Tomcat to handle
> >>JSP-pages the same way it does classes in WEB-INF when you set
> >>reloadable="true" in your Context-element. It is a bit cumbersome to
> >>restart tomcat and apache every time I have made a change to my JSP-page...
> >
> > You don't have to restart Tomcat /Apache when the jsp-page is changed.
> > Just reload it in your browser.
> >
> For some reason that doesn't work for me. Is there some kind of special
> configuration that needs to be done or should that work automaticaly?

I think it's ...

  <Context ...  reloadable="true" ... />

P.



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: JSP-pages and reloadable

Posted by Abraham Fathman <af...@one.net>.
Should be the only way for it to work....

Why don't you try a test page in a new web app.

Goto tomcat's\webapp directory
	create a directory called test
	create a file in test called test.jsp
	place
		<%=executing jsp%>
	in test.jsp

Navigate to it in the browser http://localhost:8080/test/test.jsp (this
is by default if you have changed your port or the server is on a
different machine it will be different...)

Monitor your work directory for the .java and .class file that will be
created. There should be a tomcat/work/hostname/test/test$jsp.java.

When you change test.jsp and access it again the test$jsp.java should
update.

I know this has been true on all of the versions of tomcat that I have
used. (3.3-4.0.3)

Hope this helps,
Abe

-----Original Message-----
From: Mattias Brändström [mailto:brasse@ludd.luth.se] 
Sent: Saturday, May 04, 2002 12:58 PM
To: Tomcat Users List
Subject: Re: JSP-pages and reloadable


Tore Skogly wrote:
> lørdag 4. mai 2002, 17:23, skrev Mattias Brändström:
> 
>>Hi!
>>
>>I have a simple question. Is there a way to get Tomcat to handle 
>>JSP-pages the same way it does classes in WEB-INF when you set 
>>reloadable="true" in your Context-element. It is a bit cumbersome to 
>>restart tomcat and apache every time I have made a change to my 
>>JSP-page...
>>
> 
> 
> You don't have to restart Tomcat /Apache when the jsp-page is changed.

> Just reload it in your browser.
> 
For some reason that doesn't work for me. Is there some kind of special
configuration that needs to be done or should that work automaticaly?

Regards,
Mattias


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: JSP-pages and reloadable

Posted by Mattias Brändström <br...@ludd.luth.se>.
Tore Skogly wrote:
> lørdag 4. mai 2002, 17:23, skrev Mattias Brändström:
> 
>>Hi!
>>
>>I have a simple question. Is there a way to get Tomcat to handle
>>JSP-pages the same way it does classes in WEB-INF when you set
>>reloadable="true" in your Context-element. It is a bit cumbersome to
>>restart tomcat and apache every time I have made a change to my JSP-page...
>>
> 
> 
> You don't have to restart Tomcat /Apache when the jsp-page is changed.
> Just reload it in your browser.
> 
For some reason that doesn't work for me. Is there some kind of special
configuration that needs to be done or should that work automaticaly?

Regards,
Mattias


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: JSP-pages and reloadable

Posted by Tore Skogly <to...@c2i.net>.
lørdag 4. mai 2002, 17:23, skrev Mattias Brändström:
> Hi!
>
> I have a simple question. Is there a way to get Tomcat to handle
> JSP-pages the same way it does classes in WEB-INF when you set
> reloadable="true" in your Context-element. It is a bit cumbersome to
> restart tomcat and apache every time I have made a change to my JSP-page...
>

You don't have to restart Tomcat /Apache when the jsp-page is changed.
Just reload it in your browser.

-- 
ToreS

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>