servlet + hyperlinks

D

Daniel Pitts

Damo said:
Hi,
I'm writing a servlet that creates a html page with hyperlinks on it.
When I use the following code:

out.println("<b>KEY:</b> g - <a href='www.google.com'>Google</a>);

It creates the link but it adds it on to the servlet name like

http://localhost:8084/myproject/www.google.com

and then it does'nt work. Anyone know how i can create a link to just
say www.google.com

Thanks
its called a relative link. try adding an "http://" before
"www.google.com"

This is a simple HTML problem, nothing to do with servlets :)
 
T

trippy

Damo said:
Hi,
I'm writing a servlet that creates a html page with hyperlinks on it.
When I use the following code:

out.println("<b>KEY:</b> g - <a href='www.google.com'>Google</a>);

try this:

It creates the link but it adds it on to the servlet name like

http://localhost:8084/myproject/www.google.com

and then it does'nt work. Anyone know how i can create a link to just
say www.google.com

Thanks

--
trippy
mhm31x9 Smeeter#29 WSD#30
sTaRShInE_mOOnBeAm aT HoTmAil dOt CoM

NP: "The American Way" -- Sacred Reich

"Now, technology's getting better all the time and that's fine,
but most of the time all you need is a stick of gum, a pocketknife,
and a smile."

-- Robert Redford "Spy Game"
 

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,780
Messages
2,569,608
Members
45,241
Latest member
Lisa1997

Latest Threads

Top