File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

User Defined Result types

 
Khushboo Seth
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

My requirement is to redirect from login page to various other pages depending upon the role of the user as each user is provided with a set of rights.
Please tell me how we can define result types?
At present,using the xwork jar the types available are SUCCESS,INPUT,LOGIN,ERROR,NONE.

Thanks.
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Result names can be any String value. The xwork values are simply commonly used defaults. Struts maps the return value of the execute method to what's declared in struts.xml.
If you want to get fancy and use symbols instead of String literals, create an interface with the role names as static Strings and have your action "implement" it.
 
Khushboo Seth
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. Its working !!!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic