aspose file tools*
The moose likes JSP and the fly likes Hyperlink Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Hyperlink" Watch "Hyperlink" New topic
Author

Hyperlink

Ram Adsumalli
Ranch Hand

Joined: Oct 16, 2006
Posts: 64
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

Joined: Jan 10, 2002
Posts: 60997
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60997
    
  65

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

Joined: Oct 16, 2006
Posts: 64
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

Joined: Nov 24, 2005
Posts: 14687
    
  16

If i am not passing any prameters

You're actually passing one parameter in your example. A parameter called "uri".


[My Blog]
All roads lead to JavaRanch
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60997
    
  65

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hyperlink