This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Spring and the fly likes Where am I wrong in using the ModelAttribute annotation? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Where am I wrong in using the ModelAttribute annotation?" Watch "Where am I wrong in using the ModelAttribute annotation?" New topic
Author

Where am I wrong in using the ModelAttribute annotation?

Anupam Dee
Ranch Hand

Joined: Oct 18, 2010
Posts: 42



index.jsp
<body>
Hello World ${"data"}
</body>

The output i am getting is only HelloWorld.

Please help where am I wrong?
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Try this instead



I still say you should set break points and step through code to see exactly what is happening. If you go into a dark room, you can't see anything. So turn on the lights. In this case that is debugging.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Anupam Dee
Ranch Hand

Joined: Oct 18, 2010
Posts: 42

Thank you so much.
If you don't mind I really don't know how to set breakpoints and I really need to know. So if you can suggest any links about setting the breakpoints.
Thanks in advance
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Where am I wrong in using the ModelAttribute annotation?
 
Similar Threads
Problem with CheckBoxes
How to return ModelAndView/redirect
Forward in Spring
Having problem in ModelAttribute and Pathvariable Annotation
Type [java.lang.String] is not valid for option items