• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hyperlink

 
Ram Adsumalli
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys

I am new to Java. I need to learn how to use hyperlinks in my JSPs. Can any one point me to the specifc hyperlink tutorial and how can i use it by passing the paramaeters .If possible explanation with a simple example will make me easy to understand

Thanks
Ra,
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65124
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remember that JSP is merely a templating technology to create HTML pages to send to the browser.

So what beyond using the <a> tag to create links do you want to know?

Creating URLs for anchor tags is easy using the JSTL <c:url> action, but beyond that, you'll need to be more specific regarding what you need help with.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65124
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A simple example from a presentation I did on the subject:



More information is, of course, available in the JSTL specification.
[ March 01, 2007: Message edited by: Bear Bibeault ]
 
Ram Adsumalli
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

If i am not passing any prameters then I can use the simple statement like below to make the hyperlink work

<a href="/webforum/ViewTopic.do?uri=main.jsp>Some Topic</a>

Will this work or i need to do changes anywhere

Thanks
Ram
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If i am not passing any prameters

You're actually passing one parameter in your example. A parameter called "uri".
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65124
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ram Adsumalli:
an use the simple statement like below to make the hyperlink work


Of course. After all, a JSP page is just an HTML template.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic