You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2002/01/10 02:21:12 UTC

DO NOT REPLY [Bug 5774] New: - ActionServlet can't use Digester when digester classes are in parent classloader of webapp

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5774>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5774

ActionServlet can't use Digester when digester classes are in parent classloader of webapp

           Summary: ActionServlet can't use Digester when digester classes
                    are in parent classloader of webapp
           Product: Struts
           Version: Nightly Build
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Controller
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: hal.deadman@tallan.com


If you deploy an application as an ear file it would be nice to put Digester in 
the EJB classpath as specified by the ejb jar manifest file. That would allow 
the EJBs to use the Digester. Unfortunately, although Struts ActionServlet can 
see the Digester, the Digester can't see any of the Struts classes it needs to 
create. (The ejb classloader is a parent of the webapp classloader)

ActionServlet needs a new initialization parameter such as:
digesterClassLoader=[context|servlet|digester]

If "context" is selected then the Digesters in ActionServlet should call:
digester.setContextClassLoader(true);

If "servlet" is selected then the Digesters in ActionServlet should call:
digester.setClassLoader(this.getClass().getClassLoader());
or 
digester.setClassLoader(ActionServlet.class.getClassLoader());

If "digester" is selected then the digester can continue to use it's own 
classloader which will only work if the Digester and Struts jars are loaded by 
the same class loader. This option is not really necessary as it's the same as 
not using the digesterClassLoader init parm at all.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>