Re: S2: validation notation on DATE (object that has a Date field)

2008-06-24 Thread Lukasz Lenart
Hi, This also works on my end *BUT* the Date in part of an Object (not a field) Could you show your configuration? Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: validation and action names with slashes

2008-06-24 Thread Roberto Nunnari
Jeromy Evans wrote: Roberto Nunnari wrote: Jeromy Evans wrote: Roberto Nunnari wrote: This is what I intend to do. At the moment the CodeBehind/Convention plugin estimates the name of view candidates (eg. package-action-result.jsp) This change would just need to extend that to check if a

Re: Rest plugin and binary data

2008-06-24 Thread Mike Watson
Hi Jeromy, Please ignore my other email, I was being a dumb-ass. Thanks heaps for the tips, I managed to get this working today. Mike 2008/6/20 Jeromy Evans [EMAIL PROTECTED]: Mike Watson wrote: Hi Folks, I'm trying to figure out how to return binary data from the REST plugin. I'd like

Newbie Q: How to set session object parameters in struts.xml

2008-06-24 Thread John Smith
Hello, Is it possible to set session objects inside and action and access the session object in another action without explicitly retrieving the session object? Thanks, J - To unsubscribe, e-mail: [EMAIL PROTECTED] For

[struts2] url tag not evaluating OGNL in anchor attribute

2008-06-24 Thread Volker Krebs
Hello, I have the following in my JSP Page: a href='s:url action=myAction anchor=%{name} /' It seems that the anchor attribute is not evaluating the OGNL. I guess it's the same problem like this one: https://issues.apache.org/struts/browse/WW-2015 or is there any reason for not evaluating OGNL

Re: Newbie Q: How to set session object parameters in struts.xml

2008-06-24 Thread Lukasz Lenart
Hi, Is it possible to set session objects inside and action and access the session object in another action without explicitly retrieving the session object? Implement SessionAware interface with yours actions and put and get value from that map ;-) Regards -- Lukasz

Re: Closing tag for html:hidden

2008-06-24 Thread Dimitris Mouchritsas
Antonio Petrelli wrote: 2008/6/23 Dimitris Mouchritsas [EMAIL PROTECTED]: A tile definition. I've tried a few combinations, but none is working. For example if I use action path=/home type=be.fedict.etendering.web.actions.common.HomeAction forward name=home

Re: Closing tag for html:hidden

2008-06-24 Thread Antonio Petrelli
2008/6/24 Dimitris Mouchritsas [EMAIL PROTECTED]: I get a 500 Internal server error when trying to access the home page. Can I see the stack trace? Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: Struts Themes Problem - help

2008-06-24 Thread Narayana S
Hi laurie, s:form action=TestAction method=post s:label key=app.indexheader / s:textfield name=cname key=app.cname/br This is part of the form i am creating, when the theme is default the label could get value app.indexheader from resource bundle and working fine, the

Performance of REST plug-in for struts2

2008-06-24 Thread saharabear
Hi, Mike: I am new to this mail list and I can not find the archive of your mails about REST plug-in for struts2. I just want to confirm about the performance of the plug-in, does it works well for real commercial project? Do you have anything about the performance and stable? Thanks a lot.

Re: Closing tag for html:hidden

2008-06-24 Thread Dimitris Mouchritsas
Antonio Petrelli wrote: 2008/6/24 Dimitris Mouchritsas [EMAIL PROTECTED]: I get a 500 Internal server error when trying to access the home page. Can I see the stack trace? Antonio - To unsubscribe, e-mail: [EMAIL

Re: Newbie Q: How to set session object parameters in struts.xml

2008-06-24 Thread John Smith
I have implemented sessionAware and the process works for a static string but it doesn't work for objects :( So I have the following in my struts.xml: action name=blah class=blahAction param name=parsetrue/param param name=testhello/param

Re: Closing tag for html:hidden

2008-06-24 Thread Antonio Petrelli
2008/6/24 Dimitris Mouchritsas [EMAIL PROTECTED]: OracleJSP: oracle.jsp.parse.JspParseException: /WEB-INF/jsp/common/layout.jsp: Line # 2, %@ taglib uri=http://struts.apache.org/tags-tiles; prefix=t % Error: Unable to load taghandler class: http://struts.apache.org/tags-tiles ... But why

Re: Closing tag for html:hidden

2008-06-24 Thread Dimitris Mouchritsas
Antonio Petrelli wrote: 2008/6/24 Dimitris Mouchritsas [EMAIL PROTECTED]: OracleJSP: oracle.jsp.parse.JspParseException: /WEB-INF/jsp/common/layout.jsp: Line # 2, %@ taglib uri=http://struts.apache.org/tags-tiles; prefix=t % Error: Unable to load taghandler class:

Re: Closing tag for html:hidden

2008-06-24 Thread Antonio Petrelli
2008/6/24 Dimitris Mouchritsas [EMAIL PROTECTED]: So, since they're in the jars I don't need to declare the tld's in web.xml right? Right, in fact I'm struggling to understand what is the problem, too :-D Antonio - To

Interceptor to access session objects

2008-06-24 Thread John Smith
Hello, Which interceptor can I use to access session objects by putting them as paramteres in struts.xml? Many thanks, J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Closing tag for html:hidden

2008-06-24 Thread Dimitris Mouchritsas
Antonio Petrelli wrote: 2008/6/24 Dimitris Mouchritsas [EMAIL PROTECTED]: So, since they're in the jars I don't need to declare the tld's in web.xml right? Right, in fact I'm struggling to understand what is the problem, too :-D Antonio

datetimepicker

2008-06-24 Thread Gunnar.Bostrom
Hi, I'm trying to use the struts2 datetimepicker and it works fine except when I input an invalid date with the keyboard. When doing this for struts 2.0.11.1 it resets the date to the value it had before without any notice! When doing it for struts 2.1.2 it sets the date to 1970-01-01 without any

Re: Newbie Q: How to set session object parameters in struts.xml

2008-06-24 Thread Dave Newton
--- On Tue, 6/24/08, John Smith [EMAIL PROTECTED] wrote: Does the syntax ${something} retrieve the object from the session? No. The previous answer, implementing SessionAware, was one of the correct answers. Dave - To

Re: Interceptor to access session objects

2008-06-24 Thread Dave Newton
--- On Tue, 6/24/08, John Smith [EMAIL PROTECTED] wrote: Which interceptor can I use to access session objects by putting them as parameters in struts.xml? What, specifically, are you trying to accomplish? Dave - To

Re: Interceptor to access session objects

2008-06-24 Thread John Smith
On Tue, Jun 24, 2008 at 1:12 PM, Dave Newton [EMAIL PROTECTED] wrote: --- On Tue, 6/24/08, John Smith [EMAIL PROTECTED] wrote: Which interceptor can I use to access session objects by putting them as parameters in struts.xml? What, specifically, are you trying to accomplish? Basically I add

Re: Interceptor to access session objects

2008-06-24 Thread stanlick
Take a look at the Scoped Model Driven Interceptorhttp://struts.apache.org/2.x/docs/scoped-model-driven-interceptor.html Scott On Tue, Jun 24, 2008 at 6:32 AM, John Smith [EMAIL PROTECTED] wrote: On Tue, Jun 24, 2008 at 1:12 PM, Dave Newton [EMAIL PROTECTED] wrote: --- On Tue, 6/24/08, John

Character encoding for http request - Configuration for complete application

2008-06-24 Thread Raghuveer
I am working on I18N application. To handle Http request and response in utf8 I have added following code in my Actionform. Is there way in struts to configure this for my complete application in struts? If it is normal servlet we can do this in init() method. public void

Re: Newbie Q: How to set session object parameters in struts.xml

2008-06-24 Thread Lukasz Lenart
Hi, I misunderstood you ;-) I spent some time to find solution but right now it isn't possible because of StaticParametersInterceptor. Look at the code below for (Iterator iterator = parameters.entrySet().iterator(); iterator.hasNext();) { Map.Entry

Re: Newbie Q: How to set session object parameters in struts.xml

2008-06-24 Thread Lukasz Lenart
To be clear with previous post, first try to parse data then put it on the stack. Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Rest plugin and binary data

2008-06-24 Thread Jeromy Evans
Mike Watson wrote: Hi Jeromy, Please ignore my other email, I was being a dumb-ass. Thanks heaps for the tips, I managed to get this working today. Mike Good to hear. Sorry I hadn't got back to you. regards, Jeromy Evans

Re: Closing tag for html:hidden

2008-06-24 Thread Antonio Petrelli
2008/6/24 Dimitris Mouchritsas [EMAIL PROTECTED]: Antonio Petrelli wrote: 2008/6/24 Dimitris Mouchritsas [EMAIL PROTECTED]: So, since they're in the jars I don't need to declare the tld's in web.xml right? Right, in fact I'm struggling to understand what is the problem, too :-D

Re: Interceptor to access session objects

2008-06-24 Thread Dave Newton
--- On Tue, 6/24/08, John Smith [EMAIL PROTECTED] wrote: Basically I add objectXYZ to the session in actionA then the user submits a query to ActionB. I want to retrieve objectXYZ from the session without directly calling the a method on the session object inside actionB in order to

Re: Closing tag for html:hidden

2008-06-24 Thread Dimitris Mouchritsas
Well, one solution is to move the tld's to a directory and define them in web.xml. This seems to be working. However I've got some strange problems. For example in a tile I render a link for advanced search: %@ taglib uri=http://struts.apache.org/tags-html; prefix=html% %@ taglib

Re: S2: validation notation on DATE (object that has a Date field)

2008-06-24 Thread xianwinwin
hi Lukasz In your example, you wrote: Private Date today; @RequiredFieldValidator(message = Date is required) public Date getToday() { return today; } this works great also in my application, but my question is different, I don't have a field called today, I have an

RE: Struts2 Jar on JBoss

