I was releasing wrong object in jspFactory.releasePageContext() and thus getting a ClassCastException when jspFactory.getPageContext() reused the object from a SimplePool at the next request (yes, I'm using Tomcat :-)
I'll create a jira issue and attach my added files, if someone else find it useful.
Jonas
Jonas Eriksson wrote:
Matt Ho wrote:
Jonas Eriksson wrote:
Any pointer of how a solution could be done would be greatly appreciated . I will of course submit my changes to JIRA (if the solution is nice enough) so others may download and try it out. Unfortunately there are a couple of properties in the VelocityLayoutServlet that are private which forced me to copy the class instead of using inheritance.
Have you had any time checking this out yet?
Heya,
I haven't had a chance to check this out in any detail. The issue that I see is that the the WebWorkVelocity* classes want to write to a pageContext.getOut() rather than directly to response.getWriter().
I think a reasonable solution would be to have the WebWorkLayoutServlet extend by aggregation the VelocityViewServlet and the WebWorkVelocityServlet. You would then need to create a wrapper class for PageContext so that getOut() returns a writer to your buffer rather than the true buffer. The remaining pageContext methods should be left alone, especially pushBody() and popBody().
M
Thanks for the help! It almost works :-)
Requests thru ServletDispather work fine, but requests directly to my WebWorkVelocityLayoutServlet fail exactly every second request. It's the jspFactory.getPageContext(..) that returns null. The line is in mergeTemplate() and it looks identical to the mergeTemplate() in WebWorkVelocityServlet up to that line. Any idea of this strange behaviour?
Thanks Jonas
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork