Ludovic Dubost wrote:
Sure.. propose your changes when you have something.. We might look at it and change it a little.. If you are not 100% sure of you add an option in xwiki.cfg to turn on the addition you make.
Of course. I guess it might need some testing with different encodings, etc, but since it in no way interacts with XWiki internals I don't think turning it on/off would be necessary. Greetings, Lilianne E. Blaze
Ludovic
Lilianne E. Blaze a écrit :
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 [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
------------------------------------------------------------------------
-- 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
------------------------------------------------------------------------
-- 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
------------------------------------------------------------------------
-- 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