aspose 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 Java 8 in Action this week in the Java 8 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
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?
Issue with getting Message from properties file in Controller, but works in JSP
Servlet Mapping