Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7551965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:38:13+00:00 2026-05-30T10:38:13+00:00

I have a spring 3 application where i am using jquery to post ajax

  • 0

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

$.ajax({
                    type: "POST",
                    url: "/xxx/xxx/xxx/accept",
                    data: "bId=" + bId+
                    "&minDelTime=" +minDelTime,
                    success: function(response){
                        if(response.errorText == null)  {
                                                //this works fine
                            alert(response.orderId);
//this is where i have to redirect with response as parameter                           
window.location.replace("/xxx/xxx/xxx/confirm/"+response.orderId);

                        }   else    {
                            alert(response.errorText);
                        }                       
                      },

My next page controller –

@Controller
@RequestMapping("/xxx/xxx/confirm")
public class ConfirmationController {
@RequestMapping(value = "/orderVo", method = RequestMethod.GET)
    public String showOrderConfirmPage(@PathVariable MasterVo orderVo, Model model) {
        LOGGER.info("Entry showOrderConfirmPage()");
        LOGGER.debug("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ : " + orderVo.toString());
        LOGGER.info("Exit showOrderConfirmPage()");
        return "/xxx/orderConfirmView";
    }
}

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

Update –

I tried serializing object –

success: function(response){
                        if(response.errorText == null)  {
                    $.post("orderVo", response.serialize(), function(data) {
                window.location.replace("/xxx/xxx/xxx/confirm/");
                            });

but i am getting Uncaught TypeError: Object # has no method ‘serialize’

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T10:38:14+00:00Added an answer on May 30, 2026 at 10:38 am

    why not just redirect?

    return "redirect:/xxx/orderConfirmView";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this web application using Spring Web Flow framework. In my main page
In my Ajax request (using jQuery ) I am returning a JSON response. So
Hey I am developing an desktop application using Spring and Hibernate, and I have
I have a web application using JPA and JTA with Spring. I would like
I'm building a web application using Stripes and Spring. It needs to have a
I'm using Hibernate with Spring in my application. I have been consistently using detached
I have an extremely simple web application running in Tomcat using Spring 3.0.2, Hibernate
I am using Spring MVC to build my web application, and I have a
I have a portlet application. It is configured using Spring framework IoC container. I
I am using Jquery form plugin to upload file in Ajax request.File is successfully

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.