HTTP method GET is not supported by this URL
Posted
by Alvin
on Stack Overflow
See other posts from Stack Overflow
or by Alvin
Published on 2010-06-08T06:14:32Z
Indexed on
2010/06/08
7:42 UTC
Read the original article
Hit count: 422
Hi,
I'm calling servlets which has implemented CometProcessor interface, and whenever I try to call the servlets with get request, I'm getting the above error. May I know the reason?
public class ChatServlets
extends HttpServlet implements CometProcessor {
public void event(CometEvent event)
throws IOException, ServletException {
HttpServletRequest request = event.getHttpServletRequest();
HttpServletResponse response = event.getHttpServletResponse();
if (event.getEventType() == CometEvent.EventType.BEGIN) {
response.getWriter().println("Welcome ");
} else if (event.getEventType() == CometEvent.EventType.READ) {
response.getWriter().println("Bye");
}
}
}
© Stack Overflow or respective owner