Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Problems configuring a <Context> path="xx" on Apache/Tomcat

Reply
Thread Tools

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

 
 
=?iso-8859-1?B?UmVu6SBTY2hhZGU=?=
Guest
Posts: n/a
 
      10-23-2006
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.AccessLogVal ve"
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é

 
Reply With Quote
 
 
 
 
Simon Brooke
Guest
Posts: n/a
 
      10-23-2006
in message <(E-Mail Removed) .com>, René
Schade ('(E-Mail Removed)') wrote:

> 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.AccessLogVal ve"
> 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.

--
http://www.velocityreviews.com/forums/(E-Mail Removed) (Simon Brooke) http://www.jasmine.org.uk/~simon/

;; Want to know what SCO stands for?
;; http://ars.userfriendly.org/cartoons/?id=20030605
 
Reply With Quote
 
 
 
 
=?iso-8859-1?B?UmVu6SBTY2hhZGU=?=
Guest
Posts: n/a
 
      10-24-2006

Simon Brooke wrote:
> in message <(E-Mail Removed) .com>, René
> Schade ('(E-Mail Removed)') wrote:
>
> > 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.AccessLogVal ve"
> > 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.
>
> --
> (E-Mail 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é

 
Reply With Quote
 
steen
Guest
Posts: n/a
 
      10-24-2006
René Schade wrote:
> 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

 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      10-26-2006
> René Schade wrote:
>> 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).

>

steen wrote:
> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PIX 501 - A few problems configuring Steven Duckworth Cisco 0 05-26-2006 02:49 PM
HP Pavilion zd7260us w/Broadcom WLAN--Configuring? Stranger Wireless Networking 0 11-10-2004 06:53 AM
Problems setting/configuring NetGear DG834G Dim Computer Support 2 10-10-2004 04:21 PM
Configuring an Enterprise wireless solutions with encryption Harrison Midkiff Wireless Networking 0 07-02-2004 06:23 PM
Problems with configuring dev-c++ with allegro library Karol C++ 1 01-22-2004 03:51 PM



Advertisments