Problems configuring a <Context> path="xx" on Apache/Tomcat

  • Thread starter =?iso-8859-1?B?UmVu6SBTY2hhZGU=?=
  • Start date
?

=?iso-8859-1?B?UmVu6SBTY2hhZGU=?=

Hi All

I'm running Apache 2.0, Tomcat 5.5.17, jdk 1.5

I'm upgrading from Apache 1.3 Tomcat 3.* jdk 1.4

In my Apache log file I have the following:

JkMount /manager* foo
JkMount /servlets/* foo

The manager application works fine, when typing the URL

http://website/manager/html

Everything is ok.

Now I'm trying to install an application on the path
/servlets/myapplication. The Context file looks like this:

<Context reloadable="true" path="/servlets/myapplication/"
docBase="${catalina.home}/home/schade/myapplication/" debug="5"
allowoverride="true">
<Valve className="org.apache.catalina.valves.AccessLogValve"
prefix="kvisremote_by_schade." suffix=".txt"
pattern="common"/>
</Context>

Typing a URL like http://website/servlets/myapplication/testfile.html
does not trigger this context. I've made a similar Valve for the
manager-application, and here every request to the manager Context is
logged.

I guess it has something to do with the path-attribute. A similar
solution worked fine on the old server...

Regards,
René
 
S

Simon Brooke

René said:
Hi All

I'm running Apache 2.0, Tomcat 5.5.17, jdk 1.5

I'm upgrading from Apache 1.3 Tomcat 3.* jdk 1.4

In my Apache log file I have the following:

JkMount /manager* foo
JkMount /servlets/* foo

The manager application works fine, when typing the URL

http://website/manager/html

Everything is ok.

Now I'm trying to install an application on the path
/servlets/myapplication. The Context file looks like this:

<Context reloadable="true" path="/servlets/myapplication/"
docBase="${catalina.home}/home/schade/myapplication/" debug="5"
allowoverride="true">
<Valve className="org.apache.catalina.valves.AccessLogValve"
prefix="kvisremote_by_schade." suffix=".txt"
pattern="common"/>
</Context>

You're trying to be way too complex.

You should not need to create a new context for your webapp. Simply take
the original server.xml, just as it was when you first installed Tomcat,
and do nothing whatever with it. Then drop your war file into the webapps
directory, and, hey presto! your webapp will work.
 
?

=?iso-8859-1?B?UmVu6SBTY2hhZGU=?=

Simon said:
You're trying to be way too complex.

You should not need to create a new context for your webapp. Simply take
the original server.xml, just as it was when you first installed Tomcat,
and do nothing whatever with it. Then drop your war file into the webapps
directory, and, hey presto! your webapp will work.

--
(e-mail address removed) (Simon Brooke) http://www.jasmine.org.uk/~simon/

;; Want to know what SCO stands for?
;; http://ars.userfriendly.org/cartoons/?id=20030605


Unfortunatly its not that easy :)

I have to follow the JKMount definitions, this I have to say in which
path the application will be deployed.

The tomcat server is not in full control of the root of the webserver.
As described it controls urls starting with /manager and /servlets/*.
That is, there is no "home" or "root" dir for tomcat (please correct me
if I am wrong).

For instance, it is not possible to call the example-applications
"jsp-examples" "tomcat-docs" etc.

Regards,
René
 
S

steen

René Schade said:
The tomcat server is not in full control of the root of the webserver.
As described it controls urls starting with /manager and /servlets/*.
That is, there is no "home" or "root" dir for tomcat (please correct me
if I am wrong).

Hm, maybe its just me thats not quite following what you mean, but my
tomcat has a ROOT dir ($TOMCAT_HOME/webapps/ROOT) which is the root of
the default host ?

/Steen
 
L

Lew

steen said:
Hm, maybe its just me thats not quite following what you mean, but my
tomcat has a ROOT dir ($TOMCAT_HOME/webapps/ROOT) which is the root of
the default host ?

/Steen

René pointed out that Apache Web Server doesn't forward those paths.

- Lew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top