Hi,

Thanks for the example. One final thing is puzzling me. I have 2 webapps
under my domain so if I use this
"DocumentRoot /some/path/to/tomcat/webappname1"
How do I then reach the second webappname2? Ideally I want to have
www.stpenable.com hit www.stpenable.com/se/servlet/se/templates/index.vm and
have www.stpenable.com/rwt hit
www.stpenable.com/rwtransform/servlet/rwtransform/templates/index.vm

i.e. in httpd.conf

<VirtualHost *>
    ServerName www.stpenable.com

    ServerAlias localhost

    Alias /se /usr/local/jakarta-tomcat-4.1.12/webapp2/se
    DocumentRoot /usr/local/jakarta-tomcat-4.1.12/webapp2/se

    <Directory "/usr/local/jakarta-tomcat-4.1.12/webapp2/se">
        Options Indexes FollowSymLinks
        DirectoryIndex index.vm index.html
    </Directory>

    <Location "/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /* ajp13

    Alias /rwtransform /usr/local/jakarta-tomcat-4.1.12/webapp2/rwtransform

    <Directory "/usr/local/jakarta-tomcat-4.1.12/webapp2/rwtransform">
        Options Indexes FollowSymLinks
        DirectoryIndex index.vm index.html
    </Directory>

    ??????????????

</VirtualHost>

In my Host section of the server.xml I have 2 Contexts one with path="/"
pointing to docBase="/se" and one with path="/rwtransform" and
docBase="/rwtransform".

With the DocumentRoot pointing at the specific webapp se I cannot see how I
can have a JkMount that effectively looks like ../rwtransform/*?

thanks

David

> -----Original Message-----
> From: John Turner [mailto:[EMAIL PROTECTED]
> Sent: 22 August 2003 18:07
> To: Tomcat Users List
> Subject: Re: 2 VirtualHosts now work, mod_jk not
>
>
>
> I would try setting:
>
> Alias /webappname /some/path/to/tomcat/webappname
> DocumentRoot /some/path/to/tomcat/webappname
>
> Then:
>
> JkMount /servlet/* ajp13
>
> Then your URL of
>
> http://some.host.com//webappname/servlet/webappname/templates/index.vm
>
> should work.  Even this should work:
>
> Alias / /some/path/to/tomcat/webappname
> DocumentRoot /some/path/to/tomcat/webappname
> JkMount /*.vm ajp13
>
> The "*" in this case means "/webappname/servlet/webappname/templates".
>
> I don't know anything about Turbine, so I can't help with specifics.
> You might just be better off using Tomcat alone.
>
> John
>
> David Wynter wrote:
>
> > I have long URLs because I am using the Apache Turbine project
> to develop my
> > webapps. Here is an article on how to shorten them, which gives me the
> > impression that i am stuck with these long URLs
> >
> http://jakarta.apache.org/turbine/turbine-2.2.1/howto/url-rewritin
> g-howto.ht
> > ml unless I follow this method.
> >
> > This URL is a standard Turbine app URL -
> > /webappname/servlet/webappname/templates/index.vm .
> >
> > It always seemed to me that the /webappname/servlet/webappname should be
> > replaceable by Aliases, but it is not clear to me how.
> >
> > The web.xml supplied with Turbine does not have a mapping to
> .vm files. Here
> > it is.
> >
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> >
> > <!DOCTYPE web-app
> >     PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
> >     "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd";>
> >
> > <web-app>
> >   <servlet>
> >     <servlet-name>se</servlet-name>
> >     <servlet-class>org.apache.turbine.Turbine</servlet-class>
> >     <init-param>
> >       <param-name>applicationRoot</param-name>
> >       <param-value>webContext</param-value>
> >     </init-param>
> >     <init-param>
> >       <param-name>properties</param-name>
> >
> <param-value>/WEB-INF/conf/TurbineResources.properties</param-value>
> >     </init-param>
> >     <load-on-startup>1</load-on-startup>
> >   </servlet>
> >   <security-constraint>
> >     <web-resource-collection>
> >       <web-resource-name>templates</web-resource-name>
> >       <url-pattern>/templates/*</url-pattern>
> >     </web-resource-collection>
> >     <web-resource-collection>
> >       <web-resource-name>logs</web-resource-name>
> >       <url-pattern>/logs/*</url-pattern>
> >     </web-resource-collection>
> >     <auth-constraint>
> >       <role-name>admin</role-name>
> >     </auth-constraint>
> >   </security-constraint>
> >   <login-config>
> >     <auth-method>BASIC</auth-method>
> >     <realm-name>Templates</realm-name>
> >   </login-config>
> > </web-app>
> >
> > What is not clear is how the JkMount works in the context of
> the long URLs
> > for Turbine apps as opposed to the short URLs for the example
> jsp. Why did I
> > use the alias name in my Location and JkMount directives? Because the
> > archive is littered with examples doing just that eg.
> > http://www.mail-archive.com/[EMAIL PROTECTED]/msg98299
> > According to this thread the solution was not changing what he
> had in the
> > JkMount so I cannot but help take it as an example, sorry.
> >
> > Thanks John, you are the only one who is replying to these.
> >
> > David
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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

Reply via email to