struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Lewis <...@ascii27.net>
Subject Re: Struts problem on reload...
Date Fri, 30 Jun 2006 15:04:52 GMT
Cool...I'll try that and see how it goes. Many thanks...

If I might ask though, is there a specific opposition to having the 
standard ActionServlet clean up the RequestProcessor instances from the 
ServletContext as it does plugins and ModuleConfigs?


Paul Benedict wrote:
> Andy:
>
> Use this as your action servlet instead:
> http://struts.apache.org/struts-doc-1.2.9/api/org/apache/struts/actions/RedeployableActionServlet.html
>
> Paul
>
> Andy Lewis <ajl@ascii27.net> wrote: The team I work with has encountered an apparent
problem with Struts 
> when the servlet is reloaded by the container. We are using Weblogic 
> 9.1, but the problem appear to happen on other versions, and possibly 
> other containers. The spec does not appear to be clear regarding the 
> ServletContext behavior across servlet instances, and in the case of 
> Weblogic 9.1, it appears to fully preserve the ServletContext. The 
> problem we are having is that the RequestProcessor instances stored in 
> the ServletContext are destroyed when the ActionServlet is destroyed, 
> but they are not removed from the ServletContext. As a result, when a 
> new servlet is created with the same context, it finds the 
> RequestProcessors already existing, but they have a null reference to 
> the servlet (since their respective destroy method was called). As a 
> result any attempt to get to the Servlet resources, such as the 
> ServletContext, results in a NullPointerException in the RequestProcessor.
>
> Even the latest version appears to do this. Google searches on the 
> problem reveal other users have had the problem, and even a patch/hack 
> that resets the servlet variable in the RequestProcessor every time it 
> is accessed. There is also an existing open issue () on JRun that may be 
> the same problem.
>
> A simple one line addition to the Servlet destroy code to remove the 
> destroyed RequestProcessor from the ServletContext fixes the problem.
>
> Is anyone familiar with this issue and can valid or correct my 
> understanding? And If I am correct in my understanding, is this 
> something I should submit the one line patch for? I've not had the 
> opportunity to contribute to struts before, and little to any project as 
> much as I'd like to.
>
> Any comments, feedback, corrections, validations, etc, would be appreciated.
>
>
> Thanks!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
>
>  		
> ---------------------------------
> Want to be your own boss? Learn how on  Yahoo! Small Business. 
>   


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


Mime
View raw message