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: 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 ins

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

2008-01-14 Thread Mufaddal Khumri
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

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

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

2008-01-11 Thread Mufaddal Khumri
ing. On Jan 11, 2008, at 3:38 PM, 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 tha

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

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: Email: First Name: Last Nam

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: Form.seria

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 say

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

Namespace issue for a particular result ...

2008-01-09 Thread Mufaddal Khumri
I have a struts config file with the following: http://struts.apache.org/dtds/struts-2.0.dtd";> extends="mypackage"> ${originalUrl} In this case the LoginAction received the original url as: http:// localhost/mypackage/cr/test.action

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] http://mydomain.com/w

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

Re: Interceptor best practices ...

2008-01-04 Thread Mufaddal Khumri
don't know if it's up to date. * http://struts.apache.org/2.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

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 /

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: The error I get: ---

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

2008-01-02 Thread Mufaddal Khumri
g.apache.struts2.dispatcher.FilterDispatcher.doFilter (FilterDispatcher.java:419) Any clues as to what I may be doing wrong? On Jan 2, 2008, at 6:17 PM, Adam Ruggles wrote: Looking 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

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: == http://struts.apache.org/dtds/struts-2.0.dtd";> st

Struts2 ... SecurePlugin?

2007-09-28 Thread Mufaddal Khumri
Hello, In Struts old we used to do this in struts.xml: What is the struts 2 way of securing your actions? Is there a predefined interceptor or packaged plugin I can use? Any pointers. Thanks, Mufaddal.

Validation and freemarker result ....

2007-09-27 Thread Mufaddal Khumri
Hello, === My web.xml: === Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";> Glop struts2 org.apache.struts2.dispatcher.FilterDispatcherfilter-class> struts2 *.action === My struts.xml: === http: