This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html:link tag

 
Nag Bussa
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have a link in my JSP. If I click on that link, it should take me to named section(named with XYZ i.e <a name="XYZ"> in another JSP page.

Code in JSP:


This code is basically generating anchor tag like this:


This way, I am going to target jsp but not to the XYZ section in the target JSP.

Is there any other parameter I should use in <html:link> tag to go the appropriate section in target JSP?

Thanks.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because you are going through an intermediary action before getting to the JSP, using the anchor attribute isn't going to work.

I'd suggest passing an anchor parameter along with the URL. Then in your action class, you can set the anchor before forwarding to the JSP. Example:
 
Nag Bussa
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Merill.
I am using Tiles in my application. The code below gives me tiles name but doesn't resolve to actual jsp.



How do I take the control to actual JSP? Thanks for your inputs.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The fact that you're using tiles makes the problem much worse. I have no idea how to accomplish this with tiles, and I'm not even sure it's possible. Any tiles experts out there want to tackle this one?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic