Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Redirect and RedirectAction result types

 
Joe Harry
Ranch Hand
Posts: 10122
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

What woule be the difference between these two Action types? Both seem to have the same purpose. I mean I can very well use the Redirect result type to redirect to an Action class. Why do I explicitly need a RedirectAction result type?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You *could* redirect to an action, but then you have to specify the full URL of the action including the extension rather than simply specifying the action name (and optionally its namespace).

"redirectaction" works with the framework, "redirect" is a standard servlet spec redirect that ignores the framework.
 
Joe Harry
Ranch Hand
Posts: 10122
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good! Thanks!
 
Leonardo Carreira
Ranch Hand
Posts: 494
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry..

i have a little problem to redirect any action...

example :
now iam in URL : http://localhost:8080/MyApplication/Admin/Tasks/new.action
so..
how to i redirect to URL : http://localhost:8080/MyApplication/Admin/Example/show.action

now i use 2 process "GET" for go to http://localhost:8080/MyApplication/Admin/Example/show.action

first process go to URL : http://localhost:8080/MyApplication/Admin/Tasks/Just.action
which result to Velocity which embed :
<meta HTTP-EQUIV="REFRESH" content="0; url=http://localhost:8080/MyApplication/Admin/Example/show.action">

is it a good idea?..

CMIIW.

Regards,
W
(Sorry my english isn't too good)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic