You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by lightbulb432 <ve...@hotmail.com> on 2007/05/19 09:28:23 UTC

Reloadable attribute not working

When I update a servlet class and it gets compiled automatically into
WEB-INF/classes, my context does not reload automatically. It is only when I
restart Tomcat that the changes to the servlet are viewable.

I am using Tomcat 6 and have set reloadable to true in context.xml in my
META-INF/context.xml file.

I'm running Tomcat 6 embedded, where I use the Bootstrap class to start the
server initially.

Why might this not be working?

Thanks.
-- 
View this message in context: http://www.nabble.com/Reloadable-attribute-not-working-tf3781575.html#a10694472
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Reloadable attribute not working

Posted by Pid <p...@pidster.com>.
lightbulb432 wrote:
> I tried looking through the startup.bat file for standalone Tomcat and still
> cannot seem to figure out what the difference is between what that file is
> doing to startup Tomcat properly, and what I'm doing wrong with embedded
> Tomcat from my class below. (It's calling the same startup classes that I'd
> be calling, right?)
> 
> Any thoughts?

.oO( the conventional startup script might be easier to use )


> lightbulb432 wrote:
>> I know the cause of the problem - my use of embedded tomcat. When I tried
>> it with the standalone Tomcat, it works fine. What I'm confused about,
>> then, is how to fix the following code to make it work like standalone
>> Tomcat. I'm using Tomcat 6.
>>
>> I'd be very surprised if this I'm not doing something wrong and this is a
>> limitation of embedded Tomcat.
>>
>>
>> 	public static void main(String[] args) {
>> 		
>> 		Bootstrap bootstrap = new Bootstrap();
>> 		bootstrap.setCatalinaHome(path1);
>> 		bootstrap.setCatalinaBase(path2);
>> 		try {
>> 	        bootstrap.init(new String[] {"-config","conf/server.xml"});
>> 	        bootstrap.start();
>> 	        Thread.sleep(10000000);
>>         }
>>         catch (Exception e) {
>> 	        e.printStackTrace();
>>         }
>> 	}
>>
>>
>> Also, nothing is appearing underneath
>> CATALINA_BASE/work/Catalina/localhost/myapp, regardless of the number of
>> servlets or JSPs I've deployed and accessed, and regardless of whether
>> it's with standalone or embedded Tomcat.
>>
>>
>>
>>
>> Caldarale, Charles R wrote:
>>>> From: lightbulb432 [mailto:veerukrishnan@hotmail.com] 
>>>> Subject: RE: Reloadable attribute not working
>>>>
>>>> There's no folders under CATALINA_BASE/conf
>>> Not having run an embedded Tomcat, I don't know if that's normal or not.
>>>
>>>> I'm using the invoker servlet - could that be a reason, or 
>>>> does it have nothing to do with this? 
>>> Don't know - the invoker servlet should never be used.  It's only there
>>> for compatiblity.
>>>
>>>> Also, could it be why no .java and .class files are generated 
>>>> in my "work" directory?
>>> They're only generated for .jsp files; do you have any in your webapps?
>>>
>>>> What other effects might one expect using the invoker servlet?
>>> Security holes all over the place.  It's really a bad idea.
>>>
>>>  - Chuck
>>>
>>>
>>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
>>> MATERIAL and is thus for use only by the intended recipient. If you
>>> received this in error, please contact the sender and delete the e-mail
>>> and its attachments from all computers.
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>
> 


RE: Reloadable attribute not working

Posted by lightbulb432 <ve...@hotmail.com>.
I tried looking through the startup.bat file for standalone Tomcat and still
cannot seem to figure out what the difference is between what that file is
doing to startup Tomcat properly, and what I'm doing wrong with embedded
Tomcat from my class below. (It's calling the same startup classes that I'd
be calling, right?)

Any thoughts?



lightbulb432 wrote:
> 
> I know the cause of the problem - my use of embedded tomcat. When I tried
> it with the standalone Tomcat, it works fine. What I'm confused about,
> then, is how to fix the following code to make it work like standalone
> Tomcat. I'm using Tomcat 6.
> 
> I'd be very surprised if this I'm not doing something wrong and this is a
> limitation of embedded Tomcat.
> 
> 
> 	public static void main(String[] args) {
> 		
> 		Bootstrap bootstrap = new Bootstrap();
> 		bootstrap.setCatalinaHome(path1);
> 		bootstrap.setCatalinaBase(path2);
> 		try {
> 	        bootstrap.init(new String[] {"-config","conf/server.xml"});
> 	        bootstrap.start();
> 	        Thread.sleep(10000000);
>         }
>         catch (Exception e) {
> 	        e.printStackTrace();
>         }
> 	}
> 
> 
> Also, nothing is appearing underneath
> CATALINA_BASE/work/Catalina/localhost/myapp, regardless of the number of
> servlets or JSPs I've deployed and accessed, and regardless of whether
> it's with standalone or embedded Tomcat.
> 
> 
> 
> 
> Caldarale, Charles R wrote:
>> 
>>> From: lightbulb432 [mailto:veerukrishnan@hotmail.com] 
>>> Subject: RE: Reloadable attribute not working
>>> 
>>> There's no folders under CATALINA_BASE/conf
>> 
>> Not having run an embedded Tomcat, I don't know if that's normal or not.
>> 
>>> I'm using the invoker servlet - could that be a reason, or 
>>> does it have nothing to do with this? 
>> 
>> Don't know - the invoker servlet should never be used.  It's only there
>> for compatiblity.
>> 
>>> Also, could it be why no .java and .class files are generated 
>>> in my "work" directory?
>> 
>> They're only generated for .jsp files; do you have any in your webapps?
>> 
>>> What other effects might one expect using the invoker servlet?
>> 
>> Security holes all over the place.  It's really a bad idea.
>> 
>>  - Chuck
>> 
>> 
>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
>> MATERIAL and is thus for use only by the intended recipient. If you
>> received this in error, please contact the sender and delete the e-mail
>> and its attachments from all computers.
>> 
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Reloadable-attribute-not-working-tf3781575.html#a10785088
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Reloadable attribute not working

