• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with @PathVariable in Spring 3

 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am trying to use Spring 3 MVC framework.
I am having trouble mapping the below code to the request.

When I use just @RequestMapping(value="/research/listResearch.html") it works fine.

I get a 404 The requested resource (/marketingforms/research/listResearch.html/10) is not available.

Am I missing any configuration?

Thanks
 
Justin Howard
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Is there any information I am missing ?

Thanks
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you've mapped the DispatcherServlet to *.html, I don't think this is going to work. I don't remember seeing urls like that. Usually, the filename comes last. You could have something like /research/{status}/listResearch.html instead.
 
Justin Howard
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I apologize for the late reply. I did not get a notification for your reply.

But you are correct. The @Pathvariable works perfectly with the URL format you privided.

Since this had not worked for me earlier I implemented it in a different way.

reply
    Bookmark Topic Watch Topic
  • New Topic