RE: Interceptor best practices ...

2008-01-04 Thread Al Sutton
imho, you shouldn't be validating the users username and password in an interceptor. You should validate them in an action, then set a token in the session indicating the user had been validated, then check for your chosen token in the interceptor. That way you don't need to keep hitting your

[S2] how to get the value of form select

2008-01-04 Thread carmi_cd
i have a form select..my problem is how to i get the selected values of the form select.. what is its data type..is it ArrayList? here is my code.. s:select name=selectedModules value=%{edituser.modules.{moduleId}} list=modules

how to get the value of form select

2008-01-04 Thread carmi_cd
i have a form select..my problem is how to i get the selected values of the form select.. what is its data type..is it ArrayList? here is my code.. s:select name=selectedModules value=%{edituser.modules.{moduleId}} list=modules

Re: IllegalStateException from org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher

2008-01-04 Thread Nils-Helge Garli Hegvik
There's a couple of issues with this. First, a portlet only produces page fragments, you can't use html, head or body tags. So you'll have to find another way to refresh the page. Second, the url-tag needs a specified action to produce a correct URL in a portlet environment (there's a JIRA ticket

Re: Interceptor best practices ...

2008-01-04 Thread Ted Husted
The best use of interceptors is for behavior that will be shared by several Actions. If there are several different places where a client might be authenticated, then, in that case, a login interceptor (and a custom interceptor stack) can be a good idea. When coding an Interceptor, you can just

Re: Refresh parent browser when form in pop-up browser is submitted

2008-01-04 Thread zainu
Hi, You can use theh following JS function.Hope it will solve your problem...Just call this script from the popup's submit button.. function refreshBack() { linkss=parentAction.do; window.opener.location=linkss; window.close(); }

Re: Enum, TypeConversion and error handling

2008-01-04 Thread Adam Hardy
Dave Newton on 04/01/08 00:09, wrote: --- Adam Hardy [EMAIL PROTECTED] wrote: Fresh from plugging in my first TypeConverter, I find that on the whole the TypeConversion mechanism in S2 is very good. After setting up a custom type converter, I thought I could chip in with a couple of comments:

Re: struts2: interceptor - validation doesn't work :-(

