Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Having problem in ModelAttribute and Pathvariable Annotation  RSS feed

 
Anupam Dee
Ranch Hand
Posts: 42
Firefox Browser Tomcat Server Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!