|
Re: url rewriting with XMLC: msg#00041java.enhydra.xmlc
On Tuesday 25 November 2003 23:30, Matthew Hixson wrote: > Is it possible to put the jsessionid value into every <a> tag using XMLC? Of course it is. > Could one use XPath to somehow find all of the <a> tags and edit the href > attribute? No need - XMLC already has builtin support for this. Default behaviour is to automatically rewrite URLs when needed (i.e. when the HTTP session indicates that the client has cookies turned off), but you can change this by setting the <context-param> named "xmlcSessionURLEncoding" in web.xml to the values "always" (always rewrite URLs) or "never" (does the obvious thing as well :-) See the javadocs for org.enhydra.xml.xmlc.servlet.XMLCContext for details. By default, URLs are rewritten by calling HttpServletResponse.encodeURL(). This should do the right thing in a servlet environment, but if you have special needs, you can set a special URL rewrite handler by calling OutputOptions.setURLRewriter() prior to writing the page. Hope this helps, Richard -- Richard Kunze [ t]ivano Software, Bahnhofstr. 18, 63263 Neu-Isenburg Tel.: +49 6102 80 99 07 - 0, Fax.: +49 6102 80 99 07 - 1 http://www.tivano.de
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: url rewriting with XMLC, Mark van Leeuwen |
|---|---|
| Next by Date: | Strange ouput with pretty print on, Mark van Leeuwen |
| Previous by Thread: | url rewriting with XMLC, Matthew Hixson |
| Next by Thread: | Re: url rewriting with XMLC, Jacob Kjome |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |