Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6332949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:22:15+00:00 2026-05-24T18:22:15+00:00

I am new to Servlet, and this might be a dumb question, but I’ve

  • 0

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 ‘&lt’; 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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T18:22:16+00:00Added an answer on May 24, 2026 at 6:22 pm

    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

    request.setAttribute("urlID",someValue);
    //forward the request to jsp
    

    on jsp

    <a href="http://staticPartOfURl?id=${urlID}"> click me</a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been following this guide and still dont get it (Im quite new to
I'm fairly new to servlets so I hope this isn't an obvious question. So
I am new to Java. But I studies Core Java and J2EE1.4(Servlet N JSP)
I got this exception. This is my code: ApplicationContext context = new ClassPathXmlApplicationContext(classpath*:/servlet-context.xml); UserDao
I've googled this, as well as checked the documentation , but not been able
If i Upload a file to my servlet like this: HttpClient httpclient = new
Been on this one for a few days now. I have a java servlet,
I got this error when created a new Servlet in Eclipse : java.lang.Error: Unresolved
I am new to Tomcat, and trying to run a simple HelloWorld servlet. I
I am familier with jQuery,Ajax and JSP Servlets but new to Struts2.I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.