Instead of servlet mapping in web.xml, I use the annotation to try to map the servlet to URL I am:
Import javax.servlet.annotation.WebServlet; Import javax.servlet.http.httpServlet; Import javax.servlet.http.HttpServletRequest; Import javax.servlet.http.HttpServletResponse; Import java.io.IOException; @WebServlet (name = "GuestbookServlet", urlPatterns = "/ guestbook") public class GuestbookServlet HttpServlet extends {@Override protected void doGet (HttpServletRequest request, HttpServletResponse resp) throws IOException {resp.setContentType ( "text / plain"); Resp.getWriter (). Println ("hello, world"); }} and I have also declared a 3.0 spec for servlet in web.xml:
However, when I run it on your local environment, the response 404 returned.
This works, but if I export it to the web. Xml What am I doing wrong? Does GAE still not support 3.0 specs?
Servlet 3.0 spec is not supported by GAE / J
On the Roadmap also:
you can show your support for this feature to help this issue Star:
this ticket lonnnggg time has been opened though.
No comments:
Post a Comment