Re: Undefined attribute name notifyTopics

2009-05-05 Thread Yanto
Hi Mitch, thanks for you reply..I already figure out the issue. It's cause by the jsp files is not for Struts 2.1.6, the following command not working on struts 2.1.6 Refresh need to change to Refresh and also need t

Re: how to format a percentage

2009-05-05 Thread Steven Yang
have you tried without the decimal OGNL might treat your numbers as integers and there for you get 0. I havent test it out but thats what I used to do for JSTL

Re: Upgrading AppFuse to Struts 2.1

2009-05-05 Thread Dave Newton
Wes Wannemacher wrote: On Tue, May 5, 2009 at 12:25 PM, mraible wrote: Yes, but I don't have actionPackages configured in web.xml, so I don't believe it's enabled. It still might be... Check this section - http://struts.apache.org/2.x/docs/convention-plugin.html#ConventionPlugin-Codebehindhe

Re: Undefined attribute name notifyTopics

2009-05-05 Thread mitch gorman
Yanto wrote: > Hi all, > > I'm new to struts 2, I download example for Struts 2 + Spring 2 + JPA + AJAX > from struts 2 website, > and then open the project from eclipse. > > however in the index.jsp there are several Warning for undefined attribute > name, one of them is "Undefined attribute name

RE: stream result causing action to be called multiple times

2009-05-05 Thread Andy
Yep that totally fixed it. Thanks!! Andy > Date: Tue, 5 May 2009 16:28:53 -0400 > From: d...@newfield.org > To: user@struts.apache.org > Subject: Re: stream result causing action to be called multiple times > > Andy wrote: > > I may be reading this doc wrong, but doesnt it state it here?: > >

Re: stream result causing action to be called multiple times

2009-05-05 Thread Wes Wannemacher
I take that back, I'm having trouble getting into svn, I guess I just hadn't noticed that the commit failed. Anyhow, I'll have it updated as soon as svn comes back to life. -Wes On Tue, May 5, 2009 at 4:41 PM, Wes Wannemacher wrote: > Dale, I updated the source before you had put the issue in t

Re: stream result causing action to be called multiple times

2009-05-05 Thread Wes Wannemacher
Dale, I updated the source before you had put the issue in the JIRA. I'm going to go ahead and close the JIRA, I just didn't want you to think nothing was done since no subversion commits will be tied to it. -Wes On Tue, May 5, 2009 at 4:28 PM, Dale Newfield wrote: > Andy wrote: >> >> I may be r

Re: stream result causing action to be called multiple times

2009-05-05 Thread Dale Newfield
Andy wrote: I may be reading this doc wrong, but doesnt it state it here?: http://struts.apache.org/2.1.2/struts2-core/apidocs/org/apache/struts2/dispatcher/StreamResult.html It does. Thanks for the pointer. I just created a JIRA issue (WW-3117) to fix that javadoc. Also saw these: http

Re: stream result causing action to be called multiple times

2009-05-05 Thread Chris Pratt
Yup, those are wrong, it should be: attachment; filename="${attachmentFileName}" Someone with Wiki privileges should probably update those pages. (*Chris*) On Tue, May 5, 2009 at 12:44 PM, Andy wrote: > > I may be reading this doc wrong, but doesnt it state it here?: > > > > > http://struts.ap

RE: stream result causing action to be called multiple times

2009-05-05 Thread Andy
I may be reading this doc wrong, but doesnt it state it here?: http://struts.apache.org/2.1.2/struts2-core/apidocs/org/apache/struts2/dispatcher/StreamResult.html Also saw these: http://stackoverflow.com/questions/257566/using-stream-result-with-struts2 http://sheetalshundori.blogspot.com

RE: Usecases for ModelDriven interface

2009-05-05 Thread Martin Gainty
I think what you're looking for is a more flexible Mapping which can be achieved via Spring http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/web/servlet/DispatcherServlet.html which would enable you to define your own DefaultAnnotationHandlerMapping http://static.springs

Re: stream result causing action to be called multiple times

2009-05-05 Thread Dale Newfield
Andy wrote: I have an action that returns a stream result type filename="${attachmentFileName}" This mistake is so common I'm wondering if there's some struts tutorial somewhere that gets it wrong. Did you copy that setting from somewhere? http://www.w3.org/Protocols/rfc2616/rfc2616-s

how to format a percentage

2009-05-05 Thread Bhaarat Sharma
I have the following in my properties file: format.percent = {0,number,##0.00'%'} But the following code doesnt work and always gives 0.00% ...evaluates to However, the following code does work... ...evaluates to What is going on here? why dont decimals work?

Re: Arithmatic operations in Struts2 - ognl

2009-05-05 Thread Bhaarat Sharma
thanks! thats better. On Tue, May 5, 2009 at 2:34 PM, Dale Newfield wrote: > Bhaarat Sharma wrote: > >> oh nevermind. got it. >> Total Age >> > > I really advise you to make that > > > If you have to remember which attributes are ognl expressions and which are > not you will pull your hair out

Re: Arithmatic operations in Struts2 - ognl

2009-05-05 Thread Dale Newfield
Bhaarat Sharma wrote: oh nevermind. got it. Total Age I really advise you to make that If you have to remember which attributes are ognl expressions and which are not you will pull your hair out. -Dale - To unsubscribe,

Re: Arithmatic operations in Struts2 - ognl

2009-05-05 Thread Bhaarat Sharma
oh nevermind. got it. Total Age simpler than I thought :) On Tue, May 5, 2009 at 2:12 PM, Bhaarat Sharma wrote: > Is there a way to do this in ognl? > I have the following code which works fine > > First Name Age: value="someList.get(0).age"/> > Second Name Age: value="someList.get

Arithmatic operations in Struts2 - ognl

2009-05-05 Thread Bhaarat Sharma
Is there a way to do this in ognl? I have the following code which works fine First Name Age: Second Name Age: However the following line does not work. Total Age Is it possible to do arithmetic operations in ognl?

Usecases for ModelDriven interface

2009-05-05 Thread Unmesh joshi
Hi, I am using struts2 on my current project and find ModelDriven interface very inconvenient. The intent of the interface is documented as, "it helps directly populating domain model". But if the domain model is little more complex than a simple bean, it becomes very inconvinient. e.g. If

RE: Struts 1 Plugin | forwards?

2009-05-05 Thread SanJ.SANJAY
No, there is a plugin "Struts 1 Plugin" which lets you use the struts 1 actions in struts 2 application. mgainty wrote: > > > sounds like you're mixing your Struts1 code with struts2 jars > > probably easiest just to convert your codebase up to Struts2 > http://struts.apache.org/2.0.12/docs/m

RE: Struts 1 Plugin | forwards?

2009-05-05 Thread Martin Gainty
sounds like you're mixing your Struts1 code with struts2 jars probably easiest just to convert your codebase up to Struts2 http://struts.apache.org/2.0.12/docs/migration-guide.html Martin __ Disclaimer and Confidentiality/Verzicht und Vertraulichkeit

Re: Upgrading AppFuse to Struts 2.1

2009-05-05 Thread Wes Wannemacher
On Tue, May 5, 2009 at 12:25 PM, mraible wrote: > > Yes, but I don't have actionPackages configured in web.xml, so I don't > believe it's enabled. > It still might be... Check this section - http://struts.apache.org/2.x/docs/convention-plugin.html#ConventionPlugin-Codebehindhelloworld Since your

Re: Upgrading AppFuse to Struts 2.1

2009-05-05 Thread mraible
Yes, but I don't have actionPackages configured in web.xml, so I don't believe it's enabled. Wes Wannemacher wrote: > > Matt, > > are you combining the conventions plugin with regular XML > configuration? Because your action is named SignupAction, which > conventions would pickup, but the inp

Struts 1 Plugin | forwards?

2009-05-05 Thread SanJ.SANJAY
Has anyone used struts 1 plugin for using struts 1 actions in struts 2? How would we handle the return types? As in struts 1 actions, it is an actionfoward type and struts 2 return type is string ("SUCCESS", "INPUT" etc..) After I installed the plugin and changes the struts.xml file: http://str

