Re: Issue in Action Chaining

2009-04-21 Thread satyanarayana katta
Hi Wesw, I also tried printing the object address and what you said is right!! It is creating a new object. The object address is not same. Is there any other way of passing the data to the chained method? I want to use the redirect as the last option!! Rgds, Satya On Tue, Apr 21, 2009 at 10

Re: Issue in Action Chaining

2009-04-21 Thread satyanarayana katta
No it doesn't work. Chain is not accepting any of the parameters strings. Its going to the global error page directly. Rgds, Satya On Tue, Apr 21, 2009 at 10:22 PM, Nils-Helge Garli Hegvik wrote: > I'm not sure if this applies to the chain result, but you could give > it a shot: > http://strut

Re: Issue in Action Chaining

2009-04-21 Thread satyanarayana katta
Hi Wesw, Thanks for the reply. Yes, I meant to say testChain(). Thanks for that. So, how is the old data being retained. Does it take it from the http request and recreates the new instance? If that is the case, what other options do I have to get the changed data into the chained method? Tha

Re: Issue in Action Chaining

2009-04-21 Thread Nils-Helge Garli Hegvik
I'm not sure if this applies to the chain result, but you could give it a shot: http://struts.apache.org/2.1.6/docs/parameters-in-configuration-results.html Nils-H On Wed, Apr 22, 2009 at 6:36 AM, satyanarayana katta wrote: > Hi All, > I have a Action class > > class BaseAction extends ActionSu

Re: Issue in Action Chaining

