tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <jacob.r.kj...@syntegra.com>
Subject Can someone please comment? (was mod_jk.conf-auto question/suggestion)
Date Tue, 12 Sep 2000 12:53:40 GMT

I got no response to this one.  Maybe it was because I emailed it over the 
weekend, but I think this is important to anyone running Tomcat through 
Apache web server.  I have seen no one ask this question nor any answer 
that has come close to answering it.  Can anyone verify if the following is 
possible?

thanks,

Jake


>As it stands, mod_jk.conf-auto gets automatically generated by tomcat when 
>it starts.  It sets up same basic stuff, which is fine, but not enough.
>
>
>The problem comes in when you have created a <servlet-mapping> with a 
><url-pattern> for one or more servlets.  Apache Web Server does not see 
>any mounts unless they are specified in the mod_jk.conf-auto (and included 
>in httpd.conf).  The Problem is that, on creation, the info that 
>mod_jk.conf-auto gets set with ignores <servlet-mapping> and <url-pattern>

>settings in each context's web.xml.
>
>Here is a partial example of the basic stuff that gets set up (in this 
>case for context "myapp"):
>
>#
># The following line mounts all JSP files and the /servlet/ uri to tomcat
>#
>JkMount /myapp/servlet/* ajp12
>JkMount /myapp/*.jsp ajp12
>
>
>
>
>However, in my web.xml, I have this:
>
><servlet>
>     <servlet-name>hello</servlet-name>
>     <servlet-class>HelloWorld</servlet-class>
></servlet>
>
><servlet-mapping>
>     <servlet-name>hello</servlet-name>
>     <url-pattern>/sayhello</url-pattern>
></servlet-mapping>
>
>
>Now, I could manually write the following into another conf file than 
>mod_jk.conf-auto that isn't re-written by tomcat every time Tomcat is 
>re-loaded:
>
>JkMount /myapp/sayhello ajp12
>
>
>That would work, however, I already wrote this once in the web.xml.  Why 
>should I have to remember to write it again just so it can work with 
>Apache Web Server???
>
>Why not just have whatever script that creates the mod_jk.conf-auto 
>recognize <servlet-mapping> and <url-pattern> in each webapp's web.xml and

>automatically add that to the mod_jk.conf-auto?  That way, there is no 
>worries about deployment.  You can be assured that any new 
>servlet-mapping's are added with no extra effort involved.
>
>
>Has this already been thought of?  If so, is it going to be 
>implemented?  Does anyone see any problems with doing this?
>
>This seems like a no-brainer to me.  I hope it is in the works!  If it 
>already works, can someone tell me how?
>
>
>thanks,
>
>Jake


Mime
View raw message