Retrieving random radio button value

2010-07-07 Thread oneofthelions
jsp page [code] logic:notEmpty name=specialResult scope=request logic:iterate name=specialResult id=specialResult indexId=index tr align=centerhtml:hidden name=specialResult property=upId / %String upId = request.getParameter(upId); % //This upId,

Type-specific application-scoped error messages for standard conversion

2010-07-07 Thread Antonio S.
Hello all. Can I declare application-scoped error messages for standard conversion that are specific to the type being converted? Something like: For all int conversion erros in the whole application use message 'foo'; for all date conversion errors in the whole application use message 'bar'; and

Iterate the list of Formbean into jsp file

2010-07-07 Thread rspsaran
is it possible to creat arraylist with values in formbean and iterate that into jsp file using logic tag?. i have created arraylist in my actionform class and i want to iterate that list and add that values into optios box injsp file using logic iterator tag -- View this message in context:

Re: Iterate the list of Formbean into jsp file

2010-07-07 Thread Paweł Wielgus
Hi, it's possible, use logic:iterate, also You can read about optionsCollection tag, then there is no need for iterating. Best greetings, Paweł Wielgus. 2010/7/7 rspsaran rsp.sa...@gmail.com: is it possible to creat arraylist with values in formbean and iterate that into jsp file using

Authorization Best Practices

2010-07-07 Thread Amol Ghotankar
Dear List members, Using Struts 2.x can we do authorization of client request, if yes what are the best practices for the same please discuss. Authorization will have two parts 1. decide which action are allowed and which are not, 2 . decide how much data to access. Means if I have a database

Re: Authorization Best Practices

2010-07-07 Thread Dale Newfield
On 7/7/10 7:04 AM, Amol Ghotankar wrote: Authorization will have two parts 1. decide which action are allowed and which are not, Spring Security. 2 . decide how much data to access. Means if I have a database which has 100 rows, then to show 100 or 10 or 50 based on the role of the user

Re: Authorization Best Practices

2010-07-07 Thread Brian Thompson
On Wed, Jul 7, 2010 at 8:31 AM, Dale Newfield d...@newfield.org wrote: Including a notice like this on a request for help sent to a public, archived mailing list is obnoxious.  JSYK, I've been seriously considering instituting a personal policy whereby I will never respond to such messages.

Re: Authorization Best Practices

2010-07-07 Thread Amol Ghotankar
Dear List members, 1. decide which action are allowed and which are not, What I used was a spring AOP which intercepted Struts 2 actions, this was very simple and straight forward. 2 . decide how much data to access. This I am really working something where struts2 intercepter will read what

Re: Authorization Best Practices

2010-07-07 Thread Dale Newfield
On 7/7/10 1:28 PM, Amol Ghotankar wrote: 2 . decide how much data to access. This I am really working something where struts2 intercepter will read what role the user has and set some global role for that reqest which will be read by dao to use to fetch the data. The interceptor cannot know

Re: Authorization Best Practices

2010-07-07 Thread Ken
On Wed, 2010-07-07 at 13:34 -0400, Dale Newfield wrote: On 7/7/10 1:28 PM, Amol Ghotankar wrote: 2 . decide how much data to access. This I am really working something where struts2 intercepter will read what role the user has and set some global role for that reqest which will be read

Re: Authorization Best Practices

2010-07-07 Thread Amol Ghotankar
Dear List member, The issue we are discussing here is Authorization using Struts2x. Part 1. How to control access of actions i.e which actions can be accessed by which user role Part 2 . How to control access of data from back end database based on action/user-role. i.e how much data should

Re: Authorization Best Practices

2010-07-07 Thread Dale Newfield
On 7/7/10 2:11 PM, Ken wrote: This is a hand rolled solution I used: Create an interceptor which checks if a User object exists when accessing a secure package, if it does not exist redirect the user to a login page and record the initial url (will redirect back to that page after login). This

Re: Authorization Best Practices

2010-07-07 Thread Ken
On Wed, 2010-07-07 at 14:40 -0400, Dale Newfield wrote: On 7/7/10 2:11 PM, Ken wrote: This is a hand rolled solution I used: Create an interceptor which checks if a User object exists when accessing a secure package, if it does not exist redirect the user to a login page and record the

Emailing the contents of a Struts2 view?

2010-07-07 Thread Chris Miles
Is it posible for me to render a view after an action and be able to access the HTML for sending in an email rather than rendering to a browser? thanks Chris

Re: GET method action current value encoding

2010-07-07 Thread Greg Lindholm
Maybe this will help. The Page Encoding is separate and distinct from the URI encoding. On a GET the parameters are encoded according to the URI encoding (not the page encoding). If you are using Tomcat then you need to specify the URI encoding on the Connector in the server.xml file. Example:

Re: Authorization Best Practices

2010-07-07 Thread Dale Newfield
On 7/7/10 2:26 PM, Amol Ghotankar wrote: Part 2 . How to control access of data from back end database based on action/user-role. i.e how much data should be returned through called action, 10 rows, 100 rows or 1000 rows from database, based on user role and/or called action. Whether data

Re: Emailing the contents of a Struts2 view?

2010-07-07 Thread Amol Ghotankar
If you just want to send mail after some action is executed then I think you can do it by using action-redirect You can redirect the action to send email action. Regards, Amol Ghotankar On Thu, Jul 8, 2010 at 1:08 AM, Chris Miles ch...@chrismiles.org wrote: Is it posible for me to render a

Re: Authorization Best Practices

2010-07-07 Thread Amol Ghotankar
Dear List Members, Lot of theory put here now lets talk with example. Lets assume there are three roles a user can have 1. user 2. manager 3, admin Lets assume a simple CRUD use case which has four actions 1. insert 2. update 3. delete 4. list Now A. Part 1. 1. users loged in with user

Display ActionMessage added from different action

2010-07-07 Thread Franz Wong
Hi, I am using Struts 2. I have a page which contains 2 forms. Each form corresponds to different Actions (Action B / C). The action adds ActionMessage and redirects back to the original page. I would like to display the ActionMessage in the form which triggered the Action. How do I perform this