jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Petar Tahchiev" <paranoia...@gmail.com>
Subject Re: cactify servletredirector problem
Date Tue, 15 Jul 2008 11:10:06 GMT
Hi Nicole,

the situation is this: ince version 1.8.0 cactus relies on cargo to
successfully
cactify the web.xml. I had some debugging this morning and found that the
problem is actually in cargo. I do admit that this is a serious problem and
so we would like to continue to investigate further. Here is a dirty
solution
I can provide-place the  <welcome-file-list> directive at the bottom of the
web.xml, like this:

[.....]

       <resource-ref>
               <description>ProjectNameDS DB Connection</description>
               <res-ref-name>jdbc/ProjectNameDS</res-ref-name>
               <res-type>javax.sql.DataSource</res-type>
               <res-auth>Container</res-auth>
       </resource-ref>

             <welcome-file-list>
                 <welcome-file>/index.jsp</welcome-file>
             </welcome-file-list>

</web-app>

I am not sure yet why, but it seems that cargo looks for the perfect place
based
on this directive.

HTH, Petar.

2008/7/15, Nicole Luneburg <Nicole.Luneburg@lisasoft.com>:
>
> Hi Petar,
>
> This is my web.xml BEFORE the cactify task is run:
>
> <?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>
>         <display-name>
>                 @MODULE@ : @TAG@ : @PROJECTNAME@ : @USER@
>         </display-name>
>         <description>@MODULE@ : @TAG@ : @PROJECTNAME@ : @USER@
> </description>
>         <context-param>
>                 <param-name>TAG</param-name>
>                 <param-value>@TAG@</param-value>
>                 <description>The CVS tag AKA release version</description>
>         </context-param>
>
>         <!-- STRUTS 2 INFORMATION -->
>         <context-param>
>                 <param-name>tilesDefinitions</param-name>
>                 <param-value>/WEB-INF/tiles.xml</param-value>
>         </context-param>
>
>         <context-param>
>
>                 <param-name>org.apache.tiles.factory.TilesContainerFactory.MUTABLE</param-name>
>                 <param-value>true</param-value>
>         </context-param>
>
>         <filter>
>                 <filter-name>projectname</filter-name>
>
>                 <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>         </filter>
>
>         <!-- Filter Mapping for URI -->
>         <filter-mapping>
>                 <filter-name>projectname</filter-name>
>                 <url-pattern>/*</url-pattern>
>         </filter-mapping>
>
>         <listener>
>
>                 <listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
>         </listener>
>
>         <welcome-file-list>
>                 <welcome-file>/index.jsp</welcome-file>
>         </welcome-file-list>
>
>         <!-- STRUTS 1 INFORMATION -->
>         <servlet>
>                 <servlet-name>ServletTestRunner</servlet-name>
>
>                 <servlet-class>org.apache.cactus.server.runner.ServletTestRunner</servlet-class>
>         </servlet>
>         <servlet>
>                 <servlet-name>action</servlet-name>
>
>                 <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
>                 <init-param>
>                         <param-name>config</param-name>
>
>                         <param-value>/WEB-INF/struts-config.xml</param-value>
>                 </init-param>
>                 <init-param>
>                         <param-name>definitions-config</param-name>
>                         <param-value>/WEB-INF/tiles-defs.xml</param-value>
>                 </init-param>
>                 <load-on-startup>2</load-on-startup>
>         </servlet>
>         <servlet>
>                 <servlet-name>TestAddUser</servlet-name>
>
>                 <servlet-class>com.compname.projectname.servlet.TestAddUserServlet</servlet-class>
>         </servlet>
>         <servlet>
>                 <servlet-name>TestRemoveUser</servlet-name>
>
>                 <servlet-class>com.compname.projectname.servlet.TestRemoveUserServlet</servlet-class>
>         </servlet>
>
>         <servlet-mapping>
>                 <servlet-name>TestAddUser</servlet-name>
>                 <url-pattern>/testadduser</url-pattern>
>         </servlet-mapping>
>         <servlet-mapping>
>                 <servlet-name>TestRemoveUser</servlet-name>
>                 <url-pattern>/testremoveuser</url-pattern>
>         </servlet-mapping>
>         <servlet-mapping>
>                 <servlet-name>ServletTestRunner</servlet-name>
>                 <url-pattern>/ServletTestRunner</url-pattern>
>         </servlet-mapping>
>
>         <taglib>
>                 <taglib-uri>/tags/struts-bean</taglib-uri>
>
>                 <taglib-location>/WEB-INF/tlds/struts-bean.tld</taglib-location>
>         </taglib>
>         <taglib>
>                 <taglib-uri>/tags/struts-html</taglib-uri>
>
>                 <taglib-location>/WEB-INF/tlds/struts-html.tld</taglib-location>
>         </taglib>
>         <taglib>
>                 <taglib-uri>/tags/struts-logic</taglib-uri>
>                 <taglib-location>
>                         /WEB-INF/tlds/struts-logic.tld
>                 </taglib-location>
>         </taglib>
>         <taglib>
>                 <taglib-uri>/tags/struts-nested</taglib-uri>
>                 <taglib-location>
>                         /WEB-INF/tlds/struts-nested.tld
>                 </taglib-location>
>         </taglib>
>         <taglib>
>                 <taglib-uri>/tags/struts-tiles</taglib-uri>
>                 <taglib-location>
>                         /WEB-INF/tlds/struts-tiles.tld
>                 </taglib-location>
>         </taglib>
>         <taglib>
>                 <taglib-uri>/tags/struts-menu</taglib-uri>
>
>                 <taglib-location>/WEB-INF/tlds/struts-menu.tld</taglib-location>
>         </taglib>
>         <taglib>
>                 <taglib-uri>/tags/struts-displaytag</taglib-uri>
>
>                 <taglib-location>/WEB-INF/tlds/displaytag.tld</taglib-location>
>         </taglib>
>         <taglib>
>                 <taglib-uri>/tags/c</taglib-uri>
>                 <taglib-location>/WEB-INF/tlds/c.tld</taglib-location>
>         </taglib>
>
>         <!-- SECURITY INFORMATION -->
>         <security-constraint>
>                 <web-resource-collection>
>                         <web-resource-name>
>                                 ProjectNameSecurityConstraints
>                         </web-resource-name>
>                         <url-pattern>/jsp/test/testLogin.jsp</url-pattern>
>                         <url-pattern>/jsp/home.jsp</url-pattern>
>                         <url-pattern>*.action</url-pattern>
>                         <http-method>GET</http-method>
>                         <http-method>POST</http-method>
>                 </web-resource-collection>
>                 <auth-constraint>
>                         <role-name>role1</role-name>
>                         <role-name>role2</role-name>
>                         <role-name>role3</role-name>
>                         <role-name>role4</role-name>
>                         <role-name>role5</role-name>
>                 </auth-constraint>
>                 <user-data-constraint>
>                         <transport-guarantee>NONE</transport-guarantee>
>                 </user-data-constraint>
>         </security-constraint>
>
>         <security-role>
>                 <role-name>role1</role-name>
>         </security-role>
>         <security-role>
>                 <role-name>role2</role-name>
>         </security-role>
>         <security-role>
>                 <role-name>role3</role-name>
>         </security-role>
>         <security-role>
>                 <role-name>role4</role-name>
>         </security-role>
>         <security-role>
>                 <role-name>role5</role-name>
>         </security-role>
>
>         <login-config id="loginConfig">
>                 <auth-method>FORM</auth-method>
>                 <realm-name>projectname_security</realm-name>
>                 <form-login-config>
>                         <form-login-page>/jsp/logon.jsp</form-login-page>
>
>                         <form-error-page>/jsp/logon-error.jsp</form-error-page>
>                 </form-login-config>
>         </login-config>
>
>         <resource-ref>
>                 <description>ProjectNameDS DB Connection</description>
>                 <res-ref-name>jdbc/ProjectNameDS</res-ref-name>
>                 <res-type>javax.sql.DataSource</res-type>
>                 <res-auth>Container</res-auth>
>         </resource-ref>
> </web-app>
>
>
>
> This is what it looks like in the cactified war:
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!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>
>     <display-name>
>                 ${env.MODULE} : ${env.TAG} : @PROJECTNAME@ : nlunebur
>         </display-name>
>     <description>${env.MODULE} : ${env.TAG} : @PROJECTNAME@ :
> nlunebur</description>
>     <context-param>
>         <param-name>TAG</param-name>
>         <param-value>${env.TAG}</param-value>
>         <description>The CVS tag AKA release version</description>
>     </context-param>
>     <!-- STRUTS 2 INFORMATION -->
>     <context-param>
>         <param-name>tilesDefinitions</param-name>
>         <param-value>/WEB-INF/tiles.xml</param-value>
>     </context-param>
>     <context-param>
>
>         <param-name>org.apache.tiles.factory.TilesContainerFactory.MUTABLE</param-name>
>         <param-value>true</param-value>
>     </context-param>
>     <filter>
>         <filter-name>projectname</filter-name>
>
>         <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>     </filter>
>     <!-- Filter Mapping for URI -->
>     <filter-mapping>
>         <filter-name>projectname</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>
>     <listener>
>
>         <listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
>     </listener>
>     <servlet>
>         <servlet-name>JspRedirector</servlet-name>
>         <jsp-file>/jspRedirector.jsp</jsp-file>
>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>ServletRedirector</servlet-name>
>         <url-pattern>/ServletRedirector</url-pattern>
>     </servlet-mapping>
>
>     <servlet-mapping>
>         <servlet-name>JspRedirector</servlet-name>
>         <url-pattern>/JspRedirector</url-pattern>
>     </servlet-mapping>
>     <welcome-file-list>
>         <welcome-file>/index.jsp</welcome-file>
>     </welcome-file-list>
>     <!-- STRUTS 1 INFORMATION -->
>     <servlet>
>         <servlet-name>ServletTestRunner</servlet-name>
>
>         <servlet-class>org.apache.cactus.server.runner.ServletTestRunner</servlet-class>
>     </servlet>
>     <servlet>
>         <servlet-name>action</servlet-name>
>
>         <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
>         <init-param>
>             <param-name>config</param-name>
>             <param-value>/WEB-INF/struts-config.xml</param-value>
>         </init-param>
>         <init-param>
>             <param-name>definitions-config</param-name>
>             <param-value>/WEB-INF/tiles-defs.xml</param-value>
>         </init-param>
>         <load-on-startup>2</load-on-startup>
>     </servlet>
>     <servlet>
>         <servlet-name>TestAddUser</servlet-name>
>
>         <servlet-class>com.compname.projectname.servlet.TestAddUserServlet</servlet-class>
>     </servlet>
>     <servlet>
>         <servlet-name>TestRemoveUser</servlet-name>
>
>         <servlet-class>com.compname.projectname.servlet.TestRemoveUserServlet</servlet-class>
>     </servlet>
>
>     <servlet>
>         <servlet-name>ServletRedirector</servlet-name>
>
>         <servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-class>
>     </servlet>
>     <servlet-mapping>
>
>         <servlet-name>TestAddUser</servlet-name>
>         <url-pattern>/testadduser</url-pattern>
>     </servlet-mapping>
>     <servlet-mapping>
>         <servlet-name>TestRemoveUser</servlet-name>
>         <url-pattern>/testremoveuser</url-pattern>
>     </servlet-mapping>
>     <servlet-mapping>
>         <servlet-name>ServletTestRunner</servlet-name>
>         <url-pattern>/ServletTestRunner</url-pattern>
>     </servlet-mapping>
>     <taglib>
>         <taglib-uri>/tags/struts-bean</taglib-uri>
>         <taglib-location>/WEB-INF/tlds/struts-bean.tld</taglib-location>
>     </taglib>
>     <taglib>
>         <taglib-uri>/tags/struts-html</taglib-uri>
>         <taglib-location>/WEB-INF/tlds/struts-html.tld</taglib-location>
>     </taglib>
>     <taglib>
>         <taglib-uri>/tags/struts-logic</taglib-uri>
>         <taglib-location>
>                         /WEB-INF/tlds/struts-logic.tld
>                 </taglib-location>
>     </taglib>
>     <taglib>
>         <taglib-uri>/tags/struts-nested</taglib-uri>
>         <taglib-location>
>                         /WEB-INF/tlds/struts-nested.tld
>                 </taglib-location>
>     </taglib>
>     <taglib>
>         <taglib-uri>/tags/struts-tiles</taglib-uri>
>         <taglib-location>
>                         /WEB-INF/tlds/struts-tiles.tld
>                 </taglib-location>
>     </taglib>
>     <taglib>
>         <taglib-uri>/tags/struts-menu</taglib-uri>
>         <taglib-location>/WEB-INF/tlds/struts-menu.tld</taglib-location>
>     </taglib>
>     <taglib>
>         <taglib-uri>/tags/struts-displaytag</taglib-uri>
>         <taglib-location>/WEB-INF/tlds/displaytag.tld</taglib-location>
>     </taglib>
>     <taglib>
>         <taglib-uri>/tags/c</taglib-uri>
>         <taglib-location>/WEB-INF/tlds/c.tld</taglib-location>
>     </taglib>
>     <!-- SECURITY INFORMATION -->
>     <security-constraint>
>         <web-resource-collection>
>             <web-resource-name>
>                                 ProjectNameSecurityConstraints
>                         </web-resource-name>
>             <url-pattern>/jsp/test/testLogin.jsp</url-pattern>
>             <url-pattern>/jsp/home.jsp</url-pattern>
>             <url-pattern>*.action</url-pattern>
>             <http-method>GET</http-method>
>             <http-method>POST</http-method>
>         </web-resource-collection>
>         <auth-constraint>
>             <role-name>role1</role-name>
>             <role-name>role2</role-name>
>             <role-name>role3</role-name>
>             <role-name>role4</role-name>
>             <role-name>role5</role-name>
>         </auth-constraint>
>         <user-data-constraint>
>             <transport-guarantee>NONE</transport-guarantee>
>         </user-data-constraint>
>     </security-constraint>
>     <security-role>
>         <role-name>role1</role-name>
>     </security-role>
>     <security-role>
>         <role-name>role2</role-name>
>     </security-role>
>     <security-role>
>         <role-name>role3</role-name>
>     </security-role>
>     <security-role>
>         <role-name>role4</role-name>
>     </security-role>
>     <security-role>
>         <role-name>role5</role-name>
>     </security-role>
>     <login-config id="loginConfig">
>         <auth-method>FORM</auth-method>
>         <realm-name>projectname_security</realm-name>
>         <form-login-config>
>             <form-login-page>/jsp/logon.jsp</form-login-page>
>             <form-error-page>/jsp/logon-error.jsp</form-error-page>
>         </form-login-config>
>     </login-config>
>     <resource-ref>
>         <description>ProjectNameDS DB Connection</description>
>         <res-ref-name>jdbc/ProjectNameDS</res-ref-name>
>         <res-type>javax.sql.DataSource</res-type>
>         <res-auth>Container</res-auth>
>     </resource-ref>
> </web-app>
>
> Is that what you were after?
>
>
> -----Original Message-----
> From: Petar Tahchiev [mailto:paranoiabla@gmail.com]
>
> Sent: Monday, 14 July 2008 10:28 PM
> To: Cactus Users List
> Subject: Re: cactify servletredirector problem
>
> Hi Nicole,
>
>
> This is really strange, and should never happen.
>
> Can you paste your source web.xml file?
>
> Thanks.
>
>
>
> The contents of this email are confidential and may be subject to legal or
> professional privilege and copyright. No representation is made that this
> email is free of viruses or other defects. If you have received this
> communication in error, you may not copy or distribute any part of it or
> otherwise disclose its contents to anyone. Please advise the sender of your
> incorrect receipt of this correspondence.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
>


-- 
Regards, Petar!
Karlovo, Bulgaria.
- - - - - - - -
| Author @ Manning Publications.
| Technical Consultant @ HP
| BGJUG-Bulgarian Java User Group Leader.
| Apache Jakarta PMC member.
| Jakarta Cactus Lead Developer.
| Blogger: http://weblogs.java.net/blog/paranoiabla/
- - - - - - - -
Public PGP Key at:
https://keyserver1.pgp.com/vkd/DownloadKey.event?keyid=0x19658550C3110611
Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message