Hello,
Ludovic Dubost wrote:
Well if I understand correctly
$request.getRequestDispatcher("/xxx.jsp").include( $request, $response )
will send the results directly on the outputstream on the response
object.. that's why is coming out before everything..
Most probably.
I think you need to either create a fake "response" object to get the
result back in a string and output it, either to talk directly to the
JSP engine..
Now the first solution might be a little more portable than the
second.. The second is a little cleaner than looping back into
getRequestDispatcher..
That's what I figured. I haven't seriously consider the second option
since I need it to be fully portable.
You could put this in XWiki.java or in a plugin..
So far I have modifications in macros.vm, com.xpn.xwiki.XWiki,
com.xpn.xwiki.api.XWiki, loosely based on parseTemplate method, and I
plan to write an actual implementation in com.xpn.xwiki.velocity, would
that be ok?
Ludovic
Greetings, Lilianne E. Blaze
Lilianne E. Blaze a écrit :
Hello,
I need to be able to include a Servlet or JSP from inside of
/templates/*.vm files (specifically header and footer).
I tried things like:
$request.getRequestDispatcher("/xxx.jsp").include( $request, $response )
But for some reason (buffering in Velocity I guess) it renders
included page before anything else, no matter where it's actually
placed. Is there some workaround? If not, I think I have an idea how
to implement a kind of "#includeServlet" directive, could it be
included in XWiki then?
Greetings, Lilianne E. Blaze
------------------------------------------------------------------------
--
You receive this message as a subscriber of the
xwiki-dev(a)objectweb.org mailing list.
To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws
------------------------------------------------------------------------
--
You receive this message as a subscriber of the xwiki-dev(a)objectweb.org mailing list.
To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws