1
votes

I'm starting a servlet extending google's RemoteServiceServlet in Jetty. It did not work with this error: HTTP method GET is not supported by this URL

I searched this error and found that RemoteServiceServlet does not implement doGet and doPost. I tried this link http://docs.codehaus.org/display/JETTY/GWT. It didn't work either. Any ideas how I can get it to work? Should I send back the html file in the doGet?What should I do in the doPost?

Thank you

2
Any chance for the code of the servlet? :] - Igor Klimer

2 Answers

2
votes

RemoteServiceServlet is designed to be used with GWTRPC. This means, that you don't implement doPost or doGet at all (doPost is even final in AbstractRemoteServiceServlet). You implement your own service methods instead, which you specify in your RemoteService interface.

If you want to implement doPost/doGet yourself, instead of using GWTRPC (see "Making HTTP Requests" in the GWT documentation), then extend the usual HttpServlet instead of RemoteServiceServlet. If you need both, I would suggest to create two separate servlets.

0
votes

Removing super.doGet(req, resp) in my doGet method helped me. Anyway there is not much usefull operations in it.