-
Oct 12th, 2012, 05:16 AM
#1
POST and GET for same controller method ?? ambiguous mapping
Hi,
we are working on an app which works fine but we have a problem where we need some controller methods to support GET and POST
So I am trying to make all all controller methods support GET and POST using the RequestMethod array option:
@RequestMapping( value = "/xxx/yyy", method = { RequestMethod.GET, RequestMethod.POST } )
public ModelAndView xxx( @RequestParam( ).... {
but it doesnt seem to work, I get ambiguous mapping errors
any ideas?
-
Oct 12th, 2012, 05:35 AM
#2
Post the logging... If you get this error it means the exact same @RequestMapping is used somewhere else... Enable debug logging and check which controller methods map to which URL.
-
Oct 12th, 2012, 05:41 AM
#3
I dont think so. Are you sure @RequestMapping supports GET and POST at same time in its requestMethod array ?
this is only mention of it I have found
http://www.intertech.com/Blog/Post/S...r-Methods.aspx
-
Oct 12th, 2012, 05:45 AM
#4
I do think so
... Else having multiple methods on the @RequestMapping would be pretty useless... So yes it is supported and as mentioned check your logs (enable debugging) and you sould soon enough find the culprit...
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules