Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
René Schade - 23 Oct 2006 14:01 GMT
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é
Simon Brooke - 23 Oct 2006 16:21 GMT
> Hi All
>
[quoted text clipped - 23 lines]
> 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.

Signature

simon@jasmine.org.uk (Simon Brooke) http://www.jasmine.org.uk/~simon/

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

René Schade - 24 Oct 2006 07:28 GMT
> > Hi All
> >
[quoted text clipped - 36 lines]
>         ;; 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é
steen - 24 Oct 2006 08:43 GMT
> 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
Lew - 26 Oct 2006 13:41 GMT
>> The tomcat server is not in full control of the root of the webserver.
>> As described it controls urls starting with /manager and /servlets/*.
[quoted text clipped - 6 lines]
>
> /Steen

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

- Lew


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.