Help! JSP/Links on the same page

M

mt

Hello all,

From a JSP I'm calling a servlet which function is to add some
information to an application being filled. Now the thing is that in
the JSP I have three different forms that works with related data of
the application. I want to be able to fill one of the forms and when
I click the button I want to be able to return to the form but in the
position/location of the form instead of the top of the page.
I know that with HTML you can create a tag (i.e. <a href="#thisForm">
) and when you call the page with the link like
www.page.com/thispage.htm#thisForm you will get into that tag. Is
there a way similar to create this using JSP. Please let me know!!!

Thanks in advance,

mt
 
S

Sudsy

mt wrote:
... Is there a way similar to create this using JSP. Please let me
know!!!

No way to tell without additional information. The content of web.xml
would be a good starting point...
 
S

Sudsy

mt said:
Ok, lets put it this way. From a JSP I want to create something
similar as the <a name="name"> tag from HTML and then call as for
example "http://page.com/index.jsp#goToNames. Is that possible? I

So why not just do it that way, i.e. have anchors defined in the form
returned to the client. Another way would be to have a piece of
JavaScript at the bottom of the page set focus to the desired
element.
 
A

Alex Kizub

Probably you don't know but JSP produces just html.
And html is html everywhere.
So in your case it would be exactly the same:

I know that with HTML you can create a tag (i.e. <a href="#thisForm">
) and when you call the page with the link like
www.page.com/thispage.htm#thisForm you will get into that tag.

Alex Kizub.
 
M

mt

OK, I understand that, now the situation is... how do I define that in
a web.xml file??? I'm running a tomcat server and it appears the 404
error for /webapp/index.jsp#form . How can I define this in the
web.xml??? I know there is a jsp tag in the web.xml under the servlet
tag. Thanks for al the help in this. :)

mt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top