Thanks for the tip.  The <html:link> tag works for me!

Sorry I wasn't clear in my earlier email.
I'm testing/evaluating Struts at the moment.
I created a data-entry form to do Create/Update/Delete actions.  
All the actions are processed by an action class and forwarded to
the same JSP.

Therefore, I need to have different links such as

<html:link href="/testing.do?action=ADD#top"> for Create action
<html:link href="/testing.do?action=UPDATE&userid=1234#top"> for
Update/Delete action.

Thanks,
Paul Ng


-----Original Message-----
From: James Mitchell [mailto:jmitchtx@;telocity.com]
Sent: Friday, October 25, 2002 2:23 PM
To: Struts Developers List
Subject: RE: href="/Struts/testing.do?action=ADD&userid=1234#top"


Huh?

All text after a "#" is interpreted as an anchor and the web browser will
scroll (or ignore, if not there) accordingly.

Unless you plan to place <a name="#top"> on all jsp pages that you can
forward to for this action, and NOT use the base tag, then this won't matter
(and will be ignored for ).

You still have not said (in English) what you are trying to do.  Why are you
needing to go the #top?
Are you trying to force the browser to scroll instead of jump to the link?
(If yes, then just use <a href="#top"> instead of <html:link
href="/testing.do?action=ADD&userid=1234#top")



James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org

"Only two things are infinite, the universe and human stupidity, and I'm not
sure about the former."
- Albert Einstein (1879-1955)


> -----Original Message-----
> From: Ng, Paul Y [mailto:paul.ng@;eds.com]
> Sent: Friday, October 25, 2002 1:52 AM
> To: 'Struts Developers List'
> Subject: RE: href="/Struts/testing.do?action=ADD&userid=1234#top"
>
>
> Hi,
>
> I would like to be able to write out the following URL
>
> href="localhost:8080/testing.do?action=ADD&userid=1234&status=A#top"
> href="localhost:8080/testing.do?action=ADD&userid=1234"
> href="localhost:8080/testing.do?action=ADD&userid=1234#top"
>
> Is it correct to say that I should do something like this
>
> <app:linkUser page="/testingdo?action=ADD">
>       <bean:write name="user" property="userid" filter="true"/>
>       <bean:write name="user" property="top" filter="true"/>
> </app:linkUser>
>
> where property top is actually "#top"?
>
> And in the doStartTag() method have
>
> public int doStartTag() throws JspException {
>       url.append("&");
>       url.append("userid=");
>       url.append(ResponseUtils.filter(  user.getUserid() ));
>       url.append(ResponseUtils.filter(  user.getTop() ));
> }
>
> Thanks,
> Paul Ng
>
>
> -----Original Message-----
> From: James Mitchell [mailto:jmitchtx@;telocity.com]
> Sent: Friday, October 25, 2002 11:51 AM
> To: Struts Developers List
> Subject: RE: href="/Struts/testing.do?action=ADD&userid=1234#top"
>
>
> '#top' will only be there if you tell it to.
>
> Could you explain a bit further what you are wanting to do?
>
>
> James Mitchell
> Software Engineer/Struts Evangelist
> http://www.open-tools.org
>
> "Only two things are infinite, the universe and human stupidity,
> and I'm not
> sure about the former."
> - Albert Einstein (1879-1955)
>
>
> > -----Original Message-----
> > From: Ng, Paul Y [mailto:paul.ng@;eds.com]
> > Sent: Thursday, October 24, 2002 11:21 PM
> > To: 'Struts Developers List'
> > Subject: href="/Struts/testing.do?action=ADD&userid=1234#top"
> >
> >
> > Hi there,
> >
> > I would like to use a custom tag and Struts bean to write out the
> > following
> > URL.
> >
> > href="/Struts/testing.do?action=ADD&userid=1234#top"
> >
> > My question is,
> > is it possible to make the custom tag generic so that it
> doesn't write out
> > the hash mark "#top" on some JSPs?
> >
> >
> > Thanks,
> > Paul Ng
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:struts-dev-help@;jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
> <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-dev-help@;jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:
> <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-dev-help@;jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>

Reply via email to