file upload error Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]
Problem :
file upload error Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]
Solution:
If you are using Spring MVC with Spring security then main problem was in spring security.
I resolved this problem by adding ${_csrf.parameterName}=${_csrf.token}
to end of my form action
file upload error Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]
Solution:
If you are using Spring MVC with Spring security then main problem was in spring security.
I resolved this problem by adding ${_csrf.parameterName}=${_csrf.token}
to end of my form action
HTML:
1 2 3 4 | <form method="POST" action="/uploadExcelFile?${_csrf.parameterName}=${_csrf.token}" enctype="multipart/form-data"> <input type="file" name="file" /><br/><br/> <input type="submit" value="Submit" /> </form> |
Comments
Post a Comment