aspose file tools*
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
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "How to add param in redirect View" Watch "How to add param in redirect View" New topic
Author

How to add param in redirect View

Monicka Akilan Rk
Greenhorn

Joined: Jun 24, 2013
Posts: 1
Hai,

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(".abc.xyz?Get=Get", true);
return new ModelAndView(view.getUrl());

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

==========================================================================
I used ".abc.xyz " 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
Bartender

Joined: Mar 07, 2010
Posts: 1672
    
    7

Welcome to the Ranch!

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

http://www.coderanch.com/t/590033/Spring/return-ModelAndView-redirect#2703519
http://www.coderanch.com/t/571197/Spring/pass-cookies-java-spring#2601860

You can add lists too:
http://www.coderanch.com/t/613763/Spring/spring-mvc-jsr-handling-error#2805307


[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to add param in redirect View