File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Having problem in ModelAttribute and Pathvariable Annotation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Having problem in ModelAttribute and Pathvariable Annotation" Watch "Having problem in ModelAttribute and Pathvariable Annotation" New topic
Author

Having problem in ModelAttribute and Pathvariable Annotation

Anupam Dee
Ranch Hand

Joined: Oct 18, 2010
Posts: 42



now when in my browser i type http://localhost:8080/Temp1/viewdata/1
i get a blank page

my reply.jsp has following contents
<body>
${data}
</body>

Is there a problem with ModelAttribute or Pathvariable?
Please help
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

If debug symbols are in your code, the @PathVariable should work. But even with it, I always state the path variable name like
@PathVariable("id")

Also if you connect your remote debugger you can set a break point and step through it to see what the values are being set to.

Also when you page does get rendered. Look in the view source to see if there is something there that just the browser isn't displaying (maybe)

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Having problem in ModelAttribute and Pathvariable Annotation