You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andreas Andersson <an...@travelstart.se> on 2005/03/23 11:01:18 UTC

replacing ROOT

Hi!

I'm probably just stupid but I fail to replace the ROOT-context with my 
own application.

I've tried to put path="/" and path="" but nothing of those override the 
default ROOT-context.

I've also seen in server.xml that the part that would define ROOT is 
commented out.

This is tomcat 4.1.31.

Any ideas?
-- 
Andreas Andersson
IT Dept.
Travelstart Nordic
andreas@travelstart.se
http://www.travelstart.se

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: replacing ROOT

Posted by Mark Thomas <ma...@apache.org>.
As ever, if you have a simple test case that reproduces this issue then 
please create a bugzilla item and it will be investigated.

Mark

Gene Volovich wrote:
> This reminds me that we've been having a lot of issues with Tomcat 
> caching (refusing to recompile) changed JSP files.  Not sure if there's 
> a bug on it, but it stinks having to restart the whole container 
> sometimes, just for a small JSP change.   This problem seems to have 
> gotten worse if anything in Tomcat 5.0.x.
> 
> Gene
> 
> On Mar 23, 2005, at 8:37 AM, Andreas Andersson wrote:
> 
>> Gene Volovich wrote:
>>
>>> Whooaa... You mean you can't do
>>> <!--
>>>     <Context whatever...>
>>> -->
>>
>>
>> The above is correct, it works this way.
>>
>>> This sounds very fishy to me.  I've beenusing that in my server.xml 
>>> file forever.  In any case, this is XML, so I don't see why this 
>>> would be a problem.  I suspect that the original poster's problem, if 
>>> this is a Tomcat 5.x issue and not tomcat 4, has to do with problems 
>>> in the ../conf/Catalina/<hostname>/<context>.xml file, which if 
>>> you're upgrading from Tomcat 4, you might not think about.
>>
>>
>> I'm running tomcat 4.1.31 and just solved the problem. It's part my 
>> fault, part a stupid way of tomcat to handle compiled jsp.
>>
>> After installing my own app under / tomcat refused to recompile the 
>> .jsp and showed the old page all the time. Not until I removed all the 
>> .class-files I got it to work. This was a hard nut to crack, to me 
>> it's completly illogical that tomcat doesn't recompile the files :)
>>
>> Thanks everyhone for the help.
>>
>>
>> -- 
>> Andreas Andersson
>> IT Dept.
>> Travelstart Nordic
>> andreas@travelstart.se
>> http://www.travelstart.se
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: replacing ROOT

Posted by Harry Mantheakis <ha...@mantheakis.freeserve.co.uk>.
> This reminds me that we've been having a lot of issues with Tomcat
> caching (refusing to recompile) changed JSP files.  Not sure if there's
> a bug on it, but it stinks having to restart the whole container
> sometimes, just for a small JSP change.   This problem seems to have
> gotten worse if anything in Tomcat 5.0.x.

See the documentation for the 'reloadable' Context attribute:

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html

Reloading is switched off by default, because it's not a feature you want to
use with production servers.

The documentation also mentions that you can - as an alternative - use the
Manager web application to conveniently trigger reloads 'on demand'.

HTH

Harry Mantheakis
London, UK


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: replacing ROOT

Posted by Gene Volovich <gv...@cite.com>.
This reminds me that we've been having a lot of issues with Tomcat 
caching (refusing to recompile) changed JSP files.  Not sure if there's 
a bug on it, but it stinks having to restart the whole container 
sometimes, just for a small JSP change.   This problem seems to have 
gotten worse if anything in Tomcat 5.0.x.

Gene

On Mar 23, 2005, at 8:37 AM, Andreas Andersson wrote:

> Gene Volovich wrote:
>> Whooaa... You mean you can't do
>> <!--
>>     <Context whatever...>
>> -->
>
> The above is correct, it works this way.
>
>> This sounds very fishy to me.  I've been using that in my server.xml 
>> file forever.  In any case, this is XML, so I don't see why this 
>> would be a problem.  I suspect that the original poster's problem, if 
>> this is a Tomcat 5.x issue and not tomcat 4, has to do with problems 
>> in the ../conf/Catalina/<hostname>/<context>.xml file, which if 
>> you're upgrading from Tomcat 4, you might not think about.
>
> I'm running tomcat 4.1.31 and just solved the problem. It's part my 
> fault, part a stupid way of tomcat to handle compiled jsp.
>
> After installing my own app under / tomcat refused to recompile the 
> .jsp and showed the old page all the time. Not until I removed all the 
> .class-files I got it to work. This was a hard nut to crack, to me 
> it's completly illogical that tomcat doesn't recompile the files :)
>
> Thanks everyhone for the help.
>
>
> -- 
> Andreas Andersson
> IT Dept.
> Travelstart Nordic
> andreas@travelstart.se
> http://www.travelstart.se
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: replacing ROOT

Posted by Andreas Andersson <an...@travelstart.se>.
Gene Volovich wrote:
> Whooaa... You mean you can't do
> 
> <!--
>     <Context whatever...>
> -->

The above is correct, it works this way.

> This sounds very fishy to me.  I've been using that in my server.xml 
> file forever.  In any case, this is XML, so I don't see why this would 
> be a problem.  I suspect that the original poster's problem, if this is 
> a Tomcat 5.x issue and not tomcat 4, has to do with problems in the 
> ../conf/Catalina/<hostname>/<context>.xml file, which if you're 
> upgrading from Tomcat 4, you might not think about.

I'm running tomcat 4.1.31 and just solved the problem. It's part my 
fault, part a stupid way of tomcat to handle compiled jsp.

After installing my own app under / tomcat refused to recompile the .jsp 
and showed the old page all the time. Not until I removed all the 
.class-files I got it to work. This was a hard nut to crack, to me it's 
completly illogical that tomcat doesn't recompile the files :)

Thanks everyhone for the help.


-- 
Andreas Andersson
IT Dept.
Travelstart Nordic
andreas@travelstart.se
http://www.travelstart.se

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: replacing ROOT

Posted by Gene Volovich <gv...@cite.com>.
Whooaa... You mean you can't do

<!--
     <Context whatever...>
-->

This sounds very fishy to me.  I've been using that in my server.xml 
file forever.  In any case, this is XML, so I don't see why this would 
be a problem.  I suspect that the original poster's problem, if this is 
a Tomcat 5.x issue and not tomcat 4, has to do with problems in the 
../conf/Catalina/<hostname>/<context>.xml file, which if you're 
upgrading from Tomcat 4, you might not think about.

Gene


On Mar 23, 2005, at 7:48 AM, Rajesh Bagade wrote:

> Comment for context should start from same line where context line 
> starts.
> It should be as follows
> <!-- <Context path="" docBase="ROOT" debug="0"/> -->
>
> --Rajesh Bagade
>
> -----Original Message-----
> From: Andreas Andersson [mailto:andreas@travelstart.se]
> Sent: Wednesday, March 23, 2005 5:33 PM
> To: Tomcat Users List
> Subject: Re: replacing ROOT
>
> Rajesh Bagade wrote:
>
>> In server.xml just comment original root context entry, and write 
>> your new
>> context.
>
> The weird think is that that context is already commented and has been
> so since I installed tomcat. It looks like this.
>
>          <!-- Tomcat Root Context -->
>          <!--
>            <Context path="" docBase="ROOT" debug="0"/>
>          -->
>
> When are the xml-files from /webapps read?
>
>
> --
> Andreas Andersson
> IT Dept.
> Travelstart Nordic
> andreas@travelstart.se
> http://www.travelstart.se
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 3/18/2005
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 3/18/2005
>
>
> --------------------------------------
> iota technologies limited, pune, india
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: replacing ROOT

Posted by David Smith <dn...@cornell.edu>.
Comments in xml can start anywhere on or above the line you want 
commented out and end anywhere after.  New lines are treated as 
whitespace and have no meaning when parsed.

<!--
  <Context .....>.....</Context>
-->

is just as valid as

<!-- <Context....>....</Context> -->

Comments can't be nested, but that's a whole different ball of wax.

--David

Rajesh Bagade wrote:

>Comment for context should start from same line where context line starts.
>It should be as follows
><!-- <Context path="" docBase="ROOT" debug="0"/> -->
>
>--Rajesh Bagade
>
>-----Original Message-----
>From: Andreas Andersson [mailto:andreas@travelstart.se]
>Sent: Wednesday, March 23, 2005 5:33 PM
>To: Tomcat Users List
>Subject: Re: replacing ROOT
>
>Rajesh Bagade wrote:
>
>  
>
>>In server.xml just comment original root context entry, and write your new
>>context.
>>    
>>
>
>The weird think is that that context is already commented and has been
>so since I installed tomcat. It looks like this.
>
>         <!-- Tomcat Root Context -->
>         <!--
>           <Context path="" docBase="ROOT" debug="0"/>
>         -->
>
>When are the xml-files from /webapps read?
>
>
>--
>Andreas Andersson
>IT Dept.
>Travelstart Nordic
>andreas@travelstart.se
>http://www.travelstart.se
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>--
>No virus found in this incoming message.
>Checked by AVG Anti-Virus.
>Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 3/18/2005
>
>--
>No virus found in this outgoing message.
>Checked by AVG Anti-Virus.
>Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 3/18/2005
>
>
>--------------------------------------
>iota technologies limited, pune, india
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: replacing ROOT

Posted by Rajesh Bagade <ra...@iotasoft.com>.
Comment for context should start from same line where context line starts.
It should be as follows
<!-- <Context path="" docBase="ROOT" debug="0"/> -->

--Rajesh Bagade

-----Original Message-----
From: Andreas Andersson [mailto:andreas@travelstart.se]
Sent: Wednesday, March 23, 2005 5:33 PM
To: Tomcat Users List
Subject: Re: replacing ROOT

Rajesh Bagade wrote:

> In server.xml just comment original root context entry, and write your new
> context.

The weird think is that that context is already commented and has been
so since I installed tomcat. It looks like this.

         <!-- Tomcat Root Context -->
         <!--
           <Context path="" docBase="ROOT" debug="0"/>
         -->

When are the xml-files from /webapps read?


--
Andreas Andersson
IT Dept.
Travelstart Nordic
andreas@travelstart.se
http://www.travelstart.se

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 3/18/2005

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 3/18/2005


--------------------------------------
iota technologies limited, pune, india


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: replacing ROOT

Posted by Andreas Andersson <an...@travelstart.se>.
Rajesh Bagade wrote:

> In server.xml just comment original root context entry, and write your new
> context.

The weird think is that that context is already commented and has been 
so since I installed tomcat. It looks like this.

         <!-- Tomcat Root Context -->
         <!--
           <Context path="" docBase="ROOT" debug="0"/>
         -->

When are the xml-files from /webapps read?


-- 
Andreas Andersson
IT Dept.
Travelstart Nordic
andreas@travelstart.se
http://www.travelstart.se

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: replacing ROOT

Posted by Rajesh Bagade <ra...@iotasoft.com>.
Hello,

In server.xml just comment original root context entry, and write your new
context.
Eg.-
	Original Entry -
        <!--<Context path="" docBase="webapps/ROOT" debug="0"
reloadable="true" >
        </Context>-->
	New Entry -
<Context path="/" docBase="<physical path for source files>" debug="0"
reloadable="true" >
        </Context>

-- Rajesh Bagade

-----Original Message-----
From: Andreas Andersson [mailto:andreas@travelstart.se]
Sent: Wednesday, March 23, 2005 3:31 PM
To: tomcat-user@jakarta.apache.org
Subject: replacing ROOT

Hi!

I'm probably just stupid but I fail to replace the ROOT-context with my
own application.

I've tried to put path="/" and path="" but nothing of those override the
default ROOT-context.

I've also seen in server.xml that the part that would define ROOT is
commented out.

This is tomcat 4.1.31.

Any ideas?
--
Andreas Andersson
IT Dept.
Travelstart Nordic
andreas@travelstart.se
http://www.travelstart.se

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 3/18/2005

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 3/18/2005


--------------------------------------
iota technologies limited, pune, india


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org