How about doing it this way? <bean:define value="next" id="nextBean"> <html:link forward="bbs" paramId="page" paramScope="page" paramName="nextBean">
I haven't tested this. From reading the documentation, this is the first thing I would try... Jay ----- Original Message ----- From: <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, December 11, 2001 8:53 PM Subject: Re: Passing variables with the <html:link> tag, how do I do this? > > Thank you for your very helpful email. I have gone to this page and > read it. I have tried > > <html:link forward="bbs" paramId="page" paramName="next"> > > but always get the error that bean "next" cannot be found, which is > understandable and expected from what the web page for <html:link> says. > > From reading the web page about <html:link> this it says I can use > paramId > > ------------paramId definition start------------------ > The name of the request parameter that will be dynamically added to the > generated hyperlink. The corresponding value is defined by the paramName > and (optional) paramProperty attributes, optionally scoped by the > paramScope attributel > ------------paramId definition end-------------------- > > But paramPropertyName says I must be using a bean(I think this is what > the following means) > > ------------paramName definition start------------------ > The name of a JSP bean that is a String containing the value for the > request parameter named by paramId (if paramProperty is not specified), > or a JSP bean whose property getter is called to return a String (if > paramProperty is specified). The JSP bean is constrained to the bean > scope specified by the paramScope property, if it is specified. > > ------------paramProperty definition end------------------ > > > I do not have any bean. I don't see the reason in having a bean if the > information I want to pass is included in the html link I want generated > > http://localhost:8180/testproject/bbs.do;jsessionid=EB98798B79878&page=next > -(1) > > I simply want to add the "page=next" string > > But I cannot work out how to do this using the <html:link> tag. Can > someone please tell me how to use the <html:link> tag to add to a > forward or page link a parameter like page in (1) > > Regards > > Antony > > [EMAIL PROTECTED] wrote: > > > goto http://jakarta.apache.org/struts/struts-html.html#link and read > > what it says. You can specify a name and optionally a property parameter > > to the link tag. These parameters locate a Map with parameter name value > > pairs that are appended to the url. > > [EMAIL PROTECTED] writes: > > > >> No, I still dont know how to do it. I think maybe struts cannot do > >> this. Can someone please verify if it can or cannot. > >> Regards > >> Antony > >> > >> John Regan wrote: > >> > >>> has anybody answered this yet? > >>> -----Original Message----- > >>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > >>> Sent: Sunday, December 09, 2001 8:39 PM > >>> To: Struts Users Mailing List > >>> Subject: Passing variables with the <html:link> tag, how do I do this? > >>> > >>> Hi > >>> I have a very simple question, I want pass a variable to a page, I have > >>> <html:link forward="bbs" paramId="page" paramPropery="next"> -(1) > >>> and want this to expand to > >>> http://localhost:8180/testproject/bbs.do;jsessionid=EB98798BC986586989898 > >>> 798 > >>> 78&page=next -(2) > >>> But (1) is not doing what I want it to do. How can I write a link > >>> like (2) using the > >>> <html:link> > >>> tag? > >>> Cheers > >>> Tony > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>