Hi,

I am doing a very simple HTML to servlet invocation within ServiceMix.

My HTML is very simple with below form element:


<form name='testForm' method="post" action="RouteServlet">

<input type="text" name="userID" value="uid-12345"/>
<input type="password" name="password" value="uid-12345"/>
<input id="button" type="submit" name="submit" value="Submit"/>



My Servlet code is as below:


protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
System.out      
.println("------------------RouteTest1------------------------");
System.out.println("Do Post");
PrintWriter out = response.getWriter();
                response.setContentType("text/html");

                out.println("Response from Servlet");
}


Upon deployment I get below error:


HTTP ERROR 405


Problem accessing /RouteTest1/RouteServlet. Reason:

    HTTP method POST is not supported by this URL


I tried to add <http-method>post</http-servlet> within web.xml
<servlet-mapping> element but using servlet 2.5 it is not allowing me to do
so.

I also have added a static block to check if servlet is getting invoked but
it is also not appearing in the logs.

Can please assist with this?

Thanks in advance,
Manoj



--
View this message in context: 
http://servicemix.396122.n5.nabble.com/Getting-HTTP-405-in-POST-call-tp5715779.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to