Status 405 « URL « JSP-Servlet Q&A





1. HTTP Status 405 - HTTP method GET is not supported by this URL    java-forums.org

package welcome; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class WelcomeLotto extends HttpServlet{ public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); String strUsername = request.getParameter("username"); String strPassword = request.getParameter("password"); String strUsername2 = "admin"; String strPassword2 = "technology"; String strValidateUN = strUsername2; String strValidatePW = strPassword2; if(strUsername != strValidateUN ||strPassword != strValidatePW ) { out.println(""); ...