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-rewriting-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]

Reply via email to