Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Problem With RequestMap and Spring Web 3

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
andrea mucci
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's true Mark


now work well, thank's for your time
 
To do a great right, do a little wrong - shakepeare. twisted little ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic