Wildfly - My application does not run

0

Hi, guys ... breaking your head several days ago ...

I have my development environment with Eclipse + Wildfly 8.2.1.    I imported my .war project, I can start the server and it deploy    no mistakes. The problem is when I'm going to run login, it returns:    " HTTP method POST is not supported by this URL "    And it does not reach the servlet controller. I did the test by changing the p / GET method and    the message remains the same. How can I resolve this?

    
asked by anonymous 17.01.2018 / 22:16

1 answer

0

It's because you're calling doPost() without implementing doPost() . It is the default implementation of doPost() that 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");

}
    
17.01.2018 / 22:32