You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael <mi...@idtect.com> on 2002/08/21 08:59:55 UTC

Can someone explain catalina.home & catalina.base?

I've searched everywhere and can only find conflicting information about
these properties.  Basically I want to deploy my webapp without
modifying ANY files under the CATALINE_HOME directory (where I installed
Tomcat).  I've tried every combination of catalina.home & catalina.base
and cannot get it to pick up my server.xml and tomcat-users.xml files.

I'm using Tomcat 4.0.4

Thanks
Michael


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


RE : RE : RE : Can someone explain catalina.home & catalina.base?

Posted by Michael <mi...@idtect.com>.
I upgraded to Tomcat 4.1.9 beta to see if that made a difference.  I
also changed my JDK from 1.4.1beta to 1.3.1.  This didn't change
anything.  Then I found a post in the mailing list archives:

http://marc.theaimsgroup.com/?l=tomcat-user&m=102278697817471&w=2

Which suggested creating a temp directory in my catalina.base directory.
So I tried this.  Now I am past the JAR file errors.  In fact, in the
logfile there are no errors at all:

2002-08-21 15:04:33 StandardContext[/oemserver]: Starting filters
2002-08-21 15:04:33 timerservlet: init
2002-08-21 15:04:33 action: init
2002-08-21 15:04:33 StandardContext[/oemserver]: Starting completed
2002-08-21 15:04:33 HostConfig[localhost]: HostConfig: Processing START
2002-08-21 15:04:33 HostConfig[localhost]: Deploying discovered web
applications
2002-08-21 15:04:33 HostConfig[localhost]:  Starting background thread
2002-08-21 15:04:34 HostConfig[localhost]: BACKGROUND THREAD Starting
2002-08-21 15:04:49 HostConfig[localhost]: Deploying discovered web
applications

I see the output in console from my timerservlet so I know everything is
OK there.  I then try to access the URL:

HTTP Status 404 - /oemserver/login.jsp
------------------------------------------------------------------------
--------
type Status report
message /oemserver/login.jsp
description The requested resource (/oemserver/login.jsp) is not
available.
------------------------------------------------------------------------
--------
Apache Tomcat/4.1.9

I look in the log file:

2002-08-21 15:01:18 StandardHost[localhost]: Mapping request URI
'/oemserver/login.jsp'
2002-08-21 15:01:18 StandardHost[localhost]:   Trying the longest
context path prefix
2002-08-21 15:01:18 StandardHost[localhost]:  Mapped to context
'/oemserver'
2002-08-21 15:01:18 Authenticator[/oemserver]: Security checking request
GET /oemserver/login.jsp
2002-08-21 15:01:18 Authenticator[/oemserver]:   Checking constraint
'SecurityConstraint[Test 1]' against GET /login.jsp --> false
2002-08-21 15:01:18 Authenticator[/oemserver]:   No applicable
constraint located
2002-08-21 15:01:18 Authenticator[/oemserver]:  Not subject to any
constraint
2002-08-21 15:01:18 StandardContext[/oemserver]: Mapping
contextPath='/oemserver' with requestURI='/oemserver/login.jsp' and
relativeURI='/login.jsp'
2002-08-21 15:01:18 StandardContext[/oemserver]:   Trying exact match
2002-08-21 15:01:18 StandardContext[/oemserver]:   Trying prefix match
2002-08-21 15:01:18 StandardContext[/oemserver]:   Trying extension
match
2002-08-21 15:01:18 StandardContext[/oemserver]:   Trying default
match2002-08-21 15:01:20 HostConfig[localhost]: Deploying discovered web
applications

This part is confusing:

2002-08-21 15:01:18 StandardContext[/oemserver]:   Trying exact match
2002-08-21 15:01:18 StandardContext[/oemserver]:   Trying prefix match
2002-08-21 15:01:18 StandardContext[/oemserver]:   Trying extension
match
2002-08-21 15:01:18 StandardContext[/oemserver]:   Trying default match

I don't know what that means.  But overall, there are no errors and it
does not work.  At this point I'm convinced I've stumbled upon a bug.  I
appreciate any help you may have.

Michael


> -----Original Message-----
> From: Michael [mailto:michael@idtect.com] 
> Sent: Wednesday, August 21, 2002 12:31 PM
> To: 'Tomcat Users List'
> Subject: RE : RE : Can someone explain catalina.home & catalina.base?
> 
> 
> My web app directory is physically residing in 
> c:\idtect\projects\oemserver\web, which is what i defined in 
> the server.xml for the context docBase.  I think the 
> catalina.base is set properly, because it is finding my 
> server.xml and tomcat-users.xml files, as well as it's 
> logging to the appropriate directory.  It's just a problem 
> with the webapp context.
> 
> And again, if I put catalina.base back to the tomcat install 
> directory and use the -config command line parameter to 
> specify my server.xml, it works fine.  The reason this isn't 
> acceptable is because then it loads tomcat-users.xml from the 
> tomcat install directory.  I suppose if I switch to JDBC 
> security I won't have this problem. ;)
>  
> I think this may be a bug in Tomcat but it seems to be a 
> common thing to do so I'm suprised I'm the only one having 
> this problem.
> 
> Michael
> 
> 
> > -----Original Message-----
> > From: Jhair Tocancipa Triana [mailto:jhair_tocancipa@icon-scm.com]
> > Sent: Wednesday, August 21, 2002 11:52 AM
> > To: Tomcat Users List
> > Subject: Re: RE : Can someone explain catalina.home & catalina.base?
> > 
> > 
> >     -> Server.xml contains:
> > 
> >     ->         <Context reloadable="true" debug="10"
> >     -> docBase="c:\idtect\projects\oemserver\web" 
> path="/oemserver" />
> > 
> >     -> I then go to DOS and type:
> > 
> >     -> C:\>%CATALINA_HOME%\bin\startup Using CATALINA_BASE:
> >     -> c:\idtect\projects\oemserver\conf\tomcat Using CATALINA_HOME:
> >     -> c:\devapps\tomcat Using CATALINA_TMPDIR:
> >     -> c:\idtect\projects\oemserver\conf\tomcat\temp Using 
> JAVA_HOME:
> >     -> C:\devapps\j2sdk1.4.1 C:\>
> > 
> > The documentation says ($CATALINA_HOME/Running.txt):
> > 
> > "
> > When you do this, Tomcat 4 will calculate all relative
> > references for files in the following directories based on 
> > the value for CATALINA_BASE instead of
> > CATALINA_HOME:
> > * conf - Server configuration files (including server.xml)
> > * logs - Log and output files
> > * webapps - Automatically loaded web applications
> > * work - Temporary working directories for web applications
> > "
> > 
> > Does your webapp reside on:
> > "c:\idtect\projects\oemserver\conf\tomcat"?
> > 
> > In your Context, docbase is defined as:
> > 
> > "c:\idtect\projects\oemserver\web"
> > 
> > Seems like CATALINA_BASE was not properly defined.
> > 
> > Regards,
> > 
> > --
> > --Jhair


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


RE : RE : Can someone explain catalina.home & catalina.base?

Posted by Michael <mi...@idtect.com>.
My web app directory is physically residing in
c:\idtect\projects\oemserver\web, which is what i defined in the
server.xml for the context docBase.  I think the catalina.base is set
properly, because it is finding my server.xml and tomcat-users.xml
files, as well as it's logging to the appropriate directory.  It's just
a problem with the webapp context.

And again, if I put catalina.base back to the tomcat install directory
and use the -config command line parameter to specify my server.xml, it
works fine.  The reason this isn't acceptable is because then it loads
tomcat-users.xml from the tomcat install directory.  I suppose if I
switch to JDBC security I won't have this problem. ;)
 
I think this may be a bug in Tomcat but it seems to be a common thing to
do so I'm suprised I'm the only one having this problem.

Michael


> -----Original Message-----
> From: Jhair Tocancipa Triana [mailto:jhair_tocancipa@icon-scm.com] 
> Sent: Wednesday, August 21, 2002 11:52 AM
> To: Tomcat Users List
> Subject: Re: RE : Can someone explain catalina.home & catalina.base?
> 
> 
>     -> Server.xml contains:
> 
>     ->         <Context reloadable="true" debug="10"
>     -> docBase="c:\idtect\projects\oemserver\web" path="/oemserver" />
> 
>     -> I then go to DOS and type:
> 
>     -> C:\>%CATALINA_HOME%\bin\startup Using CATALINA_BASE:
>     -> c:\idtect\projects\oemserver\conf\tomcat Using CATALINA_HOME:
>     -> c:\devapps\tomcat Using CATALINA_TMPDIR:
>     -> c:\idtect\projects\oemserver\conf\tomcat\temp Using JAVA_HOME:
>     -> C:\devapps\j2sdk1.4.1 C:\>
> 
> The documentation says ($CATALINA_HOME/Running.txt):
> 
> "
> When you do this, Tomcat 4 will calculate all relative 
> references for files in the following directories based on 
> the value for CATALINA_BASE instead of
> CATALINA_HOME:
> * conf - Server configuration files (including server.xml)
> * logs - Log and output files
> * webapps - Automatically loaded web applications
> * work - Temporary working directories for web applications
> "
> 
> Does your webapp reside on: 
> "c:\idtect\projects\oemserver\conf\tomcat"?
> 
> In your Context, docbase is defined as:
> 
> "c:\idtect\projects\oemserver\web"
> 
> Seems like CATALINA_BASE was not properly defined.
> 
> Regards,
> 
> --
> --Jhair
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <ma...@jakarta.apache.org>
> 


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


Re: RE : Can someone explain catalina.home & catalina.base?

Posted by Jhair Tocancipa Triana <jh...@icon-scm.com>.
    -> Server.xml contains:

    ->         <Context reloadable="true" debug="10"
    -> docBase="c:\idtect\projects\oemserver\web" path="/oemserver" />

    -> I then go to DOS and type:

    -> C:\>%CATALINA_HOME%\bin\startup Using CATALINA_BASE:
    -> c:\idtect\projects\oemserver\conf\tomcat Using CATALINA_HOME:
    -> c:\devapps\tomcat Using CATALINA_TMPDIR:
    -> c:\idtect\projects\oemserver\conf\tomcat\temp Using JAVA_HOME:
    -> C:\devapps\j2sdk1.4.1 C:\>

The documentation says ($CATALINA_HOME/Running.txt):

"
When you do this, Tomcat 4 will calculate all relative references for files in
the following directories based on the value for CATALINA_BASE instead of
CATALINA_HOME:
* conf - Server configuration files (including server.xml)
* logs - Log and output files
* webapps - Automatically loaded web applications
* work - Temporary working directories for web applications
"

Does your webapp reside on: "c:\idtect\projects\oemserver\conf\tomcat"?

In your Context, docbase is defined as:

"c:\idtect\projects\oemserver\web"

Seems like CATALINA_BASE was not properly defined.

Regards,

--
--Jhair



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


RE : Can someone explain catalina.home & catalina.base?

Posted by Michael <mi...@idtect.com>.
>      > Basically I want to deploy
>      > my webapp without modifying ANY files under the CATALINE_HOME
>      > directory (where I installed Tomcat).  
> 
> Which  directories do  you have  under CATALINA_BASE?  Is  
> your webapp under CATALINA_BASE or under CATALINA_HOME?
> 
> Please  take  a  look at  the  RUNNING.txt  (Point  (4)) file 
>  in  the CATALINA_HOME directory.

Ok, here is a lot more detail with what I've tried.  I've spent hours on
this to no avail so I greatly appreciate your help.

Server.xml contains:

        <Context reloadable="true"
                 debug="10"
                 docBase="c:\idtect\projects\oemserver\web"
                 path="/oemserver"
                 />

I then go to DOS and type:

C:\>%CATALINA_HOME%\bin\startup
Using CATALINA_BASE:   c:\idtect\projects\oemserver\conf\tomcat
Using CATALINA_HOME:   c:\devapps\tomcat
Using CATALINA_TMPDIR: c:\idtect\projects\oemserver\conf\tomcat\temp
Using JAVA_HOME:       C:\devapps\j2sdk1.4.1
C:\>

This starts up Tomcat.  I know it's finding my web.xml because it is
starting up a servlet and I see the servlet's output.  The problem is I
cannot access my webapp with the /oemserver URL in the browser.  

I try : 

http://localhost:8080/oemserver/

And receive : 

Apache Tomcat/4.0.4 - HTTP Status 404 - /oemserver/
------------------------------------------------------------------------
--------
type Status report
message /oemserver/
description The requested resource (/oemserver/) is not available.
------------------------------------------------------------------------
--------
 
In the access log I see:

127.0.0.1 - - [21/Aug/2002:11:23:00 1000] "GET /oemserver/ HTTP/1.1" 404
606

I have the debug levels to "10" and in the localhost_log.txt I get the
following error for EVERY ONE of my jar files in my WEB-INF/lib
directory:

2002-08-21 11:14:00 ContextConfig[/oemserver]:
tldConfigJar(/WEB-INF/lib/struts.jar): java.io.IOException: Le chemin
d'acces specifie est introuvable

The error message in english says "the path specified does not exist".
This I don't understand because my JAR's are in the WEB-INF/lib
directory.  Later in the localhost_log.txt I see:

2002-08-21 11:14:01 action: init
2002-08-21 11:14:01 timerservlet: init
2002-08-21 11:14:01 StandardContext[/oemserver]: Starting completed

Which tells me the struts servlet initialized, my custom servlet
initialized, and the oemserver webapp is started.  But why can't I
access the webapp in the browser???

I tried deploying the /examples webapp but although I do not get the
problem with the JARs I still get the 404 errors when I try to access
the page.

Finally, if I set CATALINA_HOME & CATALINA_BASE back to the tomcat
installation directory, I can use -config <path to my server.xml> and my
webapp works fine.  So that tells me my server.xml and web.xml are OK.

Thanks for your help!
Michael


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


Re: Can someone explain catalina.home & catalina.base?

Posted by Jhair Tocancipa Triana <jh...@icon-scm.com>.
>>>>> " " == Michael  <mi...@idtect.com> writes:

     > I've searched everywhere and can only find conflicting
     > information about these properties.  

Could you be more specific?

     > Basically I want to deploy
     > my webapp without modifying ANY files under the CATALINE_HOME
     > directory (where I installed Tomcat).  

Which  directories do  you have  under CATALINA_BASE?  Is  your webapp
under CATALINA_BASE or under CATALINA_HOME?

Please  take  a  look at  the  RUNNING.txt  (Point  (4)) file  in  the
CATALINA_HOME directory.

Thanks,




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


Stopping application installation?

Posted by Mark O'Driscoll <ma...@eircom.net>.
I want to stop the installation of an application under certain conditions.

I have a servlet that is loaded on startup and I check some things in its
init() method. I want to be able to disable the application at this point.
Throwing a ServletException in the init() doesn't seem to work.

Question is: How does one stop the installation of an application?

Tomcat 4.0.3 standalone with jdk1.4 on Solaris8.

TIA

- Mark


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