• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Having problem in ModelAttribute and Pathvariable Annotation

 
Ranch Hand
Posts: 42
Firefox Browser Tomcat Server Windows XP
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic