OK, so there's plenty of HTML in template text (outside of JSP scriptlets). Your link should be like those. Remember you can end os open your scriptlets at any point. (And remener that you shouldn't be using Java code at all in a JSP, that's a bad practice in the first place.)
Joined: Feb 18, 2013
so how will i chnaged the code to link to the link.
this will not let me connect to google or yahoo or other link.
this only connect internal link or .jsp link. i put many link in the database, and i wish this link will connect to the properly link when i show the data out.
If you want to put an <a> element in your HTML, just do that. Outside of the scriptlet, of course. Just like you did in that example for <table> elements and so on. It's just HTML.
And there aren't any restrictions on what the href attribute can link to because you're just generating HTML which is going to be in the browser. If you're having problems with non-working links, that would be because you aren't generating the right value for the link. To find out why, use the "View Source" feature in your browser to see what value you generated, and then fix your code to generate the correct value.
Joined: Feb 18, 2013
i have a jsp page for user to input link, so the link the user input into the datbase, and it will direct to a new page which show the link they input(which is the soruce code i put above) .
do all the link is automatic drag form the database. so i am unalbe to use <a href= xxxxx> xxxxx </a>/
i need to print hte data from databse and make a hyperlink. but the hyperlink will not connect to what the user type in the link.
forexample: user type www.google.com into database==> it must show www.google.com with a connection to www.google.com.
Then you need to fix your JSP code so that it outputs a URL which does link to Google's home page. The first step for doing that is to find out what that URL is. So... What URL do you type into your browser if you want to go to Google? It isn't that URL you posted, is it?
And if I recall right, the URLs are coming from a database. That would mean you'd have to fix the database so it contained usable URLs.