You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Eduardo Dela Rosa <ed...@gmail.com> on 2008/04/23 01:34:43 UTC
Why do parameters get applied to all hyperlinks generated by & even after the request is processes?
Hi,
I have the following code in my JSP:
*<s:url id="url7" namespace="/secure" action="viewCustomerDetails">
<s:param name="email"><c:out value="${customer.email}"/></s:param>
</s:url>
<s:a href="%{url7}">View Customer Details</s:a>*
Assuming that the value of the email is *myemail@email.com*.
After clicking the link generated by the *<s:url>* & *<s:a>*, all hyperlinks
in next page will have the *email=myemail@email.com* encoded in the URL,
i.e.:
*http://host:8080/mydomain/logout.action?email=myemail@email.com*
This is apparent even when I don't set params in my *logout.action* link.
Can someone explain this behavior?
Thanks.
--
Eduardo Dela Rosa
"Make things simple, but not simpler - E=mc2"
Re: Why do parameters get applied to all hyperlinks generated by & even after the request is processes?
Posted by Eduardo Dela Rosa <ed...@gmail.com>.
Excellent! That solved it.
I should have paid attention to that part of document.
Thanks very much Steve.
Eduardo
On Wed, Apr 23, 2008 at 9:44 AM, Steve Akins <ak...@gmail.com> wrote:
> You need to code includeParams="none" in the s:url tags
>
> or
> <struts>
> ...
> <constant name="struts.url.includeParams" value="none" />
> ...
> </struts>
>
> in your configuration.
>
> Have a look here: http://struts.apache.org/2.x/docs/url.html
>
> I'm pretty certain that will sort you out.
>
>
> On 4/23/08, Eduardo Dela Rosa <ed...@gmail.com> wrote:
> > Hi,
> >
> > I have the following code in my JSP:
> >
> > *<s:url id="url7" namespace="/secure" action="viewCustomerDetails">
> > <s:param name="email"><c:out value="${customer.email}"/></s:param>
> > </s:url>
> > <s:a href="%{url7}">View Customer Details</s:a>*
> >
> > Assuming that the value of the email is *myemail@email.com*.
> >
> > After clicking the link generated by the *<s:url>* & *<s:a>*, all
> hyperlinks
> > in next page will have the *email=myemail@email.com* encoded in the URL,
> > i.e.:
> >
> > *http://host:8080/mydomain/logout.action?email=myemail@email.com*
> >
> > This is apparent even when I don't set params in my *logout.action*
> link.
> >
> > Can someone explain this behavior?
> >
> > Thanks.
> > --
> > Eduardo Dela Rosa
> > "Make things simple, but not simpler - E=mc2"
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Eduardo Dela Rosa
Re: Why do parameters get applied to all hyperlinks generated by & even after the request is processes?
Posted by Steve Akins <ak...@gmail.com>.
You need to code includeParams="none" in the s:url tags
or
<struts>
...
<constant name="struts.url.includeParams" value="none" />
...
</struts>
in your configuration.
Have a look here: http://struts.apache.org/2.x/docs/url.html
I'm pretty certain that will sort you out.
On 4/23/08, Eduardo Dela Rosa <ed...@gmail.com> wrote:
> Hi,
>
> I have the following code in my JSP:
>
> *<s:url id="url7" namespace="/secure" action="viewCustomerDetails">
> <s:param name="email"><c:out value="${customer.email}"/></s:param>
> </s:url>
> <s:a href="%{url7}">View Customer Details</s:a>*
>
> Assuming that the value of the email is *myemail@email.com*.
>
> After clicking the link generated by the *<s:url>* & *<s:a>*, all hyperlinks
> in next page will have the *email=myemail@email.com* encoded in the URL,
> i.e.:
>
> *http://host:8080/mydomain/logout.action?email=myemail@email.com*
>
> This is apparent even when I don't set params in my *logout.action* link.
>
> Can someone explain this behavior?
>
> Thanks.
> --
> Eduardo Dela Rosa
> "Make things simple, but not simpler - E=mc2"
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org