This is from a Struts 1.2.8 app of mine.

 <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>debug</param-name>
      <param-value>3</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>3</param-value>
    </init-param>
    <load-on-startup>0</load-on-startup>
  </servlet>

You don¹t need the debug params but in this case it might not hurt. I cannot
remember why but I believe that load on startup should always be 0 for
Struts 1.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications




From: Edward Song <[EMAIL PROTECTED]>
Reply-To: Struts Users Mailing List <user@struts.apache.org>
Date: Thu, 3 Jan 2008 10:56:40 -0500
To: <user@struts.apache.org>
Subject: Struts 1.3.8 Plugins initializing twice

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
 


The information contained in this e-mail is legally privileged and
confidential information intended only for use by the  individual or entity
named above.  If the reader of this e-mail is not the intended recipient,
you are hereby notified that any dissemination or distribution hereof is
prohibited.  If you have received this e-mail in error, please delete the
material from your computer and immediately notify us at   631-396-5000.
Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to