logo       

Re: url rewriting with XMLC: msg#00041

java.enhydra.xmlc

Subject: Re: url rewriting with 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

Attachment: pgpLayBpGCCOp.pgp
Description: signature

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise