On Tue, 6 Feb 2001, Ritwick Dhar wrote:

> Jan, 
> Thanks for your reply. After looking at your FAQ (which is a great effort,
> by the way) it seems the problem is a missing 'ApJServMount /test /root',
> which enables all calls with /root to go to Tomcat. This is missing in
> tomcat-apache.conf. The question, then, is why tomcat-apache.conf isn't
> being generated correctly. Is this a bug?

It is a feature... You see, it is the assumption that what you
serve from Tomcat is only servlets or JSP, so if you put
in your mount (mod_jk.conf or mod_jserv.conf) that you want only
the *.jsp and servlets served by tomcat, this is what you get. For example.

JkMount /examples/servlet/* ajp12
JkMount /examples/*.jsp ajp12


You can tell Apache to send everything in the /examples context
to Tomcat by doing:

JkMount /examples/*

or you can detail things, like:

JkMount /examples/servlet/* ajp12
JkMount /examples/*.jsp ajp12
JkMount /examples/catalog/* ajp12
JkMount /examples/customer/* ajp12

i.e., pass individual directories or even files...

Jan
[EMAIL PROTECTED]

> Another thing I noticed:
> I have a new context in server.xml, which looks like:
> <Context path="/ofxadmin"
> docBase="/usr/acct/DB.4/java_ept/ofx/webapps/ofxadmin" debug="0"
> reloadable="false" > 
> </Context>
> 
> When I start tomcat, it generates tomcat-apache.conf (again!) with:
> Alias /ofxadmin /usr/local/jakarta-tomcat/webapps/ofxadmin
> <Directory "/usr/local/jakarta-tomcat/webapps/ofxadmin">
>     Options Indexes FollowSymLinks
> </Directory>
> ApJServMount /ofxadmin/servlet /ofxadmin
> <Location /ofxadmin/WEB-INF/ >
>     AllowOverride None
>     deny from all
> </Location>
> 

I always copy the *auto file to the conf file and edit it by hand, and
then include in httpd.conf. This may be a bug, but as I said, I actually
do not dwell much on what Tomcat should put there, since I edit it
by hand without even paying close attention on what is there. In my
humble opinion, tomcat should not produce config files for apache,
and it should be like old times, when you had just examples. But at the
same time, it probably helps newcommers a lot...

Jan

> Note how the absolute path of the webapp has changed despite it being
> specified in server.xml. Looks like Tomcat ignores the server.xml value and
> thinks all webapps are under its home directory. Is this another bug?
> 
> Thanks very much for your help.
> Rit
> 
> -----Original Message-----
> From: Jan Labanowski [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 06, 2001 2:44 PM
> To: '[EMAIL PROTECTED]'
> Subject: Re: servlet-mapping: Apache intercepting calls to webapp and
> returnin g 404
> 
> 
> You may want to see a piece on remapping in my Tomcat FAQ getting old.
> 
> http://www.ccl.net/cca/software/UNIX/apache/index.shtml
> 
> You cannot remap stuff out of your context, though...
> 
> Jan
> 
> 
> On Tue, 6 Feb 2001, Ritwick Dhar wrote:
> 
> > Hello,
> > 
> > My apologies if the question has been asked previously, and I suspect it
> > has, but on a quick search through the archives, I didn't find exactly
> this
> > question.
> > 
> > Servlet mapping seems to fail on an out-of-the-box installation of Tomcat
> > 3.1 with Apache. The test webapp installed with tomcat has the following
> > mapping:
> > **snip**
> >     <servlet>
> >         <servlet-name>
> >             servlet3
> >         </servlet-name>
> >         <servlet-class>
> >             requestMap.Servlet3
> >         </servlet-class>
> >     </servlet>
> > **snip**
> >     <servlet-mapping>
> >         <servlet-name>
> >             servlet3
> >         </servlet-name>
> >         <url-pattern>
> >             /catalog
> >         </url-pattern>
> >     </servlet-mapping>
> > **snip**
> > 
> > So I can call http://servername:8080/test/catalog. And this works fine.
> > Output is 'Servlet: Servlet3'. All right and proper.
> > 
> > Now I link apache (1.3.14) with Tomcat. Just like the manual says, with a 
> > 'Include /usr/local/jakarta-tomcat/conf/tomcat-apache.conf' directive. And
> > restart Apache and Tomcat.
> > 
> > Now, calling http://servername/test/catalog should give me exactly the
> same
> > output, right? Nope. I get :
> > ------------
> > The requested URL /test/catalog was not found on this server.
> > Apache/1.3.14 Server at f50dev2 Port 80
> > ------------
> > 
> > Looks like apache is intercepting the call to the webapp and trying to
> find
> > /test/catalog instead of forwarding the request to Tomcat.
> > 
> > What's up? Like I said, this is a out-of-the-box installation.
> > 
> > Thanks
> > Rit
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> > 
> 
> Jan K. Labanowski            |    phone: 614-292-9279,  FAX: 614-292-7168
> Ohio Supercomputer Center    |    Internet: [EMAIL PROTECTED] 
> 1224 Kinnear Rd,             |    http://www.ccl.net/chemistry.html
> Columbus, OH 43212-1163      |    http://www.osc.edu/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 

Jan K. Labanowski            |    phone: 614-292-9279,  FAX: 614-292-7168
Ohio Supercomputer Center    |    Internet: [EMAIL PROTECTED] 
1224 Kinnear Rd,             |    http://www.ccl.net/chemistry.html
Columbus, OH 43212-1163      |    http://www.osc.edu/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to