You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by ji...@apache.org on 2004/04/17 18:53:30 UTC
[jira] Updated: (CACTUS-45) CactifyWarTask duplicates init-param lines in existing web.xml sevlet tag
The following issue has been updated:
Updater: Vincent Massol (mailto:vmassol@apache.org)
Date: Sat, 17 Apr 2004 9:51 AM
Changes:
assignee changed from Cactus Developers Mailing List to Vincent Massol
type changed from Bug to Improvement
description changed from 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. to 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.
environment changed from Operating System: Linux
Platform: PC to Operating System: Linux
Platform: PC
priority changed to Major
Fix Version changed to 1.7
---------------------------------------------------------------------
For a full history of the issue, see:
http://issues.apache.org/jira/browse/CACTUS-45?page=history
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/CACTUS-45
Here is an overview of the issue:
---------------------------------------------------------------------
Key: CACTUS-45
Summary: CactifyWarTask duplicates init-param lines in existing web.xml sevlet tag
Type: Improvement
Status: Reopened
Priority: Major
Project: Cactus
Components:
Ant Integration
Fix Fors:
1.7
Assignee: Vincent Massol
Reporter: Anil Mahajan
Created: Tue, 1 Jul 2003 4:25 PM
Updated: Sat, 17 Apr 2004 9:51 AM
Environment: Operating System: Linux
Platform: PC
Description:
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.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.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: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org