I'm having a problem using eclipse that recently appeared. When I try to run any .jsp file i get the
404 error resource not available.
However if I run the .java file I get the page loaded up. executing the following java code I can get the page to run but it still wont redirect the page after the correct button is pressed. I get no other error messages other than the one I already mentioned.
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html");
String action = null, address = null;
address = "/WEB-INF/PhonebookMain.jsp";
action = (String) request.getParameter("action");
if(action == null){
action = "nema";
}
if(action == "nema"){
}else
{
if(action == "Unos"){
address ="/WEB-INF/Unos.jsp";
}
if(action == "Izmjena"){
address = "/WEB-INF/Izmjena.jsp";
}
}
RequestDispatcher dispatcher = request.getRequestDispatcher(address);
dispatcher.forward(request, response);
}
}