This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Spring and the fly likes How to add param in redirect View Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "How to add param in redirect View" Watch "How to add param in redirect View" New topic

How to add param in redirect View

Monicka Akilan Rk

Joined: Jun 24, 2013
Posts: 1

Am working in spring. I use redirect view to redirect to a particular url , In that controller post method i used param to differentiate different different action called search,update,Delete.
Now i dont know how to pass param in redirect view

******************************* My redirect code is*********************
RedirectView view = new RedirectView("", true);
return new ModelAndView(view.getUrl());

*********************************Controller method have to call*****************
@RequestMapping(value = "/aaaa", method = RequestMethod.POST,params = {"search"})

I used " " this is a tiles view name.
Whether i have to give view name or direct url.
I need to call that method..


I got 404 error it cant reach that controller

Please help me to sort out of this problem.

Thanks in advance
Bill Gorder

Joined: Mar 07, 2010
Posts: 1648

Welcome to the Ranch!

Use RedirectAttributes. Here are some posts on it in the past

You can add lists too:

[How To Ask Questions][Read before you PM me]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: How to add param in redirect View
Similar Threads
ModelAndView: redirect as 301 (Permanent) not 302 (Temp)?
Spring ModelAndView Question
RedirectView question
How do I create a basic confirmation page with dynamic content?
Spring Framework-referenceData()