Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Spring and the fly likes How to redirect another page with value object fron ajax request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "How to redirect another page with value object fron ajax request" Watch "How to redirect another page with value object fron ajax request" New topic
Author

How to redirect another page with value object fron ajax request

sachin yadav
Ranch Hand

Joined: Nov 24, 2005
Posts: 156
I have a spring 3 application where i am using jquery to post ajax request. Now i want to redirect my page to another page after ajax response comes. A Pojo is returned by the 1st page controller, which is to be passed to 2nd contoller. i know how to redirect but have no idea how to pass this PoJo to next form controller



My next page controller -



But i am getting error always. Can someone please tell me how to pass object(Pojo) to new page controller?
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

I don't see you doing a redirect there. What data do you mean, the incoming data of MasterVo? If you want that object available to the orderConfirmView page, then you can just add the orderVo to the model objects. Then that object will be available to the page and accessible via ${} in your page where you put the name and variable in between the {}

so

model.addAttribute("orderVo", orderVo);

now you can do

${orderVo.someProperty}

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to redirect another page with value object fron ajax request
 
Similar Threads
Spring model attribute is not populating values
@Responsebody for HTTP msg and a View to show the HTTP response msg
How to pass an object between MVC controllers?
Spring mvc and Ajax
Controller redirect to another Controller?