Re: How do I prevent two calls concurrently?

2008-01-15 Thread Mufaddal Khumri
Eric How would I prevent this from occurring? [Questions] 1. Is it simply a matter of making my service an instance variable of this action and making the login method synchronized? 2. Are there situations where I would not want there to be a single service

Question on Application, Session, Request Awareness best practices ...

2008-01-15 Thread Mufaddal Khumri
Hello, Since struts2 actions are not shared amongst requests and if these actions are Aware of one of the scopes they essentially have a copy of that scope's parameters in a map. Lets say the application has about 15 attributes and the session has about 7 attributes. Que1. When you add a

Re: Secure ajax call using prototype to a struts action ....

2008-01-14 Thread Mufaddal Khumri
in your server? if its other than 443 you need to specify it in your URL. try to see your URL is working in with out ajax. if you like have a look at this plugin http://code.google.com/p/struts2-ssl-plugin/ Thanks, Nuwan On 1/11/08, Mufaddal Khumri [EMAIL PROTECTED] wrote: I am using

Secure ajax call using prototype to a struts action ....

2008-01-11 Thread Mufaddal Khumri
I am using prototype with Struts2. One of my Ajax calls submits the login form (username and password) to a struts action like this: new Ajax.Updater( 'modal', '/blog/authentication/login.action', { method: 'post', parameters:

ActionErrors - is there a way to manually look them up ? ...

2008-01-11 Thread Mufaddal Khumri
I am using ftl templates for the view and want to have access to the collection that has all the error messages in the view. (@s.actionerror/ just lists all the error messages one after the other.) So, if i have a form like such: form Email: input type='textfield' name='email'

Re: ActionErrors - is there a way to manually look them up ? ...

2008-01-11 Thread Mufaddal Khumri
Anyone who needs it: You can access ${fieldErrors['your-field-name']} -Mufaddal. On Jan 11, 2008, at 2:53 PM, Mufaddal Khumri wrote: I am using ftl templates for the view and want to have access to the collection that has all the error messages in the view. (@s.actionerror/ just lists all

Re: ActionErrors - is there a way to manually look them up ? ...

2008-01-11 Thread Mufaddal Khumri
, Mufaddal Khumri wrote: Anyone who needs it: You can access ${fieldErrors['your-field-name']} -Mufaddal. On Jan 11, 2008, at 2:53 PM, Mufaddal Khumri wrote: I am using ftl templates for the view and want to have access to the collection that has all the error messages in the view

Re: ActionErrors - is there a way to manually look them up ? ...

2008-01-11 Thread Mufaddal Khumri
Okay that actually works , I had some problem else where that resulted in what I saw. So the solution to my original problem works if anybody needs it. On Jan 11, 2008, at 4:06 PM, Mufaddal Khumri wrote: Apparently thats not working any pointers as to how i could get my errors out

Application, Session, Request - Struts2 related ..

2008-01-10 Thread Mufaddal Khumri
Hi, Struts2 actions can implement one or all the interfaces to become Application, Session, Request aware. Struts2 then basically injects all the attributes in that particular scope in a map in your action. Have 3 questions so far: Que 1. Since these actions have their own copy of lets

Namespace issue for a particular result ...

2008-01-09 Thread Mufaddal Khumri
I have a struts config file with the following: !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts package name=authentication namespace=/authentication extends=mypackage action

Re: Namespace issue for a particular result ...

2008-01-09 Thread Mufaddal Khumri
That was an oversight on my part .. I just changed the type to redirect. Instead of the URL I send the action a request.getRequestURI + request.getQueryString (if any) and that now works good as a champ. -Mufaddal. On Jan 9, 2008, at 9:23 AM, Dave Newton wrote: --- Mufaddal Khumri

struts2 dojo plugin ..

2008-01-08 Thread Mufaddal Khumri
Hi, I am using struts 2.0.9 ... where do you find the dojo plugin? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Question on validation. ...

2008-01-07 Thread Mufaddal Khumri
Hi, Lets say I have an action and some of the properties being set on that action are to be validated which I can do a number of ways. Is there a way in Struts2 to tell the system not to valid the framework the first time the action is accessed: [Turn validation off]

Re: Interceptor best practices ...

2008-01-04 Thread Mufaddal Khumri
.x/docs/can-we-use-acegi-security-with- the-framework.html HTH, Ted. http://www.StrutsMentor.com/ On Jan 3, 2008 11:47 PM, Mufaddal Khumri [EMAIL PROTECTED] wrote: Am trying to understand the best practice if any for a ValidateLoginInterceptor of sorts. In the code below, if the login is valid

Accessing form parameters in an interceptor ....

2008-01-04 Thread Mufaddal Khumri
Basically I am trying to access some parameters in an interceptor since the interceptor needs to do something based on the values of these parameters. Any action that this interceptor is applied to does not need these parameters. In order to do this: If I have an ftl file with a form like

Interceptor best practices ...

2008-01-03 Thread Mufaddal Khumri
Am trying to understand the best practice if any for a ValidateLoginInterceptor of sorts. In the code below, if the login is valid then we make a call to: return actionInvocation.invoke(); In case the login information was incorrect, what should one do? return ActionSupport.ERROR

noobie .. breaking struts.xml ...

2008-01-02 Thread Mufaddal Khumri
I need to break my struts.xml into modules. So I came across this page: http://struts.apache.org/2.x/docs/can-we-break-up-a-large- strutsxml-file-into-smaller-pieces.html Accordingly, I tried this: struts.xml: == !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts

Re: noobie .. breaking struts.xml ...

2008-01-02 Thread Mufaddal Khumri
at this pretty quickly it looks like you left out the class for your action=test On Jan 2, 2008 2:03 PM, Mufaddal Khumri [EMAIL PROTECTED] wrote: I need to break my struts.xml into modules. So I came across this page: http://struts.apache.org/2.x/docs/can-we-break-up-a-large- strutsxml-file

Re: noobie .. breaking struts.xml ...

2008-01-02 Thread Mufaddal Khumri
Dave, I managed to get it working. The problem was that I had my struts.xml and struts-cw.xml inside of WEB-INF/ instead of WEB-INF/classes/ Thanks. On Jan 2, 2008, at 8:50 PM, Dave Newton wrote: --- Mufaddal Khumri [EMAIL PROTECTED] wrote: package name=cw namespace=/cw extends=struts

Struts2 ... SecurePlugin?

2007-09-28 Thread Mufaddal Khumri
Hello, In Struts old we used to do this in struts.xml: !-- secure plugin -- plug-in className=org.apache.struts.action.SecurePlugIn set-property property=enable value=true/ set-property property=addSession value=true/ /plug-in What is the struts 2 way of securing your actions?

Validation and freemarker result ....

2007-09-27 Thread Mufaddal Khumri
Hello, === My web.xml: === !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameGlop/display-name filter filter-namestruts2/filter-name