You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bill Shaffer <bi...@hotmail.com> on 2008/08/13 17:25:33 UTC

How to set jvmRoute outside of server.xml

Hi:
 
I am trying to find a way to set the jvmRoute without putting it in my server.xml.  I'm using 6.0.18.  I've found a couple of things:

The Tomcat config reference System Properties section says I can set it on the java command line with a -DjvmRoute option.  This did not work.

Another source on the web said that I could set a -D option on the command line and then reference that as a variable within server.xml (java ... -Doption=value ..., and then in server.xml, jvmRoute="${option}".  This did not work either.

By testing to see if it works I'm going to the servlet examples and inspecting the Session ID in the Sessions Example.

Any help would be greatly appreciated.

Bill


_________________________________________________________________
Reveal your inner athlete and share it with friends on Windows Live.
http://revealyourinnerathlete.windowslive.com?locale=en-us&ocid=TXT_TAGLM_WLYIA_whichathlete_us
---------------------------------------------------------------------
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: How to set jvmRoute outside of server.xml

Posted by Bill Shaffer <bi...@hotmail.com>.
Mark:
 
Okay, I feel like an idiot.  I did some more testing after your comments and found that I was probably hitting a cache problem in my browser.  Both methods I that I tried yesterday seem to work find today when I close my browser with each restart.
 
Sorry for wasting resources...
 
Bill> Date: Wed, 13 Aug 2008 17:24:52 +0100> From: markt@apache.org> To: users@tomcat.apache.org> Subject: Re: How to set jvmRoute outside of server.xml> > Bill Shaffer wrote:> > Hi:> > > > I am trying to find a way to set the jvmRoute without putting it in my server.xml. I'm using 6.0.18. I've found a couple of things:> > > > The Tomcat config reference System Properties section says I can set it on the java command line with a -DjvmRoute option. This did not work.> > > > Another source on the web said that I could set a -D option on the command line and then reference that as a variable within server.xml (java ... -Doption=value ..., and then in server.xml, jvmRoute="${option}". This did not work either.> > Given that both these options should work, it sounds like you are not > setting JAVA_OPTS properly. How are you setting this at the moment?> > Mark> > > > ---------------------------------------------------------------------> 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> 
_________________________________________________________________
Get more from your digital life.  Find out how.
http://www.windowslive.com/default.html?ocid=TXT_TAGLM_WL_Home2_082008

Re: How to set jvmRoute outside of server.xml

Posted by Mark Thomas <ma...@apache.org>.
Bill Shaffer wrote:
> Hi:
>  
> I am trying to find a way to set the jvmRoute without putting it in my server.xml.  I'm using 6.0.18.  I've found a couple of things:
> 
> The Tomcat config reference System Properties section says I can set it on the java command line with a -DjvmRoute option.  This did not work.
> 
> Another source on the web said that I could set a -D option on the command line and then reference that as a variable within server.xml (java ... -Doption=value ..., and then in server.xml, jvmRoute="${option}".  This did not work either.

Given that both these options should work, it sounds like you are not 
setting JAVA_OPTS properly. How are you setting this at the moment?

Mark



---------------------------------------------------------------------
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: How to set jvmRoute outside of server.xml

Posted by Bill Shaffer <bi...@hotmail.com>.
Martin:
 
Yes, I am running more than one tomcat in a load balanced environment, and am trying to do so with a shared config file, as the jvmroute is the only thing that changes in the server.xml.  I was hoping to find a way to specify the jvmroute parameter other than in the Engine config (or elsewhere in the config file).  If I can use a command line system property, then I can modify the start script to pass unique jvmroutes and keep the configs the same across instances (makes management a bit easier).
 
Bill> From: mgainty@hotmail.com> To: users@tomcat.apache.org> Subject: RE: How to set jvmRoute outside of server.xml> Date: Wed, 13 Aug 2008 12:00:30 -0400> > > Bill-> > jvmRoute is an Engine Config parameter > Are you running more than 1 tomcat?> http://raibledesigns.com/tomcat/> > Martin > ______________________________________________ > Disclaimer and confidentiality note > Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > > > > From: billshaf@hotmail.com> > To: users@tomcat.apache.org> > Subject: How to set jvmRoute outside of server.xml> > Date: Wed, 13 Aug 2008 08:25:33 -0700> > > > > > Hi:> > > > I am trying to find a way to set the jvmRoute without putting it in my server.xml. I'm using 6.0.18. I've found a couple of things:> > > > The Tomcat config reference System Properties section says I can set it on the java command line with a -DjvmRoute option. This did not work.> > > > Another source on the web said that I could set a -D option on the command line and then reference that as a variable within server.xml (java ... -Doption=value ..., and then in server.xml, jvmRoute="${option}". This did not work either.> > > > By testing to see if it works I'm going to the servlet examples and inspecting the Session ID in the Sessions Example.> > > > Any help would be greatly appreciated.> > > > Bill> > > > > > _________________________________________________________________> > Reveal your inner athlete and share it with friends on Windows Live.> > http://revealyourinnerathlete.windowslive.com?locale=en-us&ocid=TXT_TAGLM_WLYIA_whichathlete_us> > ---------------------------------------------------------------------> > 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> > > > _________________________________________________________________> Got Game? Win Prizes in the Windows Live Hotmail Mobile Summer Games Trivia Contest> http://www.gowindowslive.com/summergames?ocid=TXT_TAGHM
_________________________________________________________________
Get more from your digital life.  Find out how.
http://www.windowslive.com/default.html?ocid=TXT_TAGLM_WL_Home2_082008

RE: How to set jvmRoute outside of server.xml

Posted by Martin Gainty <mg...@hotmail.com>.
Bill-

jvmRoute is an Engine Config parameter 
Are you running more than 1 tomcat?
http://raibledesigns.com/tomcat/

Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 


> From: billshaf@hotmail.com
> To: users@tomcat.apache.org
> Subject: How to set jvmRoute outside of server.xml
> Date: Wed, 13 Aug 2008 08:25:33 -0700
> 
> 
> Hi:
>  
> I am trying to find a way to set the jvmRoute without putting it in my server.xml.  I'm using 6.0.18.  I've found a couple of things:
> 
> The Tomcat config reference System Properties section says I can set it on the java command line with a -DjvmRoute option.  This did not work.
> 
> Another source on the web said that I could set a -D option on the command line and then reference that as a variable within server.xml (java ... -Doption=value ..., and then in server.xml, jvmRoute="${option}".  This did not work either.
> 
> By testing to see if it works I'm going to the servlet examples and inspecting the Session ID in the Sessions Example.
> 
> Any help would be greatly appreciated.
> 
> Bill
> 
> 
> _________________________________________________________________
> Reveal your inner athlete and share it with friends on Windows Live.
> http://revealyourinnerathlete.windowslive.com?locale=en-us&ocid=TXT_TAGLM_WLYIA_whichathlete_us
> ---------------------------------------------------------------------
> 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
> 

_________________________________________________________________
Got Game? Win Prizes in the Windows Live Hotmail Mobile Summer Games Trivia Contest
http://www.gowindowslive.com/summergames?ocid=TXT_TAGHM

Re: How to change Default URL to point to my application index.html page

Posted by Guojun Zhu <zg...@gmail.com>.
I am sorry.  If there is no ROOT.xml, Tomcat will use the default and you
just need to do as Ken said.  Or you can create the ROOT.xml in the
$Catalina.home/conf/Catalina/(your host)/ROOT.xml.  Put <Context path=""
docBase="${catalina.home}/webapps/(your application path)"/> in the file.


On Sun, Aug 17, 2008 at 2:12 PM, flytoarun <fl...@yahoo.com> wrote:

> Hi Guojun,
>
> I have 2 files under path
> /apache-tomcat-5.5.25/conf/Catalina/localhost
> host-manager.xml
> manager.xml
>
> i don't have ROOT.xml.
>
>
>
>
> --- On Mon, 8/18/08, Guojun Zhu <zg...@gmail.com> wrote:
>
> > From: Guojun Zhu <zg...@gmail.com>
> > Subject: Re: How to change Default URL to point to my application
> index.html page
> > To: "Tomcat Users List" <us...@tomcat.apache.org>, flytoarun@yahoo.com
> > Date: Monday, August 18, 2008, 12:31 AM
> > you can change the $Catalina.home/conf/Catalina/(your
> > host)/ROOT.xml file to
> > direct to your webapp path instead of the ROOT.
> >
> > On Sun, Aug 17, 2008 at 1:36 PM, flytoarun
> > <fl...@yahoo.com> wrote:
> >
> > > Hi All,
> > >
> > > I am using tomcat 5 version and my application's
> > default page is
> > > www.domain.com\myDir\index.html which works
> > fine when i enter full path
> > > however when i enter www.domain.com then the tomcat
> > default server page
> > > opens. I want to change this default page by my
> > application index.html
> > > (Default page).
> > >
> > > Can some one help me.
> > >
> > > I have tried few things but didn't work. Like
> > adding entries in server.xml
> > > and web.xml
> > >
> > > Thanks in advance.
> > >
> > >
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > 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
> > >
> > >
>
>
>
>
> ---------------------------------------------------------------------
> 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: How to change Default URL to point to my application index.html page

Posted by André Warnier <aw...@ice-sa.com>.
Guojun Zhu wrote:
> you can change the $Catalina.home/conf/Catalina/(your host)/ROOT.xml file to
> direct to your webapp path instead of the ROOT.

Or, if I have correctly understood many previous posts to this forum, 
you can delete the ROOT default application and put yours there instead.
A guru here can confirm that, I suppose.


---------------------------------------------------------------------
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: How to change Default URL to point to my application index.html page

Posted by flytoarun <fl...@yahoo.com>.
Hi Guojun,

I have 2 files under path 
/apache-tomcat-5.5.25/conf/Catalina/localhost 
host-manager.xml 
manager.xml 

i don't have ROOT.xml.




--- On Mon, 8/18/08, Guojun Zhu <zg...@gmail.com> wrote:

> From: Guojun Zhu <zg...@gmail.com>
> Subject: Re: How to change Default URL to point to my application index.html page
> To: "Tomcat Users List" <us...@tomcat.apache.org>, flytoarun@yahoo.com
> Date: Monday, August 18, 2008, 12:31 AM
> you can change the $Catalina.home/conf/Catalina/(your
> host)/ROOT.xml file to
> direct to your webapp path instead of the ROOT.
> 
> On Sun, Aug 17, 2008 at 1:36 PM, flytoarun
> <fl...@yahoo.com> wrote:
> 
> > Hi All,
> >
> > I am using tomcat 5 version and my application's
> default page is
> > www.domain.com\myDir\index.html which works
> fine when i enter full path
> > however when i enter www.domain.com then the tomcat
> default server page
> > opens. I want to change this default page by my
> application index.html
> > (Default page).
> >
> > Can some one help me.
> >
> > I have tried few things but didn't work. Like
> adding entries in server.xml
> > and web.xml
> >
> > Thanks in advance.
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > 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
> >
> >


      

---------------------------------------------------------------------
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: How to change Default URL to point to my application index.html page

Posted by Guojun Zhu <zg...@gmail.com>.
you can change the $Catalina.home/conf/Catalina/(your host)/ROOT.xml file to
direct to your webapp path instead of the ROOT.

On Sun, Aug 17, 2008 at 1:36 PM, flytoarun <fl...@yahoo.com> wrote:

> Hi All,
>
> I am using tomcat 5 version and my application's default page is
> www.domain.com\myDir\index.html which works fine when i enter full path
> however when i enter www.domain.com then the tomcat default server page
> opens. I want to change this default page by my application index.html
> (Default page).
>
> Can some one help me.
>
> I have tried few things but didn't work. Like adding entries in server.xml
> and web.xml
>
> Thanks in advance.
>
>
>
>
> ---------------------------------------------------------------------
> 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: How to change Default URL to point to my application index.html page

Posted by Ken Bowen <kb...@als.com>.
If you are uploading your application (myapp) to Tomcat's webapps  
folder as a war (myapp.war), do two things:
1.  Delete webapps/ROOT ;
2.  Rename myapp.war to ROOT.war  (case is important), and then upload  
it to webapps.

On Aug 17, 2008, at 2:36 PM, flytoarun wrote:

> Hi All,
>
> I am using tomcat 5 version and my application's default page is www.domain.com 
> \myDir\index.html which works fine when i enter full path however  
> when i enter www.domain.com then the tomcat default server page  
> opens. I want to change this default page by my application  
> index.html (Default page).
>
> Can some one help me.
>
> I have tried few things but didn't work. Like adding entries in  
> server.xml and web.xml
>
> Thanks in advance.
>
>
>
>
> ---------------------------------------------------------------------
> 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
>


---------------------------------------------------------------------
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


How to change Default URL to point to my application index.html page

Posted by flytoarun <fl...@yahoo.com>.
Hi All,

I am using tomcat 5 version and my application's default page is www.domain.com\myDir\index.html which works fine when i enter full path however when i enter www.domain.com then the tomcat default server page opens. I want to change this default page by my application index.html (Default page).

Can some one help me.

I have tried few things but didn't work. Like adding entries in server.xml and web.xml

Thanks in advance.


      

---------------------------------------------------------------------
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: How to set jvmRoute outside of server.xml

Posted by Rainer Jung <ra...@kippdata.de>.
Reply to self: I'm dumb. Didn't read through all of the threads before 
answering, and by reading the other answers I learned, that -DjvmRoute 
is actually supposed to work too, which is confirmed by the 
StandardEngine class. Oh well ...

Regards,

Rainer

Rainer Jung schrieb:
> Bill Shaffer schrieb:
>> Hi:
>>
>> I am trying to find a way to set the jvmRoute without putting it in
>> my server.xml.  I'm using 6.0.18.  I've found a couple of things:
>>
>> The Tomcat config reference System Properties section says I can set
>> it on the java command line with a -DjvmRoute option.  This did not
>> work.
> 
> It will not, except as a special case to your next example.
> 
>> Another source on the web said that I could set a -D option on the
>> command line and then reference that as a variable within server.xml
>> (java ... -Doption=value ..., and then in server.xml,
>> jvmRoute="${option}".  This did not work either.
> 
> This should really work. Maybe when editing server.xml and replacing the 
> jvmRoute value with your ${option} you didn't notice, that the config 
> line using jvmRoute in server.xml by default is only a comment?
> 
>> By testing to see if it works I'm going to the servlet examples and
>> inspecting the Session ID in the Sessions Example.
> 
> You test is fine.
> 
>> Any help would be greatly appreciated.
> 
> You could also look at the system properties from inside any of your 
> JSPs or servlet to make sure, that the system property "option" actually 
> has been set correctly by your start script.
> 
> Regards,
> 
> Rainer

---------------------------------------------------------------------
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: How to set jvmRoute outside of server.xml

Posted by Rainer Jung <ra...@kippdata.de>.
Bill Shaffer schrieb:
> Hi:
> 
> I am trying to find a way to set the jvmRoute without putting it in
> my server.xml.  I'm using 6.0.18.  I've found a couple of things:
> 
> The Tomcat config reference System Properties section says I can set
> it on the java command line with a -DjvmRoute option.  This did not
> work.

It will not, except as a special case to your next example.

> Another source on the web said that I could set a -D option on the
> command line and then reference that as a variable within server.xml
> (java ... -Doption=value ..., and then in server.xml,
> jvmRoute="${option}".  This did not work either.

This should really work. Maybe when editing server.xml and replacing the 
jvmRoute value with your ${option} you didn't notice, that the config 
line using jvmRoute in server.xml by default is only a comment?

> By testing to see if it works I'm going to the servlet examples and
> inspecting the Session ID in the Sessions Example.

You test is fine.

> Any help would be greatly appreciated.

You could also look at the system properties from inside any of your 
JSPs or servlet to make sure, that the system property "option" actually 
has been set correctly by your start script.

Regards,

Rainer

---------------------------------------------------------------------
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