*
The moose likes Spring and the fly likes Problem With RequestMap and Spring Web 3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Problem With RequestMap and Spring Web 3" Watch "Problem With RequestMap and Spring Web 3" New topic
Author

Problem With RequestMap and Spring Web 3

andrea mucci
Greenhorn

Joined: Aug 12, 2011
Posts: 4
Hi All

this is my controller:



if i use this url: http://mysite.com/barencode/codabar/aljfhjadhf?_token=ashgdkashd
all work well but when i use an autogenerated code from mashape.com ( this is the API container ) i obtain this error:


why spring dont match the handler. apparently the url is the same as the previous url?
i don't undrstand

Would any good soul who could help me?
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17258
    
    6

Just a guess, because a lot looks fine and as you said the URL you tried worked. So the only thing that stuck out to me was

headers="Accept=application/json, application/xml"

So your method will be called as long as the accept header is valued at json or xml. What if the request mashape created had a different accept header value, then it wouldn't match your request mapping.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
andrea mucci
Greenhorn

Joined: Aug 12, 2011
Posts: 4
That's true Mark


now work well, thank's for your time
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem With RequestMap and Spring Web 3