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.. 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.. You could put this in XWiki.java or in a plugin.. Ludovic 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 [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- Ludovic Dubost XPertNet: http://www.xpertnet.fr/ Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost AIM: nvludo Yahoo: ludovic