황은주 님이 쓰신 글 :
: Apache tomcat : http status 405
: HTTP method GET is not supported by this URL
: The specified HTTP method is not allowed for the requested resource (HTTP method GET is not supported by this URL).
: 이라는 메세지가 뜨면서 안되는데, 다른 설정이 필요한가요?
해당하는 URL이 가리키는 서블릿에 HTTP GET 메서드에 대한 서비스를 가능하도록 doGet 메서드를 구현해야 합니다.
public class SomeServletClassName extends HttpServlet
{
public void doGet(HttpServletRequest request, HttpServletResponse response)
{
//여기에 작업할 내용을 코딩
}
}
그리고, 이런 경우는 별로 없지만 위의 것으로도 동일한 오류가 발생한다면 서버 설정을 점검해야 합니다.
톰켓의 경우 해당 웹에플리케이션의 WEB-INF 디렉터리에 있는 web.xml 파일을 열어서 확인합니다.
이 파일에서 <security-constraint> 내에 <http-method>GET</http-method>이 있는지 확인합니다.
|