You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Joseph Toth <JT...@lightspeedresearch.com> on 2004/04/28 23:56:25 UTC

Use jsessionid in Message

Is there an easy way to replace a jsessionid in a message?
Something like...

message.intro=Welcome, click <a href="/Join.do;jsessionid={0}">here</a>
to join!

Some of my messages are paragraphs long with a few links in them.  I
wanted to know if is a way to keep the texts and links inside that one
message.  I would rather not assume that {0} links to
/Join.do;jessiondid=xxxx as this site is internationalized and the
links/replacements can get messy for different messages.

Thanks a lot for your help and suggestions

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Use jsessionid in Message

Posted by "Craig R. McClanahan" <cr...@apache.org>.
Joseph Toth wrote:

>Is there an easy way to replace a jsessionid in a message?
>Something like...
>
>message.intro=Welcome, click <a href="/Join.do;jsessionid={0}">here</a>
>to join!
>
>Some of my messages are paragraphs long with a few links in them.  I
>wanted to know if is a way to keep the texts and links inside that one
>message.  I would rather not assume that {0} links to
>/Join.do;jessiondid=xxxx as this site is internationalized and the
>links/replacements can get messy for different messages.
>  
>
One approach would be to make the URL itself a replacement parameter -- 
something like:  message.intro=Click <a href="{0}">here</a> to join!

This way, you can use response.encodeURL() to encode the session 
identifier into the URL itself, if necessary.

Craig



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org