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 Display messages from controller on top of JSP page 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 "Display messages from controller on top of JSP page" Watch "Display messages from controller on top of JSP page" New topic
Author

Display messages from controller on top of JSP page

ashish kulkarni
Ranch Hand

Joined: Aug 15, 2002
Posts: 130
Is there any good way of putting messages from controller to JSP pages, for examples in JSF i can use FacesContext and populate messages in this context and they are available to be displayed in JSP page,
Is there a similar kind of mechanism in spring and mvc


A$HI$H
Vyas Sanzgiri
Ranch Hand

Joined: Jun 16, 2007
Posts: 686

request scope, session scope


===Vyas Sanzgiri===
My Blog
Miku Ranjan
Ranch Hand

Joined: Oct 11, 2011
Posts: 98
Hi,
You can send your message along with the ModelAndView then use that in the jsp.
ashish kulkarni
Ranch Hand

Joined: Aug 15, 2002
Posts: 130
Does anyone have an example of how to do it,
If my controller is like, it does not have Model, how can i get instance of Model in my controller

Vyas Sanzgiri
Ranch Hand

Joined: Jun 16, 2007
Posts: 686

http://static.springsource.org/docs/Spring-MVC-step-by-step/part1.html#step1.8
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Display messages from controller on top of JSP page
 
Similar Threads
Servlet Mapping
Issue with getting Message from properties file in Controller, but works in JSP
Can I access a jsp page which is in WEB-INF folder?
Controller in MVC architecture
senRedirect how to diferntiate in the different jsp file?