2008-06-24 Thread Hernandez, David
So does anyone know how to get JBoss to look inside the jar (which isn't in WEB-INF/lib, but the JBoss Server lib) for the struts tld? David Hernandez -Original Message- From: Musachy Barroso [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2008 5:50 PM To: Struts Users Mailing List

Re: Closing tag for html:hidden

2008-06-24 Thread Dimitris Mouchritsas
Dimitris Mouchritsas wrote: Well, one solution is to move the tld's to a directory and define them in web.xml. This seems to be working. However I've got some strange problems. For example in a tile I render a link for advanced search: %@ taglib uri=http://struts.apache.org/tags-html;

Re: S2: validation notation on DATE (object that has a Date field)

2008-06-24 Thread Jim Kiley
If empl is a field on your action, and your JSP references the field as empl.date, put the validation on the setter for the date field of Empl, rather than on the action. On Tue, Jun 24, 2008 at 9:06 AM, xianwinwin [EMAIL PROTECTED] wrote: hi Lukasz In your example, you wrote: Private Date

Re: Closing tag for html:hidden

2008-06-24 Thread Antonio Petrelli
2008/6/24 Dimitris Mouchritsas [EMAIL PROTECTED]: BTW is there an option in struts-config.xml (for v.1.3.8 at least) or somewhere else to notify struts to use xhtml compatible elements everywhere? So as to avoid having html:xhtml / in every jsp? I think you have to start a new thread, or no

Re: S2: validation notation on DATE (object that has a Date field)

2008-06-24 Thread xianwinwin
But that means that ALL objects type Empl will have a mandatory field called DOB. I wish to have more flexibility by choosing the mandatory field based on the user's action. Jim Kiley wrote: If empl is a field on your action, and your JSP references the field as empl.date, put the

RE: Struts 2: Providing Tiles Controller-like Functionality

2008-06-24 Thread Brad A Cupit
Asleson, Ryan wrote: I've thought about writing a PreResultListener snip/ I've tried ActionInvocation.getResult(), but it only returns null. Is there a way to get the current Result object before it is actually executed? Looking at the code for DefaultActionInvocation, it seems that

Re: S2: validation notation on DATE (object that has a Date field)

2008-06-24 Thread Jim Kiley
Fair enough. Is this something you could solve with a validate() method on your action, assuming that your action is ValidationAware? On Tue, Jun 24, 2008 at 9:45 AM, xianwinwin [EMAIL PROTECTED] wrote: But that means that ALL objects type Empl will have a mandatory field called DOB. I wish

RE: Grabbing the current Result

2008-06-24 Thread Brad A Cupit
I want to write an PreResultListener that checks the current Result and performs actions based on the Result. I see that the ActionInvocation that's passed into the beforeResult method has a getResult() method, but when I tried this, the result of the getResult() method is null. just for

Re: Interceptor to access session objects

2008-06-24 Thread John Smith
I had a look at ScopedModelDrivenInterceptor but I didn't managed to get it to work .There isn't much documentation on it or any examples how the params are passed in the action :( On Tue, Jun 24, 2008 at 1:41 PM, [EMAIL PROTECTED] wrote: Take a look at the Scoped Model Driven

Re: Interceptor to access session objects

2008-06-24 Thread John Smith
On Tue, Jun 24, 2008 at 2:18 PM, Dave Newton [EMAIL PROTECTED] wrote: --- On Tue, 6/24/08, John Smith [EMAIL PROTECTED] wrote: Basically I add objectXYZ to the session in actionA then the user submits a query to ActionB. I want to retrieve objectXYZ from the session without directly calling

Re: Interceptor to access session objects

2008-06-24 Thread Lukasz Lenart
I think, the best solution for you is just to write your own interceptor that will do what you want and applicable interface. Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For

html:link throwing null pointer

2008-06-24 Thread Dimitris Mouchritsas
Hi all, I'm in the process of upgrading our J2EE app from struts 1.2.4 to 1.3.8. We're also using tiles. I'm able to see the header tile but when it reaches the search.jsp tile I get: javax.servlet.jsp.JspException: ServletException in '/WEB-INF/jsp/common/search.jsp': null at

Re: S2: validation notation on DATE (object that has a Date field)

2008-06-24 Thread xianwinwin
I tried to do something with RequiredFieldValidator, @Validations( stringLengthFields [EMAIL PROTECTED](type = ValidatorType.SIMPLE, trim = true, minLength=1 , fieldName = empl.name, message = required field)}, requiredFields =[EMAIL PROTECTED](type =

Slow performance with Struts2

2008-06-24 Thread yorlick kilroy
Hi, I was wondering if there is a way to tweak struts2 performance. I ported an old struts1 application to struts2. I have jsps that have rather large and complex lists that I now iterate using Struts2 s:iterate and OGNL instead of logic:iterate and EL used in struts1. I noticed that the

Re: Interceptor to access session objects

2008-06-24 Thread Dave Newton
--- On Tue, 6/24/08, John Smith [EMAIL PROTECTED] wrote: I like it to be automatically set, using the getter/setter methods in the action. Can this be done with either SessionAware or through ActionContext? No. ScopedModelDriven, IIRC, will also only retrieve the model property; don't think

Re: Slow performance with Struts2

2008-06-24 Thread Dave Newton
http://struts.apache.org/2.x/docs/performance-tuning.html Dave --- On Tue, 6/24/08, yorlick kilroy [EMAIL PROTECTED] wrote: From: yorlick kilroy [EMAIL PROTECTED] Subject: Slow performance with Struts2 To: user@struts.apache.org Date: Tuesday, June 24, 2008, 10:23 AM Hi, I was

Re: html:link throwing null pointer

2008-06-24 Thread Antonio Petrelli
2008/6/24 Dimitris Mouchritsas [EMAIL PROTECTED]: javax.servlet.jsp.JspException: ServletException in '/WEB-INF/jsp/common/search.jsp': null at org.apache.struts.tiles.taglib.InsertTag$InsertHandler.doEndTag(InsertTag.java:927) at

RE: Struts2 Jar on JBoss

2008-06-24 Thread Dave Newton
You might try talking to the JBoss folks, if you haven't already. When you do it'd be cool to add it to the known issues section of the FAQ (or whatever it's called). Dave --- On Tue, 6/24/08, Hernandez, David [EMAIL PROTECTED] wrote: From: Hernandez, David [EMAIL PROTECTED] Subject: RE:

Re: Interceptor to access session objects

2008-06-24 Thread Lukasz Lenart
You could try using an OGNL expression that references #session (like ${#session.foo}) but I don't know if that'll work. After trying it, it'd be nice if you reported back and/or added it to wiki (if it worked). It will not work, I've been trying. There is a bug in

Re: S2: validation notation on DATE (object that has a Date field)

2008-06-24 Thread Jim Kiley
Have you set the validateAnnotatedMethodOnly property on the validation interceptor in your struts.xml? ( http://struts.apache.org/2.0.11.1/docs/validations-annotation.html) On Tue, Jun 24, 2008 at 10:21 AM, xianwinwin [EMAIL PROTECTED] wrote: I tried to do something with

Re: html:link throwing null pointer

2008-06-24 Thread Dimitris Mouchritsas
Antonio Petrelli wrote: 2008/6/24 Dimitris Mouchritsas [EMAIL PROTECTED]: javax.servlet.jsp.JspException: ServletException in '/WEB-INF/jsp/common/search.jsp': null at org.apache.struts.tiles.taglib.InsertTag$InsertHandler.doEndTag(InsertTag.java:927) at

Re: Closing tag for html:hidden

2008-06-24 Thread Martin
Dimitris Congratulations..I think You found a bug /WEB-INF/struts-config.xml /WEB-INF/classes/ApplicationResources.properties prompt.search=Search prompt.Greece=Greece prompt.advanced.search=AdvancedSearch html head %@ taglib uri=http://struts.apache.org/tags-html; prefix=html% %@ taglib

Re: html:link throwing null pointer

2008-06-24 Thread Antonio Petrelli
2008/6/24 Dimitris Mouchritsas [EMAIL PROTECTED]: I've corrected the code and I'm trying to find out how to rebuild struts. I don't think it is necessary, it has been released in 1.3.9. http://struts.apache.org/download.cgi#struts139 Antonio

Re: html:link throwing null pointer

2008-06-24 Thread Dimitris Mouchritsas
Antonio Petrelli wrote: 2008/6/24 Dimitris Mouchritsas [EMAIL PROTECTED]: I've corrected the code and I'm trying to find out how to rebuild struts. I don't think it is necessary, it has been released in 1.3.9. http://struts.apache.org/download.cgi#struts139 Antonio

Re: Closing tag for html:hidden

2008-06-24 Thread Dimitris Mouchritsas
Martin wrote: Dimitris Congratulations..I think You found a bug /WEB-INF/struts-config.xml /WEB-INF/classes/ApplicationResources.properties prompt.search=Search prompt.Greece=Greece prompt.advanced.search=AdvancedSearch html head %@ taglib uri=http://struts.apache.org/tags-html; prefix=html%

Re: Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-24 Thread cacodemon79
Thank you very much. Laurie Harper wrote: I did what I should have done in the first place and looked it up: Form.submit() is specified to *not* call the onsubmit handler, so this is the correct behaviour (and should be consistent across all browsers). When in doubt, check the

Re: html:link throwing null pointer

2008-06-24 Thread Antonio Petrelli
2008/6/24 Dimitris Mouchritsas [EMAIL PROTECTED]: But 1.3.9 is still beta. btw do you know when it will be released? Struts 1.3.9 is release. It was declared as beta for this bug: https://issues.apache.org/struts/browse/STR-3081 See the mail thread:

Jazoon 08 conference wo/Struts 2 :(

2008-06-24 Thread Giovanni Azua
Hi, I attended today the Jazoon conference here in Zurich and there were no Struts2 presentations... pity :( ... maybe next year? http://jazoon.com/en.html There were many interesting topics covered e.g. Ajax push framework http://www.icefaces.org/ where different parts of a page are rendered

Re: Jazoon 08 conference wo/Struts 2 :(

2008-06-24 Thread Musachy Barroso
I think DWR implements this (comet right?) very nicely, check it out. musachy On Tue, Jun 24, 2008 at 3:11 PM, Giovanni Azua [EMAIL PROTECTED] wrote: Hi, I attended today the Jazoon conference here in Zurich and there were no Struts2 presentations... pity :( ... maybe next year?

Struts Validator Framework: problem with Custom Validator

2008-06-24 Thread cacodemon79
I'm using Struts 1.3. I'm trying to write a custom validator to check that 2 fields are identical. 1) I modified my validator-rules.xml by adding my own validator (called uguale): ** validator-rules.xml ** validator name=uguale

Re: Jazoon 08 conference wo/Struts 2 :(

2008-06-24 Thread Ian Roughley
I was thinking about submitting a talk for Jazoon - not sure what happened, I think the deadline passed before I realized (and the deadline, from what I remember, was really early - maybe 7 months before). /Ian Giovanni Azua wrote: Hi, I attended today the Jazoon conference here in Zurich

use OGNL to automatically look in the session?

2008-06-24 Thread Brad A Cupit
I have an object that I need to access in a JSP, and the object has a getter on my Action. When the page is initially viewed the object is retrieved off the Value Stack, but if the user is redirected back to the page (due to validation errors) the value comes from the session. When using EL

Re: use OGNL to automatically look in the session?

2008-06-24 Thread Dave Newton
JSP EL? It checks JEE scopes first then the stack due to S2's custom request doohickey. Dave --- On Tue, 6/24/08, Brad A Cupit [EMAIL PROTECTED] wrote: From: Brad A Cupit [EMAIL PROTECTED] Subject: use OGNL to automatically look in the session? To: Struts Users Mailing List

Re: use OGNL to automatically look in the session?

2008-06-24 Thread Musachy Barroso
#attr does something similar: http://struts.apache.org/2.x/docs/ognl.html musachy On Tue, Jun 24, 2008 at 5:51 PM, Brad A Cupit [EMAIL PROTECTED] wrote: I have an object that I need to access in a JSP, and the object has a getter on my Action. When the page is initially viewed the object is

RE: use OGNL to automatically look in the session?

2008-06-24 Thread Brad A Cupit
Musachy Barroso wrote: #attr does something similar: right, but it's kind of yucky in the sense that each of these objects needs a block like this: s:if test=%{myObject == null} s:set name=myObject value=%{#session.myObject} / /s:if s:else s:set name=myObject value=%{myObject} / /s:else

Re: use OGNL to automatically look in the session?

2008-06-24 Thread Martin
The OGNL creators/authors were definitely 'page' centric e.g. #attr['foo'] or #attr.foo resolves to 1)Access to PageContext if available, otherwise searches 2)request 3)session 4)application respectively http://struts.apache.org/2.0.11.1/docs/ognl-basics.html IMHO Martin - Original

RE: use OGNL to automatically look in the session?

2008-06-24 Thread Brad A Cupit
Musachy Barroso wrote: #attr does something similar: oh wow! you gave me the answer and I didn't read it! I incorrectly assumed you were using attr to refer to a property on the value stack. I should have followed the link instead of being arrogant. Sorry! Thanks for the answer Musachy! That's

Re: use OGNL to automatically look in the session?

2008-06-24 Thread Chris Pratt
According to http://struts.apache.org/2.0.11.1/docs/ognl-basics.html Struts 2 places request parameters and request, session, and application attributes on the OGNL stack. So, you'd think you could just request the attribute and it would search the stack for the value, but I agree that I haven't

RE: use OGNL to automatically look in the session?

2008-06-24 Thread Brad A Cupit
Chris Pratt wrote: #attr doesn't sound like it will work in your case since it only searches the old four scopes, and never searches the value stack. After I figured out that Musachy had given me the right answer (and Martin also gave the right answer), I was a little worried that this