I have some java code in a servlet which I want the user to re-directed to an HTML file via a link:
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//...
StringBuffer sb = new StringBuffer();
sb.append("<a href=\"login.html\">Login</a>")
//...
}
Given that this is syntatically correct, the servlet will produce a link. The link shows me ERROR 404: Project/login.html
The url-mapping in the web.xml for Project uses /login for the LoginServlet. But I dont want to be directed to the LoginServlet. I neeed to be directed to the login.html that is in my WEB-INF under WebContent project directory.