| Author |
Problem with @PathVariable in Spring 3
|
Justin Howard
Ranch Hand
Joined: Feb 19, 2009
Posts: 162
|
|
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
Joined: Feb 19, 2009
Posts: 162
|
|
Hi All,
Is there any information I am missing ?
Thanks
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
|
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.
|
[My Blog]
All roads lead to JavaRanch
|
 |
Justin Howard
Ranch Hand
Joined: Feb 19, 2009
Posts: 162
|
|
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.
|
 |
 |
|
|
subject: Problem with @PathVariable in Spring 3
|
|
|