• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

How to add param in redirect View

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch!

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

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

You can add lists too:
https://coderanch.com/t/613763/Spring/spring-mvc-jsr-handling-error#2805307
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic