I haven't tried this, but...
Instead of doing what is usually done in an action, that is, ending with...
return mapping.findForward("whatever");
...get a reference to the ActionForward returned like so...
ActionForward af = mapping.findForward("whatever");
...then, add your anchor portion like so...
af.setPath(af.getPath() + "#theAnchor");
...and finally
return af;
...and your done. Again, I haven't tried this, but I suspect it would work.
Frank
From: Christopher Marsh-Bourdon <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: Struts Users Mailing List <[EMAIL PROTECTED]> Subject: Actions and Anchors Date: Tue, 22 Jun 2004 22:19:40 +0100
Evening All
I have a sticky problem, and it goes something like this:
I have a JSP which will be returned by an Action. On this JSP page there
are a fair few Anchors like: <a name=²ImAnAnchor²>I¹m an Anchor</a>.
Normally (well under Servlets) you can pass a parameter in the url like
this: http://www.pyplia.com/wibble.jsp#ImAnAnchor, and the browser will take
you to the point of the Anchor. Has anyone managed to get this to work
under Struts Actions?
Cheers in advance
Christopher Marsh-Bourdon Pyplia Limited www.pyplia.com WWW
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar – get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]