You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2004/11/09 20:05:47 UTC

DO NOT REPLY [Bug 32128] New: - JspGenerator doesn't work from flow but does otherwise...

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

http://issues.apache.org/bugzilla/show_bug.cgi?id=32128

JspGenerator doesn't work from flow but does otherwise...

           Summary: JspGenerator doesn't work from flow but does
                    otherwise...
           Product: Cocoon 2
           Version: 2.1.5
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Flowscript
        AssignedTo: dev@cocoon.apache.org
        ReportedBy: Garrick@musicrebellion.com


JSP pages that are called directly from the browser work corectly, however if
the same JSP is called from flow's sendPage() or showForm(), or any pages
included in these pages, a ClassCastException is thrown from Jasper.

This is caused because the CompilingClassLoader passed to Jasper does not extend
the java.net.URLClassLoader that Jasper expects.

This bug was initially reported on the cocoon-users mailing list and is
available at: http://marc.theaimsgroup.com/?t=108874467000001&r=1&w=4

I have produced a quick patch which hacks around this bug by making the
CompilingClassLoader extend URLClassLoader instead, and changing the super()
calls in the constructor to match URLClassLoader's expected arguments.

This works, but may be incomplete.  Any sources added to the
CompilingClassLoader are currently not added to the URLClassLoaders URL list,
and are thus not passed on to the Jasper compiler.

Any additions or modifications to this patch would be appreciated to correct
this bug.