Announcement Announcement Module
Collapse
No announcement yet.
POST and GET for same controller method ?? ambiguous mapping Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

  • #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.

    Comment


    • #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

      Comment


      • #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...

        Comment

        Working...
        X