2008-01-04 Thread Dave Newton
Please post the entire relevant code and configuration. I do this all the time (annotating the getter, though, as Wes said) and don't have any problems. You're extending ActionSupport? d. --- xianwinwin [EMAIL PROTECTED] wrote: thanks wes, I tried this manipulation - didnt work :-(

Re: Update from 2.0.9 to 2.0.11

2008-01-04 Thread Dave Newton
--- Micha³ Letyñski [EMAIL PROTECTED] wrote: So it was a bug that we could use EL expressions in struts tag ? Did you read the JIRA ticket? The bug was: Arbitrary user-submitted OGNL possible when using JSP EL or FreeMarker. d.

Load a particular resource bundle

2008-01-04 Thread Raghuveer
How to set locale for my struts application. My application will have 2 languages. There will be 2 buttons in jsp page. One button is polish and other is English. on clicking of Polish button all the labels and button names and messages are to be changed into polis language. Any

Re: [S2] how to get the value of form select

2008-01-04 Thread Arpan Debroy
It should be a list. I guess your selectedModules in the name attribute is also a list and the values of selected items will be populated into it. If you wouldn't write multiple=true, the return data type would be String. On Jan 4, 2008 3:14 PM, carmi_cd [EMAIL PROTECTED] wrote: i have a form

RE: setting locale manually

2008-01-04 Thread Raghuveer
So you mean if I addrequest_locale=en_US in all forward this will work OR if I add in first forward it is sufficient? _ From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Friday, January 04, 2008 8:10 PM To: [EMAIL PROTECTED] Subject: RE: setting locale manually Czes Raghu

Re: [S2]Issue with wrong dates for datetimepicker and the New Year

2008-01-04 Thread Skip Hollowell
https://issues.apache.org/struts/browse/WW-2377 So, if I read this correctly, it is in the system, and schedule for release in the 2.1? If there is a way to grab a patch for this, I am unsure how to do that. Ideas? Skip Hollowell wrote: I have a datetimepicker on my page, from the struts

Re: Interceptor best practices ...

2008-01-04 Thread Dave Newton
--- Mufaddal Khumri [EMAIL PROTECTED] wrote: In Struts1 I did have a Base Action that I extended from along with a session scoped variable that kept track of whether the user is logged in or not. This functionality is needed by multiple actions who ended up extending the base class.

Re: [S2]Issue with wrong dates for datetimepicker and the New Year

2008-01-04 Thread Skip Hollowell
I have checked the Issues db for datetimepicker, and don't see this specific issue, or one even close to it. Is this something that I should report as a bug? Is anyone else able to verify that it is indeed an issue? Skip Hollowell wrote: I have a datetimepicker on my page, from the struts

setting locale manually

2008-01-04 Thread Raghuveer
How to set locale for my struts application. My application will have 2 languages. There will be 2 buttons in jsp page. One button is polish and other is English. on clicking of Polish button all the labels and button names and messages are to be changed into polis language. Any

Re: Interceptor best practices ...

2008-01-04 Thread Mufaddal Khumri
In Struts1 I did have a Base Action that I extended from along with a session scoped variable that kept track of whether the user is logged in or not. This functionality is needed by multiple actions who ended up extending the base class. Since Struts 2 has interceptors, I felt that it

Re: S2: chart result type not recognized

2008-01-04 Thread Ian Roughley
How are you referencing the action? I always use an img tag like this: img src=serverIronLoadChart.action / /Ian -- Ian Roughley From Down Around, Inc. Consulting * Training / Mentoring * Agile Process * Open Source web: http://www.fdar.com - email: [EMAIL PROTECTED] John Cartwright

Re: struts2: interceptor - validation doesn't work :-(

2008-01-04 Thread Ian Roughley
I didn't see an INPUT result configured, which will be needed. /Ian -- Ian Roughley From Down Around, Inc. Consulting * Training / Mentoring * Agile Process * Open Source web: http://www.fdar.com - email: [EMAIL PROTECTED] Dave Newton wrote: Please post the entire relevant code and

[S2] datetimepicker - type = time - time selection

2008-01-04 Thread Srikanth Muthyala
Hello, I am able  to use datetimepicker for time field. But the selection is the problem. If I want to select 10:45 PM - I have to click the picker icon three times to select 10 then 45 then PM. Does anybody know how to make this user friendly - I mean the selection popup screen does not

Re: struts2: interceptor - validation doesn't work :-(

2008-01-04 Thread Arpan Debroy
I guess your problem is in the xml file. You are using error result type. But by default if validation error occurs, input string is being returned. So please use input instead of error and check again. Thanks On Jan 4, 2008 5:07 AM, xianwinwin [EMAIL PROTECTED] wrote: I've been struggling

Struts 2 and Dojo toolkit

2008-01-04 Thread Filipe David Manana
Hi, I am trying to use dojo.require method in one of my JSPs. The code is the following: head decorator:head / script type=text/javascript dojo.require(dojo.query); dojo.query(window).onload( function() { alert(test); } ); /script /head In Firefox's error

Re: Struts 2 + Spring 2 + JPA + AJAX tutorial

2008-01-04 Thread Pascal SEREMES-DAMAL
In fact in the tutorial (http://struts.apache.org/2.0.11/docs/struts-2-spring-2-jpa-ajax.html ) they say that there no need to specify the JPA configuration in this file because the datasource will be on spring configuration file. 2008/1/4, Musachy Barroso [EMAIL PROTECTED]: Spring couldn't find

Re: struts2: interceptor - validation doesn't work :-(

2008-01-04 Thread xianwinwin
AND THE WINNER IS: xniit2003 YES!! thank you so much! good call and a brilliant observation thank you all! you wrote: I guess your problem is in the xml file. You are using error result type. But by default if validation error occurs, input string is being returned. So please use input

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

Struts 2 + Spring 2 + JPA + AJAX tutorial

2008-01-04 Thread Pascal SEREMES-DAMAL
Hello everyone!!! I hope you had fun during the end of year 2007 and I wish you a happy new year. I tried the Struts 2 + Spring 2 + JPA + AJAX tutorial that is on the struts page and when I deployed it on my server I had the following exceptions. GRAVE: Context initialization failed

[S2] Adding a new interceptor to every package.

2008-01-04 Thread GF
Hi everyone. I have many packages that extends extends=tiles-default. I would like to add an interceptor to all of them. Now I'm doing this: package name=myPackage extends=tiles-default namespace=/myspace interceptors interceptor name=myInter

Re: Struts 2 + Spring 2 + JPA + AJAX tutorial

2008-01-04 Thread Musachy Barroso
Indeed. But the file needs to be there, even if it is empty, which I found quite annoying (at least I don't know how to avoid having the file there), like: persistence xmlns=http://java.sun.com/xml/ns/persistence; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

Re: Struts 2 + Spring 2 + JPA + AJAX tutorial

2008-01-04 Thread Pascal SEREMES-DAMAL
That's exactly what I have. I've followed all the instructions in the tuto. 2008/1/4, Musachy Barroso [EMAIL PROTECTED]: Indeed. But the file needs to be there, even if it is empty, which I found quite annoying (at least I don't know how to avoid having the file there), like: persistence

Re: Struts 2 + Spring 2 + JPA + AJAX tutorial

2008-01-04 Thread Musachy Barroso
Spring couldn't find META-INF/persistence.xml musachy On Jan 4, 2008 11:12 AM, Pascal SEREMES-DAMAL [EMAIL PROTECTED] wrote: Hello everyone!!! I hope you had fun during the end of year 2007 and I wish you a happy new year. I tried the Struts 2 + Spring 2 + JPA + AJAX tutorial that is on

[S2] and XSS

2008-01-04 Thread GF
Hi all. Is there any document about how to automatically handle security issues related to Cross Site Scripting on websites managed with Struts2? I'm thinking about my own strategy, but I would like to know if anything already exists. Thank you GF

Re: Struts 2 + Spring 2 + JPA + AJAX tutorial

2008-01-04 Thread Musachy Barroso
well, somehow the file is not getting there at runtime I guess, this is from your stacktrace: java.lang.IllegalStateException: No persistence units parsed from {classpath*:META-INF/persistence.xml} musachy On Jan 4, 2008 11:35 AM, Pascal SEREMES-DAMAL [EMAIL PROTECTED] wrote: That's exactly

Re: Struts 2 + Spring 2 + JPA + AJAX tutorial

2008-01-04 Thread Pascal SEREMES-DAMAL
Do you mean it can come from a bad classpath..? Or maybe should I specify somewhere that the spring framework is used for the persistence... But I don't know where. I thought that the setting struts.objectFactory to spring in struts.xml would be enough. 2008/1/4, Musachy Barroso [EMAIL

Re: Accessing form parameters in an interceptor ....

2008-01-04 Thread Chris Pratt
Try using InvocationContext.getActionContext().getParameters(). That will give you a Map containing all the parameters. I believe if you remove parameters from the map, they won't be injected into the Action, but you'll have to try that to confirm. (*Chris*) On Jan 4, 2008 8:56 AM, Mufaddal

Re: struts2: interceptor - validation doesn't work :-(

2008-01-04 Thread Randy Burgess
Don't validation errors go to input? Like so: action name=UserTest_* method={1} class=com.simple.validation.Test result name=error/pages/error.jsp/result result name=input/pages/welcome-input.jsp/result result name=success/pages/welcome.jsp/result

struts2 spring plugin

2008-01-04 Thread Brian Relph
I have read through the spring plugin wiki page http://struts.apache.org/2.0.11/docs/spring-plugin.html for struts2. I want my actions to be completely managed by spring, so i am declaring them in applicationContext.xml. ?xml version=1.0 encoding=UTF-8? beans

RE: Outputting raw HTML with s:property tag

2008-01-04 Thread shai200
Thanks, I think that'll do it! Al Sutton-4 wrote: A polymorphic array would be my suggestion. Have an array of objects which contain an identifier for the struts tag type, and the data needed to populate it. For example; In your action you would have ; private MyPolyObject[]

Re: Struts 2 + Spring 2 + JPA + AJAX tutorial

2008-01-04 Thread Pascal SEREMES-DAMAL
Did some one else encountered the same problem as mine when following the tutorial http://struts.apache.org/2.0.11/docs/struts-2-spring-2-jpa-ajax.html ? 2008/1/4, Pascal SEREMES-DAMAL [EMAIL PROTECTED]: Do you mean it can come from a bad classpath..? Or maybe should I specify somewhere that

Re: struts2 spring plugin

2008-01-04 Thread Dave Newton
--- Brian Relph [EMAIL PROTECTED] wrote: I want my actions to be completely managed by spring, so i am declaring them in applicationContext.xml. Just FYI, you don't need to do that if you use Spring as the default object factory (is that the default? I don't remember.) Is this [singleton]

Struts 2.0.11 and multipage wizard forms

2008-01-04 Thread termiX
Hi, please, how can I create multipage forms (wizard) in Struts 2.0.11. thank! termi -- View this message in context: http://www.nabble.com/Struts-2.0.11-and-multipage-wizard-forms-tp14625384p14625384.html Sent from the Struts - User mailing list archive at Nabble.com.

Is there a way to use Spring to inject objects to a Struts 2 Interceptor?

2008-01-04 Thread Néstor Boscán
Hi Is there a way to use Spring to inject objects to a Struts 2 Interceptor? Regards, Néstor Boscán - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: S2: httpheader result type

2008-01-04 Thread Laurie Harper
[EMAIL PROTECTED] wrote: Hello All, in configuring the httpheader result type in the struts.xml file, is there a way to access objects on the value stack? Have you tried using an expression, as in result ... param ...${ognl.expression.here}/param L.

Re: [ANN] Connext Graphs

2008-01-04 Thread Mark P Ashworth
Good Day, The Connext-Graphs 0.6 is ready with an addition from Oleh Lozynskyy to support the Sketch Bar chart from Open Flash Chart. Project Page: https://connext-graphs.dev.java.net Home Page: http://www.connext.co.za Plugin Page:

Re: Struts 2.0.11 and multipage wizard forms

2008-01-04 Thread Laurie Harper
termiX wrote: Hi, please, how can I create multipage forms (wizard) in Struts 2.0.11. That's a bit of a vague question. What specifically are you having difficulty with? L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Struts 2 + Spring 2 + JPA + AJAX tutorial

2008-01-04 Thread Laurie Harper
Musachy is suggesting that the persistence.xml file is not in your classpath (or not in the right place). Make sure that the file is really being deployed and that it is in the correct directory (WEB-INF/classes/META-INF/persistence.xml). L. Pascal SEREMES-DAMAL wrote: Do you mean it can

Re: [S2] Adding a new interceptor to every package.

2008-01-04 Thread Laurie Harper
GF wrote: Hi everyone. I have many packages that extends extends=tiles-default. I would like to add an interceptor to all of them. Now I'm doing this: package name=myPackage extends=tiles-default namespace=/myspace interceptors interceptor

Re: setting locale manually

2008-01-04 Thread Laurie Harper
From the documentation Martin linked to: For example, using the default parameter name, a request to foo.action?request_locale=en_US, then the locale for US English is saved in the user's session and will be used for all future requests. So, specifying the locale parameter once is

Re: S2: httpheader result type

2008-01-04 Thread John Cartwright
Hi Laurie, Thanks for your reply and suggestion. I can access what I'm assuming is the Exception object, but can't seem to get the message property from it: result name=sessionTimeout type=httpheader param name=status204/param param

Re: Struts 2 + Spring 2 + JPA + AJAX tutorial

2008-01-04 Thread Pascal SEREMES-DAMAL
How can I be sure that it is deployed? The file was in /META-INF/persistence.xml as described in the tutorial. I put it in WEB-INF/classes/META-INF/persistence.xml and it works. Thank both of you very much! Pascal 2008/1/4, Laurie Harper [EMAIL PROTECTED]: Musachy is suggesting that the

Re: Struts 2 + Spring 2 + JPA + AJAX tutorial

2008-01-04 Thread Frans Thamura
can we have the code also? F

Re: Struts 2 + Spring 2 + JPA + AJAX tutorial

2008-01-04 Thread Pascal SEREMES-DAMAL
All the code is there : http://struts.apache.org/2.0.11/docs/struts-2-spring-2-jpa-ajax.html But I had a problem to deploy the application on my tomcat server. Musachy and Laurie suggested to move the file persistence.xml from /META-INF (where indicated in the tutorial) to