2009-04-21 Thread Wes Wannemacher
On Wednesday 22 April 2009 00:36:36 satyanarayana katta wrote: > Hi All, > I have a Action class > > class BaseAction extends ActionSupport { > private Sting data; > > public void getData() { > return this.data; > } > >public String setData(String data){ >this.data =

Issue in Action Chaining

2009-04-21 Thread satyanarayana katta
Hi All, I have a Action class class BaseAction extends ActionSupport { private Sting data; public void getData() { return this.data; } public String setData(String data){ this.data = data; } } class Action extends BaseAction{ public String execute() throws E

Re: Struts2 crud application gone wrong

2009-04-21 Thread Burton Rhodes
Can't you just add a parameter to the redirect action in you xml file? That way you can 'pass' the sampleString to the redirect action and can display it upon rendering the jsp. On 4/20/09, Bhaarat Sharma wrote: > yeah it is a redirectAction :( so now i know why the value for the string is > not

Re: Jasper Plugin cannot find file

2009-04-21 Thread Balwinder Kumar
I would suggest that first give the complete absolute path and check if the program is working fine, just to ensure, there is a problem with path only. Once established problem is with path only, I may help you further. Regards, Balwinder Kumar Security Management wrote: I'm using the tutori

Tomcat Security and Struts

2009-04-21 Thread Mighty Tornado
Tomcat 6Struts 1.3 Hi, I am trying to make sure my app requires a login. So I configured the following in my deployment descriptor: admin *.do POST member CONFIDENTIAL FORM /WEB-INF/JSP/login.jsp /WEB-INF/JSP/loginError.jsp

Re: How to do matematical operation in jsp.

2009-04-21 Thread Dave Newton
Stefano Tranquillini wrote: The right solution is to calculate and insert in a new bean the elements and its total value? That's *a* right solution, yes, particularly since you're doing money math. For money math to produce consistent, correct results you usually need to define a precision an

Re: How to do matematical operation in jsp.

2009-04-21 Thread Stefano Tranquillini
The right solution is to calculate and insert in a new bean the elements and its total value? On Tue, Apr 21, 2009 at 20:29, wrote: > Nice reference Wes! BTW, I noticed you are not using the new cover letter > for the TPS reports, so I'm going to have to go ahead and ask you to read > that memo

RE: Jasper Plugin cannot find file

2009-04-21 Thread Security Management
Doh, I must have replied to a topic, my bad. >>What is "my-webapp"? A directory? Your web app's context? If the latter, >>that certainly won't work, you'd need to get the path relative to your >>webapp's deployment. Yes, it's the context directory, I've also just tried it with /jasper/scrounger

Re: retrieving action name in ActionClass

2009-04-21 Thread Chris Pratt
But if all you want to do is be able to set a couple of labels from the configuration. You could also do something like: This is Label 1 This is Label Two /reports/IncomeReportselection_struts2.jsp login.jsp Then in your action if you have: public class MyAction { private String lab

Re: Jasper Plugin cannot find file

2009-04-21 Thread Dave Newton
Please start new threads for new topics. Security Management wrote: I have put a file here: /jasper/report.jrxml Without any context I have no idea where that file is: is it on the classpath? Is it in the webapp root? /jasper/scrounger_report.jasper

Jasper Plugin cannot find file

2009-04-21 Thread Security Management
I'm using the tutorial here: http://struts.apache.org/2.0.14/docs/jasperreports-tutorial.html I have put a file here: /jasper/report.jrxml I can look in my war file and verify it. I'm trying to compile and render with it. Here is my action code: /jasper/scrounger

Re: How to do matematical operation in jsp.

2009-04-21 Thread stanlick
Nice reference Wes! BTW, I noticed you are not using the new cover letter for the TPS reports, so I'm going to have to go ahead and ask you to read that memo one more time. Peace, the Bob's On Tue, Apr 21, 2009 at 11:11 AM, Wes Wannemacher wrote: > [snip] > > > > OTOH, siphoning the $.

Re: retrieving action name in ActionClass

2009-04-21 Thread Bhaarat Sharma
yeah that will work. thanks! On Tue, Apr 21, 2009 at 1:37 PM, Martin Gainty wrote: > > ActionContext.getContext().getName() > > http://www.opensymphony.com/webwork/api/com/opensymphony/xwork/ActionContext.html > > ? > Martin > __ > Disclaimer and Conf

Re: Struts 2.1 book

2009-04-21 Thread Dave Newton
Martin Gainty wrote: is anyone proofreading?..i'll sign up for a free copy > [...] > we cannot take responsibility over the the contents. I think we're doing okay, but thanks. Dave - To unsubscribe, e-mail: user-unsubscr...@

RE: retrieving action name in ActionClass

2009-04-21 Thread Martin Gainty
ActionContext.getContext().getName() http://www.opensymphony.com/webwork/api/com/opensymphony/xwork/ActionContext.html ? Martin __ Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité This message

Re: how remain in the same page

2009-04-21 Thread Dave Newton
elyes sallem wrote: but u know if u have personal pb with some one and u look for the opportunity to offend him freely it is too stupid behavior i think I don't have a personal problem with you, unless you count not bothering to spell the word "you", and calling my behavior stupid. I respond

Re: How to do matematical operation in jsp.

2009-04-21 Thread Dave Newton
Lukasz Lenart wrote: 2009/4/21 Dave Newton : And the next step will be implement whole bank security in jsp :P Right, because that's clearly the type of "trivial functionality" I was talking about. Don't be ridiculous. Young programmers very often follow such advices and extend logic in jsp

retrieving action name in ActionClass

2009-04-21 Thread Bhaarat Sharma
I have a JSP page that is very commonly used all throughout the application (with minor tweaks). here is the snippet form struts.xml for it: /reports/IncomeReportselection_struts2.jsp login.jsp The action class ReportSelection has bunch of getters/setters and logic in it. The jsp

Re: How to do matematical operation in jsp.

2009-04-21 Thread Stefano Tranquillini
works! On Tue, Apr 21, 2009 at 18:56, Lukasz Lenart wrote: > 2009/4/21 Dave Newton : > >>> And the next step will be implement whole bank security in jsp :P > > > Right, because that's clearly the type of "trivial functionality" I was > > talking about. Don't be ridiculous. > > Young programmer

Re: how remain in the same page

2009-04-21 Thread elyes sallem
i send a mail where i explained what he should use in this case (realm) here is the mail content ah , no , if you wanna make a test of user privilige , u can use in this case realm u defines roles and u can protect same page by security-constraint tag , u defines differents roles , here is an ex

Re: How to do matematical operation in jsp.

2009-04-21 Thread Lukasz Lenart
2009/4/21 Dave Newton : >>> And the next step will be implement whole bank security in jsp :P > Right, because that's clearly the type of "trivial functionality" I was > talking about. Don't be ridiculous. Young programmers very often follow such advices and extend logic in jsp, they have a probl

Re: How to do matematical operation in jsp.

2009-04-21 Thread Dave Newton
mitch gorman wrote: Lukasz Lenart wrote: And the next step will be implement whole bank security in jsp :P ... Right, because that's clearly the type of "trivial functionality" I was talking about. Don't be ridiculous. Don't teach people such a things, jsp is only for presentation! What w

Re: How to do matematical operation in jsp.

2009-04-21 Thread mitch gorman
Lukasz Lenart wrote: > 2009/4/21 Dave Newton : > >>> How do you want to test it? I know it's a simple case, but it's better >>> to have logic in one place. >>> >> As I said, I'm easily convinced in this particular case. >> >> OTOH, there are plenty of times when it's simply easier, quicke

Re: pagination in struts2

2009-04-21 Thread Chris Pratt
I'd suggest looking into DisplayTag (http://displaytag.sourceforge.net/) (*Chris*) On Tue, Apr 21, 2009 at 4:58 AM, Bhaarat Sharma wrote: > Are there any examples that show how to do pagination in struts2? > > I would like to do pagination where we call the DB again when the user > clicks on o

Re: How to do matematical operation in jsp.

2009-04-21 Thread Lukasz Lenart
2009/4/21 Dave Newton : >> How do you want to test it? I know it's a simple case, but it's better >> to have logic in one place. > > As I said, I'm easily convinced in this particular case. > > OTOH, there are plenty of times when it's simply easier, quicker, and > clearer to just implement trivial

Re: How to do matematical operation in jsp.

2009-04-21 Thread mitch gorman
and remember, STAY AWAY FROM THE PATH OF EEVILLE! Jim Kiley wrote: > EVIL, wow, sounds serious. > > On Tue, Apr 21, 2009 at 12:02 PM, Lukasz Lenart < > lukasz.len...@googlemail.com> wrote: > > >> 2009/4/21 Suneel : >> >>> I'm not sure about this but can't you invoke a function in

Re: Non editable jsp with struts 2 templates - whats the best approach?

2009-04-21 Thread Suneel
Well the problem is if I make a change to first jsp, then I need to make the same change on the second JSP like adding fields etc. This really becomes a pain when I have to change the page layout. If it is just one jsp, I can get away with changing just one page instead of two. This jsp is huge wit

Re: How to do matematical operation in jsp.

2009-04-21 Thread Dave Newton
Jim Kiley wrote: RoundingMode.SUPERMAN_III I've caffeinated my nose. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: Non editable jsp with struts 2 templates - whats the best approach?

2009-04-21 Thread Dave Newton
Lukasz Lenart wrote: 2009/4/21 Suneel : I've a JSP where the user views a set of html input fields. The user enters the values and submits the page and he is taken to another page where he gets a chance to review his inputs before final submission. All this JSP does is, it displays the inputs as

Re: How to do matematical operation in jsp.

2009-04-21 Thread Wes Wannemacher
[snip] > > OTOH, siphoning the $.0039079850466805510222911834716796875 into > offshore accounts will eventually make you rich. > > Dave "Expecting his 10% cut" Newton > [/snip] But, you have to be careful when moving the money into your own account... [quote] We're not just talking ab

Re: How to do matematical operation in jsp.

2009-04-21 Thread Jim Kiley
RoundingMode.SUPERMAN_III On Tue, Apr 21, 2009 at 12:07 PM, Dave Newton wrote: > Dave Newton wrote: > >> The issue for me would be that if this is money maths it should be using >> BigDecimal (or something), and I'm not sure what OGNL would do with the '*' >> operator. >> > > It would multiply th

Re: How to do matematical operation in jsp.

2009-04-21 Thread Dave Newton
Lukasz Lenart wrote: 2009/4/21 Dave Newton : Meh--for simple stuff like this I'm not as sure, although if we're talking about a line item in a invoice, it wouldn't take much to convince me. How do you want to test it? I know it's a simple case, but it's better to have logic in one place. As

Re: Non editable jsp with struts 2 templates - whats the best approach?

2009-04-21 Thread Lukasz Lenart
2009/4/21 Security Management : > Yes, create a theme based on simple that sets the disabled=true for the > fields, and render with that theme. Some browses don't send to a server disabled fields, so you will have to duplicate them in to the hidden inputs. You can use readonly=true but it can be c

Re: How to do matematical operation in jsp.

2009-04-21 Thread Dave Newton
Jim Kiley wrote: EVIL, wow, sounds serious. I just tested BigDecimal math in JSP/OGNL and the room started smelling like sulfur. Sure, it could have been the huevos rancheros, but I'm pretty sure it was the math in the JSP. Dave --

Re: How to do matematical operation in jsp.

2009-04-21 Thread Dave Newton
Dave Newton wrote: The issue for me would be that if this is money maths it should be using BigDecimal (or something), and I'm not sure what OGNL would do with the '*' operator. It would multiply the BigDecimals, but using a default MathContext, which may or may not give the results you reall

Re: Non editable jsp with struts 2 templates - whats the best approach?

2009-04-21 Thread Lukasz Lenart
2009/4/21 Suneel : > I've a JSP where the user views a set of html input fields. The user > enters the values and submits the page and he is taken to another page > where he gets a chance to review his inputs before final submission. > All this JSP does is, it displays the inputs as plain text inst

Re: How to do matematical operation in jsp.

2009-04-21 Thread Jim Kiley
EVIL, wow, sounds serious. On Tue, Apr 21, 2009 at 12:02 PM, Lukasz Lenart < lukasz.len...@googlemail.com> wrote: > 2009/4/21 Suneel : > > I'm not sure about this but can't you invoke a function in OGNL. I > > guess thats how the getText function works in ognl. Probably you can > > write a functi

Re: How to do matematical operation in jsp.

2009-04-21 Thread Lukasz Lenart
2009/4/21 Suneel : > I'm not sure about this but can't you invoke a function in OGNL. I > guess thats how the getText function works in ognl. Probably you can > write a function in your action like getResult and invoke it using > > Correct me if i'm wrong. Yes you can do that, but it's EVIL! DON'

RE: Non editable jsp with struts 2 templates - whats the best approach?

2009-04-21 Thread Security Management
Yes, create a theme based on simple that sets the disabled=true for the fields, and render with that theme. Here's an example of how to do that: http://mikeski.net/site/node/16 -Original Message- From: Suneel [mailto:sunee...@gmail.com] Sent: Tuesday, April 21, 2009 11:30 AM To: Strut

Re: How to do matematical operation in jsp.

2009-04-21 Thread Lukasz Lenart
2009/4/21 Dave Newton : > Meh--for simple stuff like this I'm not as sure, although if we're talking > about a line item in a invoice, it wouldn't take much to convince me. How do you want to test it? I know it's a simple case, but it's better to have logic in one place. > The issue for me would

Re: How to do matematical operation in jsp.

2009-04-21 Thread Suneel
I'm not sure about this but can't you invoke a function in OGNL. I guess thats how the getText function works in ognl. Probably you can write a function in your action like getResult and invoke it using Correct me if i'm wrong. On Tue, Apr 21, 2009 at 10:34 AM, Stefano Tranquillini wrote: > Hi

Re: How to do matematical operation in jsp.

2009-04-21 Thread Dave Newton
Lukasz Lenart wrote: 2009/4/21 Stefano Tranquillini : how can i do that? Add method to class Item to do that, jsp isn't place for business logic Meh--for simple stuff like this I'm not as sure, although if we're talking about a line item in a invoice, it wouldn't take much to convince me.

Re: how remain in the same page

2009-04-21 Thread Dave Newton
Jim Kiley wrote: Are you recommending testing a user's privileges in the untrusted, untrustworthy, totally hackable client code? Really? Oh, what's the worst that could happen? Dave - To unsubscribe, e-mail: user-unsubscr..

Re: How to do matematical operation in jsp.

2009-04-21 Thread Dave Newton
Stefano Tranquillini wrote: and a value calculated at runtime that is a moltiplication of: and how can i do that? Does not work? Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands,

Re: How to do matematical operation in jsp.

2009-04-21 Thread Lukasz Lenart
2009/4/21 Stefano Tranquillini : > how can i do that? Add method to class Item to do that, jsp isn't place for business logic Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache

How to do matematical operation in jsp.

2009-04-21 Thread Stefano Tranquillini
Hi all i've a hashmap that contains object and a value(int). i would display all the value of the object: x and a value calculated at runtime that is a moltiplication of: and how can i do that? thanks -- Stefano

Non editable jsp with struts 2 templates - whats the best approach?

2009-04-21 Thread Suneel
Hi, I've a JSP where the user views a set of html input fields. The user enters the values and submits the page and he is taken to another page where he gets a chance to review his inputs before final submission. All this JSP does is, it displays the inputs as plain text instead of html inputs usi

Re: how remain in the same page

2009-04-21 Thread elyes sallem
dave , read this mail before !!! 2009/4/21 elyes sallem > ah , no , if you wanna make a test of user privilige , u can use in this > case realm > u defines roles > and u can protect same page by > security-constraint tag , u defines differents roles , here is an example > > > Test d'a

Re: how remain in the same page

2009-04-21 Thread Dave Newton
elyes sallem wrote: if u wanna remain in the same page Are you sending this from a cel phone? and u declare test1 in the jsp page as a hidden field ... Are you saying that I could just submit my own value for this field and break your "security" mechanism?! wish i was clear Me too.

Re: how remain in the same page

2009-04-21 Thread elyes sallem
ah , no , if you wanna make a test of user privilige , u can use in this case realm u defines roles and u can protect same page by security-constraint tag , u defines differents roles , here is an example Test d'authentification tomcat Page sécurisée

Re: how remain in the same page

2009-04-21 Thread Jim Kiley
Are you recommending testing a user's privileges in the untrusted, untrustworthy, totally hackable client code? Really? On Tue, Apr 21, 2009 at 10:43 AM, elyes sallem wrote: > of course u make the test , in a javascript function, in your jsp > > Elyes > > 2009/4/21 elyes sallem > > > hi Stefan

Re: how remain in the same page

2009-04-21 Thread elyes sallem
of course u make the test , in a javascript function, in your jsp Elyes 2009/4/21 elyes sallem > hi Stefano , > in fact , i choosed to back to one page in every case, that's ok for me > if u wanna remain in the same page > u can declare a getter for a member in the form > let's say test1 > so

Re: how remain in the same page

2009-04-21 Thread elyes sallem
hi Stefano , in fact , i choosed to back to one page in every case, that's ok for me if u wanna remain in the same page u can declare a getter for a member in the form let's say test1 so in getTest1(){ you make the treatment u want and return a boolean resultat for example if true, u submit to an

Re: how remain in the same page

2009-04-21 Thread Jim Kiley
There's a number of ways to handle scenarios like this. An easy one would be something like this: Assume you have start.jsp and next.jsp, and StartAction and NextAction. In StartAction have two results: SUCCESS and NOT_ALLOWED. SUCCESS goes to NextAction, NOT_ALLOWED returns to start.jsp. In th

Re: how remain in the same page

2009-04-21 Thread Stefano
have u solved? i've the same issues to do. On Mon, Apr 20, 2009 at 16:29, elyes sallem wrote: > Hello, > i have a struts application, which can be used by different user profile > among the profile, there is one who can access some pages > so if he try to access to one page , i will diplay a

Re: Form doesn't clear

2009-04-21 Thread Mighty Tornado
Thanks, this is all very helpful. I reduced the scope to "request" in the action mapping. Additionally since it's a DynaActionForm I provided initial parameters = "", and in the action class called initialize() on the form. This solved the problem. On Tue, Apr 21, 2009 at 8:41 AM, Security Managem

Re: Struts 2.1.6: SlashesInActionNames does not work when namespace is the root context

2009-04-21 Thread Dale Newfield
Shouldn't the root namespace be "" not "/" ? -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: Struts 2.1.6: SlashesInActionNames does not work when namespace is the root context

2009-04-21 Thread Dave Newton
Radoslav Krivak wrote: I have exactly the same problem as described in https://issues.apache.org/struts/browse/WW-2461 . Looks like this bug is still present in 2.1.6. I can't reproduce this either. Can you create a minimal app that reproduces the problem and post the config? Whether I dep

RE: data is not getting refreshed

2009-04-21 Thread Martin Gainty
MG>quick comment (others feel free to jump in) > Subject: data is not getting refreshed > From: srinivas...@sify.com > To: user@struts.apache.org > > Hi all > I have situation > > we have two modules which are in production > > one is developed in old servlets and jsp > > and another is in st

Struts 2.1.6: SlashesInActionNames does not work when namespace is the root context

2009-04-21 Thread Radoslav Krivak
I have exactly the same problem as described in https://issues.apache.org/struts/browse/WW-2461 . Looks like this bug is still present in 2.1.6. Regards, Radoslav Krivak -- View this message in context: http://www.nabble.com/Struts-2.1.6%3A-SlashesInActionNames-does-not-work-when-namespace-is

RE: Form doesn't clear

2009-04-21 Thread Security Management
Make sure it's not your browser filling it out and being "helpful". -Original Message- From: Mighty Tornado [mailto:mighty.torn...@gmail.com] Sent: Monday, April 20, 2009 10:05 PM To: Struts Users Mailing List Subject: Form doesn't clear Hi, Using Struts 1.3, Tomcat 6. I have the two fo

pagination in struts2

2009-04-21 Thread Bhaarat Sharma
Are there any examples that show how to do pagination in struts2? I would like to do pagination where we call the DB again when the user clicks on one of the page numbers.

data is not getting refreshed

2009-04-21 Thread srinivasa_v .
Hi all I have situation we have two modules which are in production one is developed in old servlets and jsp and another is in struts2 and hibernate we are using tomcat in second module we are facing weird problem when we access our site through url , data is not getting updated and sa