You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by be...@alumni.caltech.edu on 2001/04/05 19:41:04 UTC

mod_jk.conf-auto problem

Hi.

I have a servlet, Hungry, which wants to process all requests which
extend a given prefix.  No problem in
tomcat.  I add the following stanza to my webapps web.xml

    <servlet-mapping>
      <servlet-name>Hungry</servlet-name>
      <url-pattern>/Hungry/*</url-pattern>
    </servlet-mapping>

When I use tomcat in apache this doesn't have the desired effect even
though I include
mod_jk.conf-auto.  Things are OK if the request path is forwarded to
tomcat: Hungry gets
/context/Hungry/xyz.jsp; however, according to the tomcat logs, tomcat
never sees a request for
/context/Hungry/xyz.

If I use port 8080 (i.e. tomcat) directly, Hungry  gets /Hungry/xyz.

I believe I can fix this by adding 
	JkMount /context/Hungry/* ajp12 
to the mod_jk.conf-auto file, however, I'd rather just use the auto
generation facility.

Can anyone help me with this?

Thanks.

-- 
Len

Re: mod_jk.conf-auto problem

Posted by Milt Epstein <me...@uiuc.edu>.
On Thu, 5 Apr 2001 berman@alumni.caltech.edu wrote:

> Hi.
> 
> I have a servlet, Hungry, which wants to process all requests which
> extend a given prefix.  No problem in
> tomcat.  I add the following stanza to my webapps web.xml
> 
>     <servlet-mapping>
>       <servlet-name>Hungry</servlet-name>
>       <url-pattern>/Hungry/*</url-pattern>
>     </servlet-mapping>
> 
> When I use tomcat in apache this doesn't have the desired effect even
> though I include
> mod_jk.conf-auto.  Things are OK if the request path is forwarded to
> tomcat: Hungry gets
> /context/Hungry/xyz.jsp; however, according to the tomcat logs, tomcat
> never sees a request for
> /context/Hungry/xyz.
> 
> If I use port 8080 (i.e. tomcat) directly, Hungry  gets /Hungry/xyz.
> 
> I believe I can fix this by adding 
> 	JkMount /context/Hungry/* ajp12 
> to the mod_jk.conf-auto file, however, I'd rather just use the auto
> generation facility.
> 
> Can anyone help me with this?

Well, this kind of issue has come up here before, and the solution
does seem to be what you are suggesting, i.e. adding an appropriate
JkMount directive to the tomcat/apache conf file to make sure apache
passes the request to tomcat.

As to having it be in the conf-auto file, I don't really know about
that, but generally the recommendation here has been to use that file
as a model for your real one, i.e. copying it and editing it to suit
your needs, and including the modified one in the apache conf file.
It would be nice if there were some way to specify that such things be
included in the conf-auto file, but I don't know that one currently
exists.

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
mepstein@uiuc.edu