Author
How to forward to jsp page and then jump to anchor of the page
Usera User
Greenhorn
Joined: Jul 13, 2005
Posts: 21
posted Jul 13, 2005 20:03:00
0
I want to forward to jsp page and then jump to anchor of the page. I have defined the anchor <a name='insert'> in the destination page and using the forward defination in action element in struts-config.xml <forward name="Success" path="view_data.jsp#insert"> But it doesn't work, the error is page not found. Has any idea ?
Jason Menard
Sheriff
Joined: Nov 09, 2000
Posts: 6450
Try the following... <forward name="Success" path="/ view_data.jsp#insert">
Usera User
Greenhorn
Joined: Jul 13, 2005
Posts: 21
posted Jul 14, 2005 18:44:00
0
It does not work. It seems that the server want to find the file "view_data.jsp#insert". The "#insert" is part of the filename.
sarvesh khatri
Greenhorn
Joined: May 05, 2005
Posts: 4
Instead of putting the anchor in struts-config.xml, append it at calling time Following example might help <action name="BaseForm" path="/viewdata" scope="request" type="BaseAction"> <forward name="Success" path="view_data.jsp"> </action> When calling above action /viewdata.do#insert
Srilakshmi Vara
Ranch Hand
Joined: Jul 21, 2004
Posts: 169
My situation is same, any ideas
Jan Groth
Ranch Hand
Joined: Feb 03, 2004
Posts: 456
don't know if it's the best solution, but if you executed based on a condition which you evaluated in the jsp, it will make IE (not FF...) jump to the anchor. the hard way, i know, but it works... jan
subject: How to forward to jsp page and then jump to anchor of the page