You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by col_chappy <gr...@gillware.com> on 2008/10/13 16:07:28 UTC

URL param included on all URL's

I'm developing a webapp with Struts 2.0.11.2. I've got a page that displays a
list of customers and allows you to click on them to bring up a page with
more information. Each customer has a unique ID which is passed as a
parameter in the URL. The JSP code looks like this:


<s:url action="details" id="durl">
          <s:param name="id" value="id"/>
</s:url>
<s:property value= ">
     <s:property value="name"/>


This works well, except now every   link, even those on other pages, have
that ?id parameter in the URL. What am I messing up? Any help is appreciated
-- 
View this message in context: http://www.nabble.com/URL-param-included-on-all-URL%27s-tp19955612p19955612.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


RE: URL param included on all URL's

Posted by col_chappy <gr...@gillware.com>.
I had been playing with the includeParam attribute with no change in
behavior. 

I added the includeParam="none" attribute to my standard navigation links
and they no longer carry the ?id parameter. So I guess the problem is solved
for now. Maybe I'll have some time in a few weeks to figure out what's going
on.

Thanks for the help,
Greg


Kawczynski, David wrote:
> 
> I think you want to use an includeParams="none" attribute in the s:url
> tag
> 
> -----Original Message-----
> From: col_chappy [mailto:greg@gillware.com] 
> Sent: Monday, October 13, 2008 10:07 AM
> To: user@struts.apache.org
> Subject: URL param included on all URL's
> 
> 
> I'm developing a webapp with Struts 2.0.11.2. I've got a page that
> displays a
> list of customers and allows you to click on them to bring up a page
> with
> more information. Each customer has a unique ID which is passed as a
> parameter in the URL. The JSP code looks like this:
> 
> 
> <s:url action="details" id="durl">
>           <s:param name="id" value="id"/>
> </s:url>
> <s:property value= ">
>      <s:property value="name"/>
> 
> 
> This works well, except now every   link, even those on other pages,
> have
> that ?id parameter in the URL. What am I messing up? Any help is
> appreciated
> -- 
> View this message in context:
> http://www.nabble.com/URL-param-included-on-all-URL%27s-tp19955612p19955
> 612.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> Notice:  This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
> New Jersey, USA 08889), and/or its affiliates (which may be known
> outside the United States as Merck Frosst, Merck Sharp & Dohme or
> MSD and in Japan, as Banyu - direct contact information for affiliates is
> available at http://www.merck.com/contact/contacts.html) that may be
> confidential, proprietary copyrighted and/or legally privileged. It is
> intended solely for the use of the individual or entity named on this
> message. If you are not the intended recipient, and have received this
> message in error, please notify us immediately by reply e-mail and
> then delete it from your system.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/URL-param-included-on-all-URL%27s-tp19955612p19956423.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


RE: URL param included on all URL's

Posted by "Kawczynski, David" <da...@merck.com>.
I think you want to use an includeParams="none" attribute in the s:url
tag

-----Original Message-----
From: col_chappy [mailto:greg@gillware.com] 
Sent: Monday, October 13, 2008 10:07 AM
To: user@struts.apache.org
Subject: URL param included on all URL's


I'm developing a webapp with Struts 2.0.11.2. I've got a page that
displays a
list of customers and allows you to click on them to bring up a page
with
more information. Each customer has a unique ID which is passed as a
parameter in the URL. The JSP code looks like this:


<s:url action="details" id="durl">
          <s:param name="id" value="id"/>
</s:url>
<s:property value= ">
     <s:property value="name"/>


This works well, except now every   link, even those on other pages,
have
that ?id parameter in the URL. What am I messing up? Any help is
appreciated
-- 
View this message in context:
http://www.nabble.com/URL-param-included-on-all-URL%27s-tp19955612p19955
612.html
Sent from the Struts - User mailing list archive at Nabble.com.


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

Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.


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


Re: URL param included on all URL's

Posted by Dave Newton <ne...@yahoo.com>.
--- On Mon, 10/13/08, col_chappy wrote:
> This works well, except now every link, even those on other pages, have
> that ?id parameter in the URL. What am I messing up? Any help is 
> appreciated

In addition to David's suggestion, you can also set a default value for the entire application:

>From the struts.properties file [1] (but it's probably better to set it via XML [2]):

### possible values are: none, get or all
struts.url.includeParams = get

Dave

[1] http://struts.apache.org/2.0.11.2/docs/strutsproperties.html
[2] http://struts.apache.org/2.0.11.2/docs/constant-configuration.html


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