• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with @PathVariable in Spring 3

 
Justin Howard
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Hi All,

Is there any information I am missing ?

Thanks
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic