Wildfly - My application does not run

Asked

Viewed 55 times

0

Hey, you guys......

I have my development environment with Eclipse + Wildfly 8.2.1. I imported my project . War, I can start the server and it deploys no errors. The problem is when I will run login, it returns : "HTTP method POST is not supported by this URL" And it does not reach the controller Servlet. I did testing by changing the p/GET method and the message remains the same. How can I resolve this ?

1 answer

0

It’s because you’re calling doPost() without implementing doPost(). It is the standard implementation of doPost() which throws the error saying that the method is not compatible.

See more information here

For example:

public void doGet(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException
{
    doPost(req,res);
}

public void doPost(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException
{

    System.out.println("Hola");

}
  • Please keep the use of the tongue Brazilian Portuguese in the posts, the site is Brazilian and Spanish is not very familiar here.

  • 2

    Just one comment: it is not mandatory to use Portuguese from Brazil, this has already been discussed by the community. The community is in Portuguese, whether en or en.

  • But he had not written even in English.

  • 1

    @Cypherpotato - My apologies in translation - I can read (a little) many derivatives of Spanish languages / Latin and did not realize it was Portuguese

Browser other questions tagged

You are not signed in. Login or sign up in order to post.