You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Leena Borle <ls...@gmail.com> on 2009/03/19 19:30:08 UTC

Struts2 and scrambled query string.

Hi,
 I want to know if anybody used scrambled query string with Struts2 and how
to do it.

E.g. if I call some action like http://...../ShowProducts.action?id=23&dept=5
etct. etc, I want the query string to be scrambled so that it does not show
my  database ids in the browser.

Thanks,
Leena

Re: Struts2 and scrambled query string.

Posted by Dave Newton <ne...@yahoo.com>.
Leena Borle wrote:
> I want to know if anybody used scrambled query string with Struts2 and how
> to do it.
> 
> E.g. if I call some action like http://...../ShowProducts.action?id=23&dept=5
> etct. etc, I want the query string to be scrambled so that it does not show
> my  database ids in the browser.

IIRC I did something like this with an interceptor, although if it's not 
an application-wide requirement you can just do it in each action. Just 
create some helpers to en/decode the query string; use the encode on the 
JSP side (depending on how you're generating the URLs) and decode on the 
action/interceptor side.

Dave


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