Hi,

1] Yes, I can pre-process the value, using something like string
replace... It's just hackish, and I wondered if there were a "right" way
of doing this

2] encode doesn't work; In fact, it seems this parameter only maps to
HttpServletResponse, which only adds the ;jsessionid pseudo-parameter to
the URLs..

Regards,
Sami

Le mardi 29 mai 2007 à 15:35 -0400, Laurie Harper a écrit :
> Sami Dalouche wrote:
> > Hi,
> > 
> >>> Is it possible to disable this behaviour somehow ?
> >> Depends how you're using the URL. Are you sure you even *want* to 
> >> disable the behaviour? Encoding ampersands is generally the right thing 
> >> to do.
> > 
> > Well, yeah, I do want to disable it.
> > Basically, I need to generate the fully qualified (hostname, port,
> > context, action) URL of the current page (with different parameters), so
> > that I can encode it (using URLEncoder), append it to
> > http://maps.google.com/q={myUrl}
> > 
> > The problem is that URLEncoder WILL encoder & correctly, so I don't want
> > struts to process it before I do.
> > 
> > So, is it possible to disable this & encoding ?
> 
> Hmm, well, you haven't described how you're using the url produced with 
> the s:url tag other than 'reusing the url #id in some OGNL parameter'; 
> that's a bit vague. Assuming you're using OGNL to pass the URL value to 
> a method you've written, you can pre/post process the value any way you 
> want.
> 
> The s:url tag has an 'encode' attribute to control whether the URL 
> should be encoded [1], which is true by default. Perhaps all you need is 
> to set that appropriately.
> 
> L.
> 
> [1] http://struts.apache.org/2.x/docs/url.html
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to