Reputation: 1
I'm developing a web app using the following code, but I end up with an error:
After i clicked submit button in html, the error 405 occurred. Please help check where i should make changes..Thanks alot
Upvotes: 0
Views: 107
Reputation: 279890
HTTP method GET is not supported by this URL Tomcat
This cannot be any clearer.
You are sending a GET request to a server that has registered a UploadImage
servlet that only handles POST requests.
In this case, it inherits HttpServlet#doGet(..)
which returns 405 Not Supported status code.
Either send a POST request or have your Servlet
override the doGet(..)
method.
Upvotes: 2