struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <niall.pember...@gmail.com>
Subject Re: Issue w/ ActionServlet.init()...
Date Mon, 23 Apr 2007 09:45:27 GMT
The init() and init(ServletConfig) methods are part of the servlet API
- the container calls  init(ServletConfig) and that method then fires
init() - so if they are not getting called then I don't think it has
anything to do with Struts. Have you checked your logs for any errors?

Niall

On 4/23/07, David Lehrian <david@lehrian.com> wrote:
> I have an old application written using Struts 1.1 that has a subclass of ActionServlet
which overrides the init() method to load data from some XML files.  It works fine w/ Struts
1.1.  I haven't touched it for years but now need to do some work on it.  My current Netbeans
environment has Struts 1.2.9 and I figured I would just update it to the newer version but
for the life of me I can't get the system to call the init() method.  I have the subclass
listed as the action servlet in web.xml (snippet below) and I can break in the doGet and doPost
methods so the servlet is definitely being used as the ActionServlet in the application. 
Why isn't it calling the init() and/or init(ServletConfig config) methods?
>
>     <servlet>
>         <servlet-name>action</servlet-name>
>         <servlet-class>TimeClockServlet2.TimeClockActionServlet</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>2</param-value>
>         </init-param>
>         <init-param>
>             <param-name>detail</param-name>
>             <param-value>2</param-value>
>         </init-param>
>         <load-on-startup>2</load-on-startup>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>action</servlet-name>
>         <url-pattern>*.do</url-pattern>
>     </servlet-mapping>
>
> Warm Regards,
> Dave
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message