Stack Exchange
GWT FormPanel submitting does not work
I'm trying to submit a form but for some reason it is not working. This is the servlet I created:
@SuppressWarnings("serial")
public class CreateCreditCardServlet extends HttpServlet implements Servlet {

    private final static Logger LOGGER = Logger.getLogger(CreateCreditCardServlet.class.getName());

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        LOGGER.debug("doGet");
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        LOGGER.debug("doPost");
    }
}

and its description in web.xml
<servlet>
    <servlet-name>braintree-create-credit-card</servlet-name>
    <servlet-class>com.mahlzeit.server.servlet.braintree.CreateCreditCardServlet</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>braintree-create-credit-card</servlet-name>
    <url-pattern>/app/create-credit-card</url-pattern>
</servlet-mapping>

This is the FormPanel:
<g:FormPanel ui:field="formCreditCard" action="/app/create-credit-card" method="post">
    <g:HTML>
      <input data-braintree-name="number" value="4111111111111111"/>
      <input data-braintree-name="cvv" value="100"/>

      <input data-braintree-name="expiration_date" value="10/20"/>

      <input data-braintree-name="postal_code" value="94107"/>
      <input data-braintree-name="cardholder_name" value="John Smith"/>
    </g:HTML>
</g:FormPanel>

and I'm essentially only calling submit() on the FormPanel
this.formCreditCard.submit();

For some reason the server side is never executes. doPost() is never being executed.
What's wrong here?

What response does your browser show in dev tools?

@AndreiVolgin Well, that's the thing. I see nothing. I don't see the post on /app/create-credit-card and thus no response. But I've added a SubmitHandler to check if submit() is really executed.. in the console I see the logging output from the SubmitHandler so the method is getting called. I've also tried to `setAction("/app/create-credit-card") but nothing is happening ..

But what do you see in the dev tools in your browser? Specifically, in the Network folder?
