struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward Song" <Edward.S...@nuhorizons.com>
Subject Struts 1.3.8 Plugins initializing twice
Date Thu, 03 Jan 2008 15:56:40 GMT
Hi all,

 

Struts 1.3.8

 

I have a single struts module and it seems as though my plugins are getting
loaded twice.  

This goes for the validator, tiles, and my own written plugins.

 

I've found out that if in the web.xml I do not specify a value for
<load-on-startup> then the ActionServlet is not initialized until it is
requested, and when it is requested it is initialized once.  

 

Web.xml

<servlet>

            <description>Struts Action Servlet</description>

            <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/config/struts/struts-config.xml</param-value>

            </init-param>

            <load-on-startup>2</load-on-startup>

      </servlet>

 

However, if I add a value for <load-on-startup> it seems as though struts is
initialized twice as I can see that the validator and tiles plugins are
loaded twice.  The struts manual says that the framework should be loaded on
startup to ensure correct operation.

 

Ed

 


Mime
View raw message