File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hyperlinks to the same page

 
Adam Rose
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there, could someone please help me with this, I'm tearing my hair out!
I'm trying to link to another part of a JSP page using the normal HTML method, ie
<a href="#test">jump to test</a>
<a name="test">jumped</a>
But as the page is produced by a servlet and a JSP, the link is pointing to http://..../ServletName#test, which is reloading the whole page and making it really slow. Does anyone know how to make it stay on the same page? Maybe using JavaScript?
Thanks for your help, Adam
 
chanoch wiggers
Author
Ranch Hand
Posts: 245
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
finally remembered how to do this. You need to set the following meta tag in the header of your page:
<base href="http://localhost:8100/yourapp/locationofyourjsp">
that will resolve the links correctly
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic