I followed a tutorial that showed how to submit a form to GAE and submit it to a servlet in the same application. When I submit a form that the servlet responds to, but I cannot read the data using getParameters () or any other method that I was looking for; I do not know if the problem is a client or server, or both. here is the entry point code:
public class HelloWorld implements EntryPoint { public void onModuleLoad() {
}
I tried 20 different things on the servlet to no avail. here is the code
public class FormHandler extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { super.doPost(req, resp); System.out.println("got to servlet doPost"); System.out.println(req.getParameter("textBoxFormElement")); Enumeration e = req.getParameterNames(); while(e.hasMoreElements()) { String s = e.nextElement().toString(); System.out.println(s); } System.out.println("done for now"); }
}
this is the result: got to the doPost servlet ....... ............ zero ........ done at the moment
java java-ee google-app-engine gwt
Rubber duck
source share