title: How do I create a hyperlink in java?
body: <p>I'm going through the <a href="https://developers.google.com/appengine/docs/java/gettingstarted/usingusers" rel="nofollow">google app engine tutorials</a></p>
  
  <p>I'm very new to google app engine, java and web programming in general. So my question is, at the bottom of the page it says to add a link to allow the user to log out. So far I've got this:</p>
  
  <pre><code>public void doGet(HttpServletRequest req, HttpServletResponse resp)
          throws IOException {
      UserService userService = UserServiceFactory.getUserService();
      User user = userService.getCurrentUser();
  
      if(user != null){
          resp.setContentType("text/plain");
          resp.getWriter().println("Hello, " + user.getNickname());
  
          String logoutLink = String.format("&lt;a href=\"%s\"&gt;Click here to log out.&lt;/a&gt;",
              userService.createLogoutURL(req.getRequestURI()));
          resp.getWriter().println(logoutLink);
      }else {
          resp.sendRedirect(userService.createLoginURL(req.getRequestURI()));
      }
  }
  </code></pre>
  
  <p>However instead of a link, the full string is printed to the screen including the tags. When I look at the page source, I have no  tags or any of the other stuff that goes with a webpage. I guess that makes sense considering I've done nothing to output any of that. Do I just do a bunch of resp.GetWriter().println() statements to output the rest of the webpage, or is there something else I don't know about?</p>
  
  <p>Thanks!</p>