Re: Integrate JasperReports into a Struts2 web application

2009-05-11 Thread Yanto
Hi Oscar, thanks alot for the code, will try it :) On Mon, May 11, 2009 at 6:59 PM, wild_oscar wrote: > > Hi, > > I don't think the plugin was available when I used Jasper with an > application. I simply passed some Collections into the report and created > them. You can have a look at the code:

Re: How to invoke annotation validation manually

2009-05-11 Thread joea88
Thanks for the reply Dave. My example was a simple one, but sometime annotations are in entity level and you dont want to write different actions to handle different situations where you could have just done with different methods. Anyway, I found the solution. AnnotationActionValidatorManager a

JAAS not working

2009-05-11 Thread Dan C.
Hi, I have an application we migrated to struts 2. We originally had oracle OAM for authentication but now we are going back to JAAS. We used JAAS on struts 1 and it work fine. I've added everything I need to in the web.xml but anytime I use a link that requires authentication I get a blank page a

Removing default mappings in Convention plugin [SEC=UNCLASSIFIED]

2009-05-11 Thread Crombie, Joe - BRS
Hi All, I'm currently switching to 2.1.6 and the Convention plugin for configuration. I tend to use POJOs for my Action classes, and map actions to methods. My problem is that when I extend ActionSupport, Convention generates a default mapping to the execute method (which I generally don't pr

Re: S2 - s:submit method="value" has to be hard-coded?

2009-05-11 Thread Dave Newton
cm132005 wrote: Yes and that's why I think the DispatchAction was better in Struts 1. I don't see how--it's essentially the exact same thing, but not tied to the framework. Dave - To unsubscribe, e-mail: user-unsubscr...@s

Re: Help with JSP expression

2009-05-11 Thread Dave Newton
Security Management wrote: I have an expression that I want to evaluate to the following: getProvider().hasAccessRight(getRequestFor(), [0]) Where [0] is an item in a list that is being iterated over. I've tried loads of different stuff, and am looking at the struts documentation, but can't

Re: Access to ValueStack from JSPs

2009-05-11 Thread Chris Pratt
The security problem with the earlier Struts tags was that it was a two pass system. The Container made the first pass through, converting all the JSTL EL references, then the Struts tags got a chance to process the OGNL. So a clever thief could conceivably put something in the system where the c

Re: Access to ValueStack from JSPs

2009-05-11 Thread cm132005
Thanks for your quick response, Chris. I am just trying to figure out how is the tag in the example on http://struts.apache.org/2.x/docs/access-to-valuestack-from-jsps.html working. I am trying to implement a custom tag which should evaluate for both JSTL and OGNL expressions. Thanks. Chris Pr

Re: Access to ValueStack from JSPs

2009-05-11 Thread Chris Pratt
As far as #1 is concerned, you can't use JSTL EL (${}) in OGNL tags () any longer. That was changed quite a while ago as a security precaution. You would have to change those to OGNL EL (%{}) for them to work. #2 seems to be working as it should with the JSTL Tag. #3 & #4 seems to indicate you h

Access to ValueStack from JSPs

2009-05-11 Thread cm132005
http://struts.apache.org/2.x/docs/access-to-valuestack-from-jsps.html has an example on how to access the ValueStack from JSP. I am not able to get the tag/tld working in this example. 1. a[0] = 2. a[0] = 3. a[0] = ${x:vs('a[0]')} 4. Top of ValueStack: ${x:top()}

Re: S2 - s:submit method="value" has to be hard-coded?

2009-05-11 Thread cm132005
Yes and that's why I think the DispatchAction was better in Struts 1. musomesa wrote: > > There is bound to be some logic that determines what method the button > would invoke. Why not put that logic in the action method and have it call > appropriate helper methods? In other words move the

RE: Radio button grouping in Struts 2

2009-05-11 Thread jdt.me.uk
Hi Radu. Many thanks for your reply, and sorry for not responding sooner as I've only just got around to looking at your link. It definitely helped and I've got it working now. It's slightly different and doesn't rely on Preparable: class Question { long id; String name; } public class

Re: Converter trying to set String on int field

2009-05-11 Thread Richard Sayre
It is also happening in a Date field I have. If no dates are entered in the text box then I get the same error. If I provide a date then the conversion works. I am currently moving through the XWork and OGNL source to see what is causing this. On Mon, May 11, 2009 at 1:48 PM, wrote: > >  I b

How to fix redirect OGNL error, Unable to set param?

2009-05-11 Thread Roy
I am not sure if this is me or if this is a bug. I got the following error -- 11:52:01,623 ERROR ObjectFactory:27 - Unable to set parameter [dest] in result of type [org.apache.struts2.dispatcher.ServletRedirectResult] Caught OgnlException while setting property 'dest' on type 'org.apache.s

tag action

2009-05-11 Thread PEGASUS84
good evening, I've a trouble: I would pass a parameter using tag and i would that the action result send a its result to a jsp page. should I use the request or I could use a vaiable String? -- View this message in context: http://www.nabble.com/tag-action-tp23487099p23487099.html Sent from th

Re: Converter trying to set String on int field

2009-05-11 Thread musomesa
I bet it has something to do with a null not being assignable to an int. Chris -Original Message- From: Richard Sayre To: Struts Users Mailing List Sent: Mon, 11 May 2009 11:44 am Subject: Re: Converter trying to set String on int field After some further investigatio

Re: Converter trying to set String on int field

2009-05-11 Thread Richard Sayre
After some further investigation I found that any array type that has no values from the form on submit will call setXXX(String). I checked the source of com.opensymphony.xwork2.util.XWorkBasicConverter and this is the first thing it does: if (value == null || toType.isAssignableFrom(value.getCla

Re: Retrieving instance of XWorkConverter in 2.1.x

2009-05-11 Thread Musachy Barroso
If your action is instantiated by the default object factory, do this: @Inject public void setConverter(XWorkConverter converter) {.} if you are using a different object factory (I think injection still happens with the Spring factory, but I am not 100% sure): Dispatcher.getInstance().getCon

Help with JSP expression

2009-05-11 Thread Security Management
I have an expression that I want to evaluate to the following: getProvider().hasAccessRight(getRequestFor(), [0]) Where [0] is an item in a list that is being iterated over. I've tried loads of different stuff, and am looking at the struts documentation, but can't seem to find the correct syn

Retrieving instance of XWorkConverter in 2.1.x

2009-05-11 Thread Bob Jacoby
I'm trying to migrate code from webwork to 2.1.6 and am not sure about how to get a reference to the XWorkConverter singleton. The XWorkConverter.getInstance() method was removed in 2.1.x (existed in 2.0.x) and the constructor is protected. The code I'm trying to migrate is: //'from' is some ra

Converter trying to set String on int field

2009-05-11 Thread Richard Sayre
I have a bunch of check boxes called userId. In my action I have int userId[] and setUserId(int[] ids) When I select a checkbox the conversion works normally. When I dont check any boxes on the form and submit, I get the following: 2009-05-11 10:54:28,606 [http-8080-6] DEBUG []: - Property: user

Re: Not able to locate the file stored using Struts 2 file upload interceptor

2009-05-11 Thread Nils-Helge Garli Hegvik
The FileUploadInterceptor doesn't really store the file for you. It just makes it available to your action so you can process it. After the request has finished, the file is deleted. It should all be described here: http://struts.apache.org/2.1.6/docs/file-upload.html Nils-H On Mon, May 11, 2009

Not able to locate the file stored using Struts 2 file upload interceptor

2009-05-11 Thread HariniKaushik
Hi all, I'm trying to upload the file using file upload interceptor. I have defined the setters and getters for upload,uploadcontenttype,uploadfilename. Once tats done the success page displays the path,contenttype and file name. File path : D:\Harini\apache-tomcat-6.0.18\work\Catalina\localhost\

Re: How to invoke annotation validation manually

2009-05-11 Thread Dave Newton
joea88 wrote: I've an action class like below. I put the skipvalidation annotation because I don't want strut to validate all annotated fields. My problem is that I still want to do the validation for 'name' field. So.. is there a way to manually invoke only certain fields' annotation validati

Re: Dynamic property names

2009-05-11 Thread mitch gorman
Jon Pearson wrote: > Well, I didn't get any responses to this, but luckily I managed to > figure it out from the OGNL documentation > (http://www.opensymphony.com/ognl/html/LanguageGuide/basicExpressions.ht > ml): > > Under the 'Expression Evaluation' section, it describes how you can > write this:

Re: action call getting skiped

2009-05-11 Thread srinivasa_v .
My problem got resolved its network issue ,DNS IP cache . and thx JK On Tue, May 5, 2009 at 2:28 AM, Martin Gainty wrote: > > have the admin of the prod box display for us the following details: > all jsp > source code for all ActionClasses > web.xml > all .tld configurations located in WEB-INF

Re: Integrate JasperReports into a Struts2 web application

2009-05-11 Thread wild_oscar
Hi, I don't think the plugin was available when I used Jasper with an application. I simply passed some Collections into the report and created them. You can have a look at the code: Movement mov = movementManger.findById(movementId); List list = new ArrayList();

Integrate JasperReports into a Struts2 web application

2009-05-11 Thread Yanto
Hi, What's the most common way people used to call the JasperReport when used Struts 2 framework ? I've read Bruce Phillips Blog, http://www.brucephillips.name/blog/index.cfm/2008/7/12/Using-The-JasperReports-Struts2-Plugin-A-Main-Report-And-A-Subreport just want to know, whether most of people