RE: Integer s:checkbox sends "false" value to action setter

2009-05-05 Thread Ignacio de Córdoba
OK, I understand but I am using checkboxes for the typical "remove entries in this forum" action. The value are integesr (primary keys of the entries) and so the setter in the action is: public void setRemoveEntry(Integer[] id) { } When i check no checkboxes in the form, I get the exception, as

RE: Integer s:checkbox sends "false" value to action setter

2009-05-05 Thread Radu Solomon
I do not believe this is a bug. Setting the value to false when unchecked is most useful for a lot of cases. I hated when in S1 you had to reset all your checkboxes in code in order to get unchecked values that were previously checked when the page loaded. Furthermore, there are struts 2 books

Re: Integer s:checkbox sends "false" value to action setter

2009-05-05 Thread Ignacio de Córdoba
Hi, I've seen this has not been solved or replied here. Could anybody give me any directions on how to post a JIRA issue for this? I've seen https://issues.apache.org/struts/secure/BrowseProject.jspa but can't get to the area for posting new issues/bugs. Thanks, Ignacio -- View this message in c

Re: Upgrading AppFuse to Struts 2.1

2009-05-05 Thread Wes Wannemacher
Matt, are you combining the conventions plugin with regular XML configuration? Because your action is named SignupAction, which conventions would pickup, but the input result doesn't appear to follow the convention (it should be named signup-input.jsp). I'd poke around a bit and see if conventions

Re: Upgrading AppFuse to Struts 2.1

2009-05-05 Thread mraible
mraible wrote: > > This weekend, I attempted to upgrade AppFuse to use Struts 2.1 (formerly > using 2.0.11.1). I used the following instructions: > > http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html > > After completing all the steps, I was able to ge

file uploading and maxFileSize parameter

2009-05-05 Thread Sushil Dive
Hi, maxFileSize parameter in struts configuration file holds maximum file size allowed to upload. I want to restrict file size to be uploaded to 20MB. For this i setup the parameter value as below: Does it mean following: What happens when user uploads file with size more than 20M a. The

RE: stream result causing action to be called multiple times

2009-05-05 Thread Martin Gainty
To forestall double submits, and "back button" resubmits, the framework can generate a token that is embedded in the form and also kept in the session. If the value of the tokens do not compare, then we know that there has been a problem, and that a form has been submitted twi

Chaining actions specifying method name

2009-05-05 Thread HENRY Pierre
Hi, I am new to Struts2 but after struggling a couple of weeks with the doc (hard to find up-to-date doc for 2.1.6) and a couple out-of-date books, I am really starting to appreciate the simplicity and flexibility ! I am using Struts 2.1.6. I have built a SecurityInterceptor, which checks auth

Application security gap analysis in Struts2

2009-05-05 Thread Arshan Dabirsiaghi
Struts2 folks, The Intrinsic Security Working Group (ISWG) at OWASP (http://www.owasp.org) has been researching what security countermeasures an application architect or technical lead must plan for when creating a Struts2 application. The result of this research is a document that we are look

Re: Struts 2 - Parameterized error messages

2009-05-05 Thread cm132005
Thank you, Chris! It was displaying "Field {0} is required." and it worked fine with two apostrophes. Appreciate your help. Chris Pratt wrote: > > What do you mean by "not working"? Are you seeing: > > Field {0} is required. > > on your interface? If so, I suspect what you need to do is: >

RE: stream result causing action to be called multiple times

2009-05-05 Thread Andy
>> is multiple equal 2? It calls the action between 2 and 4 times, but usually 3. I was thinking an interceptor would somehow call the action multiple times but maybe that's not possible. I don't fully understand how interceptors call actions. etc yet :) I was testing on a Mac. OSX/Fi

Re: REST Plugin and PreResultListeners

2009-05-05 Thread Stuart Ellidge
Thanks for replying Dustin / Wes, I'll see where I get to with this and if I can possibly submit something reusable, I'll certainly do so. Regards Stuart On 02/05/2009 17:47, "dusty" wrote: Are you registering the listener in the action or interceptor. Does it matter or both fail? The RES