Hi,
I tried your web.xml file and it worked fine with the application I'm
working on; the only difference
I can find is they way the URL's are constructed. By example in my app the
same URL would be:
http://localhost/myapp/servlet/template/admin,Index.vm
So I think you might fix your error by changing the servlet mapping to:
<servlet-mapping>
<servlet-name>myapp</servlet-name>
<url-pattern>/servlet/myapp/*</url-pattern>
</servlet-mapping>
In this way your URL's worked in my application; in the other hand I
haven't been able to reproduce the same
error so it may be a different problem, but I think it worth a try. What
version of Turbine are you using, btw?
andres
Humberto Hernadez Torres wrote:
> Gracias for the answer Andres. I made a mistake on my post but the
> problem remains. If I request:
> http://localhost/myapp/servlet/myapp/template/admin,Index.vm
>
> I get the following error in turbine.log:
> Exception: java.lang.Exception: Screen template '/Index.vm' not
> found
>
> It seems to ignore the "admin," part.
>
> My web.xml file is here:
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <!DOCTYPE web-app
> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/j2ee/dtds/web-app_2.3.dtd">
>
> <web-app>
> <servlet>
> <servlet-name>
> myapp
> </servlet-name>
> <servlet-class>
> org.apache.turbine.Turbine
> </servlet-class>
> <init-param>
> <param-name>properties</param-name>
> <!-- This is relative to the docBase -->
> <param-value>
> /WEB-INF/conf/TurbineResources.properties
> </param-value>
> </init-param>
> </servlet>
> <servlet-mapping>
> <servlet-name>myapp</servlet-name>
> <url-pattern>/servlet/*</url-pattern>
> </servlet-mapping>
> <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>
>
> -----Mensaje original-----
> De: Andres Portillo [mailto:[EMAIL PROTECTED]]
> Enviado el: Wednesday, August 29, 2001 2:21 PM
> Para: [EMAIL PROTECTED]
> Asunto: Re: Problem running with Resin
>
> Hi,
>
> I think the URL should be:
>
> http://localhost/myapp/servlet/template/admin,Index.vm
>
> instead of
> http://localhost/myapp/servlet/myapp/template/admin,Index.vm
>
> saludos
>
> andres
>
> Humberto Hernadez Torres wrote:
>
> > We are trying to migrate an application from catalina to resin. We
> > copied the application in the webapps of Resin and added de following
> > lines in the webapps/myapp/WEB-INF/web.xml file.
> >
> > <servlet-mapping>
> > <servlet-name>myapp</servlet-name>
> > <url-pattern>/servlet/*</url-pattern>
> > </servlet-mapping>
> >
> > I can call http://localhost/myapp/servlet/myapp/template/Index.vm but
> I
> > cannot call it I move Index.vm to a subdirectory. Calling
> > http://localhost/myapp/servlet/myapp/template/admin,Index.vm complains
> > about not finding the template /Index.vm. According to my tests it is
> > ignores de "admin," part of the template.
> >
> > The application seems to be working fine with catalina.sh so I am
> > assuming there is some configuration wrong in the url-mapping to
> support
> > a subdirectory hierachy of templates.
> >
> > --
> > Humberto
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> --
> =============================================
> Andres G. Portillo D.
> Software Engineer
> Veratech (www.veratech.com.mx)
> =============================================
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
=============================================
Andres G. Portillo D.
Software Engineer
Veratech (www.veratech.com.mx)
=============================================