I am new to Servlet, and this might be a dumb question, but I’ve been searching for a solution online for a long time, but still cannot find an answer.
I am trying to insert a link using servlet. Everyday said simply use:
//response is the HttpServiceResponse
PrintWriter out = response.getWriter();
out.println("<A HREF=\"http://www.something.com\">link</A>");
however, every time when I do that, all the < turn into ‘<’; which was really annoying.
Please let me know how to solve this?
I am running my code on eclipse(Indigo), would that be a factor?
Thank you
Well this isnt’ the way to use Servlet..
if you just need to put static link don’t use java simple HTML is enough .
Or in case you need dynamic URL then
from Servlet
on jsp