[ http://nagoya.apache.org/jira/browse/CACTUS-45?page=history ]
Vincent Massol reassigned CACTUS-45:
------------------------------------
Assign To: (was: Vincent Massol)
> CactifyWarTask duplicates init-param lines in existing web.xml sevlet tag
> -------------------------------------------------------------------------
>
> Key: CACTUS-45
> URL: http://nagoya.apache.org/jira/browse/CACTUS-45
> Project: Cactus
> Type: Improvement
> Components: Ant Integration
> Environment: Operating System: Linux
> Platform: PC
> Reporter: Anil Mahajan
> Fix For: 1.7
>
> When running cactifywar against an existing web.xml file that contains
> a <servlet> tag it appears as if the CactifyWar task is duplicating all of the
> <init-param> tags within that servlet tag.
> This becomes a big problem when there are other elements that belong after the
> <init-params> tag (such as a <load-on-startup> tag, in my instance), because it
> causes the WAR deployment to fail because of the invalid <Servlet> in the web.xml.
> This means that the <cactus> tag then just hangs there waiting to use a servlet
> on a WAR file that hasn't deployed.
> the original servlet line from my web.xml:
> <servlet>
> <servlet-name>action</servlet-name>
> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
> <init-param>
> <param-name>application</param-name>
> <param-value>net.trusecure.tes.servlet.ApplicationResources</param-value>
> </init-param>
> <init-param>
> <param-name>config</param-name>
> <param-value>/WEB-INF/struts-config.xml</param-value>
> </init-param>
> <init-param>
> <param-name>debug</param-name>
> <param-value>2</param-value>
> </init-param>
> <load-on-startup>2</load-on-startup>
> </servlet>
> 'cactified' version:
> <servlet> <servlet-name>action</servlet-name>
> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
> <init-param> <param-name>application</param-name>
> <param-value>net.trusecure.tes.servlet.ApplicationResources</param-value>
> </init-param> <init-param> <param-name>config</param-name>
> <param-value>/WEB-INF/struts-config.xml</param-value>
> </init-param> <init-param> <param-name>debug</param-name>
> <param-value>2</param-value> </init-param>
> <load-on-startup>2</load-on-startup>
> <init-param><param-name>application</param-name><param-value>net.trusecure.tes.servlet.ApplicationResources</param-value></init-param><init-param><param-name>config</param-name><param-value>/WEB-INF/struts-config.xml</param-value></init-param><init-param><param-name>debug</param-name><param-value>2</param-value></init-param></servlet>
> Notice that the init-params are duplicated. They are also jammed back into the
> servlet AFTER the load-on-startup tag. The duplication does not appear to be
> related to the <load-on-startup> tag (I have tried without the load-on-startup
> tag, and the params are still duplicated).
> So, it's most likely that someone accidentally re-used a variable or something.
> thanks.
> btw, It wouldn't hurt to throw some new-lines into the cactified web.xml file
> to make it more readable.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]