PROTECTED]
Sent: Friday, November 07, 2008 11:08 AM
To: Struts Users Mailing List
Subject: Re: Unit Testing Advice
Is this what you're looking for?
http://svn.opensymphony.com/svn/xwork/tags/xwork_2_0_6/
Nils-H
On Fri, Nov 7, 2008 at 12:02 PM, Gundersen, Richard
<[EMAIL PROTECTED]> w
rly.
Could anyone point me in the direction of the Xwork source used to build
Struts 2.0.12 please? Thanks.
Richard Gundersen
Java Developer
Email: [EMAIL PROTECTED]
Phone: 01618302398
Fax: 01618342536
London Scottish Bank plc
24 Mount Street
Manchester
M2 3LS
-Original Message-
From
I've just done the same thing - although it's nothing to do with Struts
var a = window.open('','','width=500,height=400');
a.document.open("text/html");
a.document.write(document.getElementById('receipt').innerHTML);
a.document.close();
a.print();
a.close();
Hi
I just have one smallish question: for some reason my
messages.properties isn't being loaded. It's configured in struts.xml
...and I know that file is generally working because all the other
Struts stuff is working. I'm getting this when my unit test runs (just
at the point when it tries to
ble though...
Nils-H
On Thu, Nov 6, 2008 at 1:53 PM, Gundersen, Richard
<[EMAIL PROTECTED]> wrote:
> This is what I have so far. It works but I would appreciate a little
> peer review (particularly regarding how I set up my session and the
> l
This is what I have so far. It works but I would appreciate a little
peer review (particularly regarding how I set up my session and the
logged in user)
Thanks!
@Resource
private CardPaymentAction cardPaymentAction;
ActionContext acti
Hi
Just after a bit of advice for the best way to unit test my Struts 2
app.
I'm using a fairly standard Spring/Struts2/JPA/Junit architecture, and
my tests need access to all my spring beans (which I'm doing using
@Resource tags)
The only sticking point is setting up all of the fake 'request' a
If you're starting from scratch, why not use Struts 2 instead? I used
'Practical Struts 2: Web 2.0 Projects' by Ian Roughly (who wrote a lot
of Struts 2 I think??) to get to grips with the basics.
It's easy to read and flows nicely, building an app step by step (as
opposed to the Spring docs whic
: 01618302398
Fax: 01618342536
London Scottish Bank plc
24 Mount Street
Manchester
M2 3LS
-Original Message-
From: Gundersen, Richard [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2008 11:18 AM
To: Struts Users Mailing List
Subject: Custom Exception Interceptor
Hi
I'm tryi
Hi
I'm trying to override the default global exception handler, because I
need to remove a certain session attribute when an exception occurs. I
think I've done most of what's needed, it's just not being executed.
This is my struts.xml (I need my 'exception' to replace the one in the
default stac
u balance your request between
your tomcat servers? Do you use apache with mod_proxy, or mod_jk maybe
or anything else?
I had problems while using such architecture because of the way that
tomcat build url from values present in the http header.
Regards
Sébastien
Gundersen, Richard a écrit :
&g
Hi
I'm using URL rewriting (I can't use session cookies for certain
reasons). In my code, I have this:
Locally, this generates my URL perfectly - preserving the jsessionid -
like this:
https://localhost/Payment/acsResponse.action;jsessionid=12DEE30A8983DF3D
151D
However on our clustered prod
Doh, got it
%{errors.size}
Silly me :)
Richard Gundersen
Java Developer
Email: [EMAIL PROTECTED]
Phone: 01618302398
Fax: 01618342536
London Scottish Bank plc
24 Mount Street
Manchester
M2 3LS
-Original Message-
From: Gundersen, Richard [mailto:[EMAIL PROTECTED]
Sent
Hi
Is there an easy way to say 'if validation errors exist', in OGNL? Tried
a few things but not hit on the right syntax yet
e.g. if %{errorFieldNames.size() > 0} etc etc
Thanks
Richard Gundersen
As a responsible corporate citizen, London Scottish Bank plc asks you to
consider the environme
: Gundersen, Richard [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2008 11:09 AM
To: Struts Users Mailing List
Subject: RegexFieldValidator
Sorry, basic question but my RegexFieldValidator isn't working quite as
I thought it would.
I just want to be able to specify a decimal point,
Sorry, basic question but my RegexFieldValidator isn't working quite as
I thought it would.
I just want to be able to specify a decimal point, so I escape the dot,
but the compiler complains. Could someone tell me how to specify
12345.67 as a regex for this?
^[0-9]{1,5}\.[0-9]{2}$ (does
Hi
I'm using the VisitorFieldValidator (annotations) to push validation
over to my model object in my Action.
However, I want the validation rules in my model object to work
differently depending on which Action method is being called.
What's the best way of doing this please?
Richard Gunderse
Cheers Dave, I'll check it out in the morning
Appreciate you help
-Richard
-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Thu 04/09/2008 17:14
To: Struts Users Mailing List
Subject: Re: Validation based on other fields
--- On Thu, 9/4/08, Gundersen, Ri
Hi
In Struts 2, I need to perform some validation based on other fields
e.g.
if cardType = 'Switch', issueNumber is mandatory
I was looking for something like the validWhen tag from Struts 1. I'd
like to do it with the client side javascript if possible (to prevent
having to reload the
8
Fax: 01618342536
London Scottish Bank plc
24 Mount Street
Manchester
M2 3LS
-Original Message-
From: Antonio Petrelli [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 02, 2008 9:18 AM
To: Struts Users Mailing List
Subject: Re: Base64 & Newlines
2008/9/2 Gundersen, Richard <[EMA
Hi
I'm stuggling a bit with a parameter I need to pass through to a JSP in
a frame.
It's a base64-encoded string, so I thought I'd be able to just pass it
through as a request parameter, but I found out it contains newline
chars every 64 characters (which I read is correct), so any JavaScript I
Sent: Wednesday, August 27, 2008 3:47 PM
To: Struts Users Mailing List
Subject: Re: Credit card validator
Don't know if it helps you, but Hibernate Validator has a credit card
validator. It will work with JPA providers other than just Hibernate.
On Thu, Aug 21, 2008 at 10:39 AM, Gundersen, Richa
Hi all
I came across this page for invalidating the session
http://struts.apache.org/2.0.11.2/docs/how-do-we-get-invalidate-the-sess
ion.html
It mentions this way of invalidating the session:
if (session instanceof org.apache.struts2.dispatcher.SessionMap) {
((org.
unt Street
Manchester
M2 3LS
-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2008 3:17 PM
To: Struts Users Mailing List
Subject: Re: Credit card validator
--- On Thu, 8/21/08, Gundersen, Richard wrote:
> can someone tell me if there's a credit
Sorry if I'm missing something obvious, but can someone tell me if
there's a credit card validator in Struts 2?
There's one in Struts 1, and in Struts 2 I found creditCard.js, which
uses the Luhn algorithm, but I cant figure out a) how to use it or b) if
there is a corresponding annotation for ser
, August 06, 2008 8:28 AM
To: Struts Users Mailing List
Subject: Re: 2 Validation questions
Gundersen, Richard wrote:
> Hi
>
> Basic question sorry (looked all over but can't find the answer)
>
> 1) When validation fails for my 'username' textfield, the error
message
textfield tag too.
2) IIRC, this javascript validation bug was resolved in the 2.1.x
branch.
2008/8/5 Gundersen, Richard <[EMAIL PROTECTED]>:
> Would really appreciate any help with the following (sent yesterday).
> Just a pointer to some good docs wo
Would really appreciate any help with the following (sent yesterday).
Just a pointer to some good docs would be great
-
Basic question sorry (looked all over but can't find the answer)
1) When validation fails for my 'username' textfield, the error message
is
Hi
Basic question sorry (looked all over but can't find the answer)
1) When validation fails for my 'username' textfield, the error message
is displayed ABOVE the text box.
Is it possible to have more fine-grained control over how to position
the error message. Ideally I would like it below (an
536
London Scottish Bank plc
24 Mount Street
Manchester
M2 3LS
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: Wednesday, July 30, 2008 10:18 PM
To: user@struts.apache.org
Subject: Re: Wierd Validation
Gundersen, Richard wrote:
> Hi
>
>
Hi
When validation succeeds on my form, I still get returned to the input
page. My execute() method does not seem to be getting called even when
validation is OK.
This is my Action (no @Validation annotation after I read that was
deprecated)
I do it this way (create a new ActionForward with the url you want in
the Action method you are executing, and just return that instead of
doing mapping.findForward...
ActionForward forward = new ActionForward(url);
return forward;
Richard Gundersen
Hi Pablo
Try using validwhen instead - I think rewquiredif was deprecated. I changed all
mine and you can achive the same thing although your logic might have to be
turned around a bit.
Here's an example:
Hi
I was wondering if I can rely on the order of the values returned by
request.getParameterValues()?
In my form I have a checkbox, and then underneath I have a hidden field
with the same name. I do this in case the checkbox is unchecked (and
hence the value would not be sent).
This way I always
t;JavaScript, DOM Scripting and Ajax Projects"
>> (2007, Apress, ISBN 1-59059-816-4)
>> Java Web Parts - http://javawebparts.sourceforge.net
>> Supplying the wheel, so you don't have to reinvent it!
>>
>> On Wed, August 1, 2007 10:38 am, Gundersen, Richard wrote:
Ajax Projects With Java Technology"
(2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
(2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!
On Wed,
Hi
I'm using a DownloadAction to generate a PDF and return it the the
browser. If there is a problem generating the PDF however, I want to
redirect the user to a specific JSP.
What's the best way of doing this? At the moment I am using
protected StreamInfo getStreamInfo(ActionMapping mapping,
r types in 'abc' for one of your
money fields, you wont be able to re-display their incorrect input.
That's the other major reason for making your form fields String-typed.
L.
Gundersen, Richard wrote:
> Actually, I tried out your first solution, and it actually works very
>
s.
-ed
On 3/1/07, Gundersen, Richard <[EMAIL PROTECTED]>
wrote:
> Hi
>
> Has anyone had problems with BigDecimal and DynaValidatorForms?
>
> I've got a form with two fields (advisorFee and grossIncome) defined
as
> java.lang.Double. I want to change them to java.mat
this populated by your action after validation
succeeds.
-ed
On 3/1/07, Gundersen, Richard <[EMAIL PROTECTED]>
wrote:
> Hi
>
> Has anyone had problems with BigDecimal and DynaValidatorForms?
>
> I've got a form with two fields (advisorFee and grossIncome) defined
as
>
Hi
Has anyone had problems with BigDecimal and DynaValidatorForms?
I've got a form with two fields (advisorFee and grossIncome) defined as
java.lang.Double. I want to change them to java.math.BigDecimal because
they are money fields.
If I change advisorFee to BigDecimal, the validation fails wh
Um, this might be wrong but I think you could open a connection using
URLConnection (or similar), and hit the JSP URL that way.
That should return a response (containing the HTML source) that you can
then use for whatever you want.
Not tried it though so I could be talking rubbish.
Richard
---
,
Gundersen, Richard wrote:
> Can anyone please tell me why this works. It's two versions of a
> validation rule from my commons validator xml file (for a validwhen
> condition):
The parser that the validation package uses cannot parse expressions of
the form "A or B or C&quo
parentheses is it?! ;-)
Cheers
Richard
-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 12, 2006 2:55 PM
To: Struts Users Mailing List
Subject: Re: Brackets in validation.xml
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Richard,
Gundersen
Hi
Can anyone please tell me why this works. It's two versions of a
validation rule from my commons validator xml file (for a validwhen
condition):
(
( (oldProductStatusId == 21) and ((productStatusId == 21) or
(productStatusId == 23) ) ) or
( (oldProductStatusId == 23) and ((produc
ax Paul provided?
L.
Gundersen, Richard wrote:
> Hi
>
> Thanks for replying. I have tried that actually and it didn't work. In
> fact that particular example wont work for me unfortunately because my
> property isn't part of a map inside a DynaActionForm - it's just
If you are using an ActionForm, you could modify your getter to do the
formatting. Or, have an additional getter method e.g.
Double amount;
Double getAmount() {
// bog standard method
}
String getFormattedAmount() {
// do some formatting
}
Then, in the form, do something like
rd
-Original Message-
From: Strachan, Paul [mailto:[EMAIL PROTECTED]
Sent: Monday, December 04, 2006 11:23 PM
To: Struts Users Mailing List
Subject: RE: Map backed properties
try something like:
...
-Original Message-
From: Gundersen, Richard [mailto:[EMAIL PROTECTED]
Sent: Mond
It could be that you have an error INSIDE the tile JSP. Are you doing
anything that could result in a null pointer?
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of maya
Sent: Monday, December 04, 2006 4:01 PM
To: user@struts.apache.org
Subject: tiles: error
please wha
Forget about the logo and help me with my Map-backed property problem -
I'm desperate!
Only kidding! ;-))
-Original Message-
From: Romu [mailto:[EMAIL PROTECTED]
Sent: Monday, December 04, 2006 2:14 PM
To: Struts Users Mailing List
Subject: Re: [OT] Did JIRA copy from LucasArts?
similar
Hi
I've been happily working with map based properties in my forms for a
while now, but I've come across something that I really can't figure
out.
I started off with a DynaValidatorForm, and in the mapping, I had this:
I was able to use this nicely, by populating it in the action
This is how I do it:
dateFormat
dd/MM/
...
...
...
datePattern
${dateFormat}
-Original Message-
From: vacak [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 22, 2006 10:41 AM
To: user@struts.apache.org
Subject: Date validation
Hi,
I use
Hi
Is there a clean way to use map-backed ActionForms in a JSP without
using scriptlets?
Say I have a map of properties called 'userAttributes' in my ActionForm.
I want to loop through these using something like a , and
then for each one I find, I want to display an tag. The
Struts tutori
Maybe you could have a bit of JavaScript in a tile or other include
that's in all your pages. Whenever a page loads, the session idle time
will be reset automatically, so you will have seconds
before it expires.
In the JavaScript, you could just do a simple loop that counts down from
zero. W
Log4j provides this functionality
Look at the docs for these two classes
org.apache.log4j.jdbcplus.JDBCLogger;
org.apache.log4j.jdbcplus.JDBCSqlHandler;
I've implemented it here, and it works great.
Richard
-Original Message-
From: Søren Blidorf [mailto:[EMAIL PROTECTED
55 matches
Mail list logo