Posted by lightbulb432 <ve...@hotmail.com>.
I know the cause of the problem - my use of embedded tomcat. When I tried it
with the standalone Tomcat, it works fine. What I'm confused about, then, is
how to fix the following code to make it work like standalone Tomcat. I'm
using Tomcat 6.

I'd be very surprised if this I'm not doing something wrong and this is a
limitation of embedded Tomcat.


	public static void main(String[] args) {
		
		Bootstrap bootstrap = new Bootstrap();
		bootstrap.setCatalinaHome(path1);
		bootstrap.setCatalinaBase(path2);
		try {
	        bootstrap.init(new String[] {"-config","conf/server.xml"});
	        bootstrap.start();
	        Thread.sleep(10000000);
        }
        catch (Exception e) {
	        e.printStackTrace();
        }
	}


Also, nothing is appearing underneath
CATALINA_BASE/work/Catalina/localhost/myapp, regardless of the number of
servlets or JSPs I've deployed and accessed, and regardless of whether it's
with standalone or embedded Tomcat.




Caldarale, Charles R wrote:
> 
>> From: lightbulb432 [mailto:veerukrishnan@hotmail.com] 
>> Subject: RE: Reloadable attribute not working
>> 
>> There's no folders under CATALINA_BASE/conf
> 
> Not having run an embedded Tomcat, I don't know if that's normal or not.
> 
>> I'm using the invoker servlet - could that be a reason, or 
>> does it have nothing to do with this? 
> 
> Don't know - the invoker servlet should never be used.  It's only there
> for compatiblity.
> 
>> Also, could it be why no .java and .class files are generated 
>> in my "work" directory?
> 
> They're only generated for .jsp files; do you have any in your webapps?
> 
>> What other effects might one expect using the invoker servlet?
> 
> Security holes all over the place.  It's really a bad idea.
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Reloadable-attribute-not-working-tf3781575.html#a10710782
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Reloadable attribute not working

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: lightbulb432 [mailto:veerukrishnan@hotmail.com] 
> Subject: RE: Reloadable attribute not working
> 
> There's no folders under CATALINA_BASE/conf

Not having run an embedded Tomcat, I don't know if that's normal or not.

> I'm using the invoker servlet - could that be a reason, or 
> does it have nothing to do with this? 

Don't know - the invoker servlet should never be used.  It's only there
for compatiblity.

> Also, could it be why no .java and .class files are generated 
> in my "work" directory?

They're only generated for .jsp files; do you have any in your webapps?

> What other effects might one expect using the invoker servlet?

Security holes all over the place.  It's really a bad idea.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Reloadable attribute not working

Posted by lightbulb432 <ve...@hotmail.com>.
There's no folders under CATALINA_BASE/conf, but I have a guess as to what's
going on and perhaps you could comment.

I'm using the invoker servlet - could that be a reason, or does it have
nothing to do with this? 

Also, could it be why no .java and .class files are generated in my "work"
directory?

What other effects might one expect using the invoker servlet?



Caldarale, Charles R wrote:
> 
>> From: lightbulb432 [mailto:veerukrishnan@hotmail.com] 
>> Subject: Reloadable attribute not working
>> 
>> I am using Tomcat 6 and have set reloadable to true in 
>> context.xml in my META-INF/context.xml file.
> 
> Does a conf/Catalina/[host]/[appname].xml file exist? (I don't actually
> know if embedded uses a conf directory.)  Such a file would override the
> one in META-INF/context.xml in a non-embedded Tomcat.
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Reloadable-attribute-not-working-tf3781575.html#a10698303
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Reloadable attribute not working

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: lightbulb432 [mailto:veerukrishnan@hotmail.com] 
> Subject: Reloadable attribute not working
> 
> I am using Tomcat 6 and have set reloadable to true in 
> context.xml in my META-INF/context.xml file.

Does a conf/Catalina/[host]/[appname].xml file exist? (I don't actually
know if embedded uses a conf directory.)  Such a file would override the
one in META-INF/context.xml in a non-embedded Tomcat.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org