2013/3/9 john lee :
> i just checked your demo, looks like the first tricky is to define proxy
> action name signin in struts.xml
It isn't any trick, it's the normal why how to define many actions
base on one action class.
> struts.xml
>
>
> /example/Login.jsp
> Welcome
>
>
> *
?
is this the only way to lett struts2/spring validation works?
thanks so much in advance
john
From: Lukasz Lenart
To: Struts Users Mailing List ; john lee
Sent: Friday, March 8, 2013 7:27 AM
Subject: Re: struts 2 validation if use with spring
2013/3/
2013/3/8 john lee :
> Lukasz,
>
> thanks for your help, i just tried, but still not works
>
> any other suggestion?
I have prepared a small demo app
https://github.com/lukaszlenart/struts2-spring-validation
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
--
Lukasz,
thanks for your help, i just tried, but still not works
any other suggestion?
thanks in advance
john
From: Lukasz Lenart
To: Struts Users Mailing List
Sent: Friday, March 8, 2013 12:01 AM
Subject: Re: struts 2 validation if use with spring
2013/3/8 john lee :
>
As specified in the docs [1][2], validation file name must match schema:
class-name-validation.xml -> LoginAction-signin-validation.xml
[1]
http://struts.apache.org/development/2.x/docs/validation.html#Validation-DefiningValidationRules
[2]
http://struts
Problem
I use struts2/spring 3 as integration, and need to use struts2
validation.xml as well,
Basically, the action name in the login.jsp/struts.xml is pseudo class name,
but is implemented in
the applicationContext.xml
In order to let validation.xml works, I defined all the possible
XX
2013/3/7 john lee :
> Java backtrace for programmers:
> --
> freemarker.template.TemplateModelException: Method public java.util.List
> org.apache.struts2.components.Form.getValidators(java.lang.String) threw an
> exception when invoked on org.apache.struts2.components.Form@d6147e
>
please advise
thanks in advance
john
**
error:
Template processing error: "Method public java.util.List
org.apache.struts2.components.Form.getValidators(java.lang.String) threw an
exception when invok
If you define action alias for specific methods in your struts.xml (you
can do so with wildcards too), then you can use this format
--validation.xml as stated below.
http://struts.apache.org/2.1.8.1/docs/validation.html
Defining Validation Rules
Validation rules can be specified:
Per Action c
Hi,
Is there any way of creating a struts validation xml for a specific method or
is the only way of doing through an Action method eg.
public String saveSomething() {
return SUCCESS;
}
public void validateSaveSomething() {
//
}
Thanks
Dave.
-
Hi,
I have a save method in an action. Due to configuration, data can come from
the same form on different jsp. Each jsp having different required fields.
For example, an address form. On one jsp the "Country" field is required, on
another one the "Country" field is NOT required...
Can I specify
age without entering
> action class then raising an null pointer exception.I need that "list" even
> if the validation fails.
>
> Please help me to get out of this problem
>
> expecting your kind interaction
>
> thanks in advance
>
> rakesh
> --
> View th
m there to jsp page without entering
> action class then raising an null pointer exception.I need that "list" even
> if the validation fails.
>
> Please help me to get out of this problem
>
> expecting your kind interaction
>
> thanks in advance
>
> rakesh
&g
nd interaction
thanks in advance
rakesh
--
View this message in context:
http://old.nabble.com/struts-2-validation-error-tp27009670p27009670.html
Sent from the Struts - User mailing list archive at Nabble.com.
-
To unsubscri
The code below works a treat but just to help anyone out who might be
trying to do the same thing you can also use the tag
which does a similar thing but without the fine control on the
formatting.
Quoting Greg Lindholm :
So, fieldErrors is a Map>, the key is the field name
and the value
More info for the committer:
It looks like the javadoc on org.apache.struts2.components.IteratorComponent
contains info that Map is supported but it is not getting into the tag doc
perhaps because the is messed up and not on
it's own line.
Also a note that a Map will iterate on the entrySet() wo
Hey, you are correct.
Just dove into the code and I found that is uses a MakeIterator utility
class that if given a Map will call entrySet().
Maybe a commiter will be kind enough update the iterator tag doc to include
a Map example and a note on how Map is converted to an Iterator.
2009/10/2
Hi Greg,
i was about writing that one should read iterator tag docs
because one can use maps in s:iterator value,
but instead i've just read it myself and the info about iterating maps
is not there.
I use s:iterator where value is a map and it works in 2.1.6
just adding key or value inside iterator
Thanks Greg, that does the trick. I am now able to display the
validation errors at the top of the form.
Quoting Greg Lindholm :
So, fieldErrors is a Map>, the key is the field name
and the value is a List of messages.
I don't think you can use directly on a Map
as a Map is not iteratable (
So, fieldErrors is a Map>, the key is the field name
and the value is a List of messages.
I don't think you can use directly on a Map
as a Map is not iteratable (check the iterator tag doc [1]).
I think you will need to iterate on either the entry set or the key set .
As for %{top}, this gives
Okay that makes sense. Thanks for that!
But your example used a hardcoded fieldname. In order to dynamically
loop the fieldnames and display the errors for each of those fields I
have tried:
ERROR1:
ERROR2
But it always outputs the whole list, ie firs
There are three buckets for error messages; general errors, general messages
and field errors.
and display the general errors and
general messages.
Most validation will product field errors which by default get rendered
beside the field with the error.
You can control how field errors get displa
Hi Everyone,
I am new to Struts 2 and trying to make the switch from Struts 1.
I cannot figure out how to get the validation to display the
messages/errors in the input form with the use of the s:actionerror or
s:actionmessage tags. It never outputs anything despite the validation
appearin
Hello
Struts 2 in action is good book to resolve yours questions.
Greeting
- Original Message -
From: "Eileen Hurley"
To:
Sent: Thursday, October 22, 2009 10:07 AM
Subject: Struts 2 Validation issues
All,
I have problems with xml validation and Struts 2 (2.
All,
I have problems with xml validation and Struts 2 (2.0.14). The
validation as I see it is not displaying the error messages (I extend
ActionSupport). The defaultstack includes the validation interceptor.
I believe the problem is related to my struts.xml configuration and the
interceptor
i.
> Date: Wed, 8 Jul 2009 15:23:53 -0700
> From: robsonsil...@gmail.com
> To: user@struts.apache.org
> Subject: Re: Struts 2 Validation
>
>
> People,
>
> If someone want help me about my university project, here is my e-mail:
> robsonsil...@gmail.com . I can
;
>
>
>
>
>
>
> here is my jsp:
>
>
>
> <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
>
> pageEncoding="ISO-8859-1"%>
>
> <%...@page import="br.com.robson.modelo.Cliente"
8859-1"%>
>
> <%...@page import="br.com.robson.modelo.Cliente" %>
>
> <%...@page import ="java.util.*" %>
>
> <%@ taglib prefix="s" uri="/struts-tags" %>
>
>
>
> "http://www.w3.org/TR/html
nsert title here
Novo Cliente
I hope you can help me
Hugs!
--
View this message in context:
http://www.nabble.com/Struts-2-Validation-tp24382602p24382602.html
Sent from the Struts - User mailing list archive at Nabble.com.
user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>
>
--
View this message in context:
http://www.nabble.com/Struts-2-Validation-tp23421029p23440767.html
Sent from the Struts - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
NR031 wrote:
1) How to validate a Date format in Struts 2
I have my -validation.xml like this :
Please enter your Date of birth
Perhaps with the date validator:
http://struts.apache.org/2.x/docs/date-validator.html
2) How to compare two fields
I a
Thanks in advance,
--
View this message in context:
http://www.nabble.com/Struts-2-Validation-tp23421029p23421029.html
Sent from the Struts - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: user-unsubscr
Hi Lukasz,
Thanks for the solution. I will try this.
Regards,
Jitendra
_
From: Lukasz Lenart [mailto:lukasz.len...@googlemail.com]
Sent: Monday, January 19, 2009 2:39 PM
To: Struts Users Mailing List
Subject: Re: Struts 2 validation is not working for comma separated number
2009/1/19 jitendra :
> My question is how I can validate the Integer value which has the commas in
> it. Basically, we don't want to add any custom validator for this field
> because if we do so then we have to apply this validation through out our
> application and it is around 150 places.
The be
Hi,
We are using the struts2.0.6 framework as part of our business application.
Recently we found that there is a validation issue with struts2 frame -
work. Let me explain my problem first.
In a jsp page, I have defined a s:text field and the field property is
Integer type(defined in bean). No
Hello,
I don't see this happening in 2.0.14.
Are you using any custom validators? Any custom stack?
Felipe Fraga
On Wed, Dec 31, 2008 at 5:42 AM, Windy Hung wrote:
> Hi
> I use action field validation for my form.
> When I press "submit" button multiple times to test a field validation of
>
Hi
I use action field validation for my form.
When I press "submit" button multiple times to test a field validation of
"requiredstring", each invalid value message is printed and is stacked on each
other.
That means if I press "submit" button 5 times, the invalid warning message is
printed out
- Andrew
-Original Message-
From: Burton Rhodes [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 13, 2008 11:25 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: Advanced Struts 2 Validation Question...
Thanks to all! Implementing Validatable was simple and works great.
I am t
Thanks to all! Implementing Validatable was simple and works great.
I am thinking of moving all my action objects that need it to
Validatable. per Bill's suggestion... one less file to worry about.
:)
On Thu, Nov 13, 2008 at 9:58 AM, Dave Newton <[EMAIL PROTECTED]> wrote:
> --- On Thu, 11/13/08,
--- On Thu, 11/13/08, Burton Rhodes wrote:
> How do I use validation in an [Action]-validation.xml file
> to validate several fields?
>
> I need to implement the following logic for 3 fields on a
> form: Company, FirstName, LastName.
>
> Psedo Code:
>
> If Company empty, then FirstName and LastN
:: EXCELLENCE
-Original Message-
From: Burton Rhodes [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 13, 2008 9:06 PM
To: Struts Users Mailing List
Subject: Advanced Struts 2 Validation Question...
How do I use validation in an [Action]-validation.xml file to validate
several fields?
I need
Implement Valiadateable in your action and the Workflow interceptor will
call validate() before and action method If your validate() method adds
ActionErrors then the messages go back to the input form. You will also
need to configure / annotate an "input" result. I can't remember off the
top of
if you want javascript validation you will have to create your own theme and
own validation. You will have to create your own validator class and modify
the form-close-validation.ftl. This is what I've done in the past. Once you
figure out the details you start creating and reusing validators.
On
How do I use validation in an [Action]-validation.xml file to validate
several fields?
I need to implement the following logic for 3 fields on a form:
Company, FirstName, LastName.
Psedo Code:
If Company empty, then FirstName and LastName must be filled
If FirstName and LastName empty, then Comp
> Hope that helps,
> Jeromy Evans
>
> [1] http://struts.apache.org/2.x/docs/prepare-interceptor.html
> [2] http://struts.apache.org/2.x/docs/interceptors.html
>
> dfaulcon wrote:
>> I have an interesting problem that I'm dealing with in regards to struts
>> 2
>
nteresting problem that I'm dealing with in regards to struts 2
validation. I have XML validation setup throughout my application that
appear to work fine. The validation returns the appropriate error messages
when needed. However I have a user object that is created when a person
logs into t
I have an interesting problem that I'm dealing with in regards to struts 2
validation. I have XML validation setup throughout my application that
appear to work fine. The validation returns the appropriate error messages
when needed. However I have a user object that is created when a p
Thanks, I extended DefaultActionSupport and now it's working
On Feb 3, 2008 12:47 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> --- Martin Castellanos <[EMAIL PROTECTED]> wrote:
> > Oh, it's just a regular bean, doesn't implements or extends anything
>
> That'll be an issue.
>
> The workflow inter
--- Martin Castellanos <[EMAIL PROTECTED]> wrote:
> Oh, it's just a regular bean, doesn't implements or extends anything
That'll be an issue.
The workflow interceptor depends on the ValidationAware interface to decide
if it should modify the result.
Dave
> On Feb 3, 2008 12:32 PM, Dave Newton <
Oh, it's just a regular bean, doesn't implements or extends anything
On Feb 3, 2008 12:32 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> --- Martin Castellanos <[EMAIL PROTECTED]> wrote:
> > Action Class is: com.maca.web.BookAction
> > Validation file is placed next to the class:
> BookAction-save-
--- Martin Castellanos <[EMAIL PROTECTED]> wrote:
> Action Class is: com.maca.web.BookAction
> Validation file is placed next to the class: BookAction-save-validation.xml
> Validation file for the book entity is: Book-validation.xml and it's placed
> next to the Book class
"Signature" means "How i
Action Class is: com.maca.web.BookAction
Validation file is placed next to the class: BookAction-save-validation.xml
Validation file for the book entity is: Book-validation.xml and it's placed
next to the Book class
On Feb 3, 2008 12:20 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> --- Martin Cas
--- Martin Castellanos <[EMAIL PROTECTED]> wrote:
> Hi, I'm trying to use the xml validation, the validation is executing and
> detecting errors, but after the validation the method save gets called
> instead of invoking the input action it's executing the 'success' action.
> I've tried several thi
Hi, I'm trying to use the xml validation, the validation is executing and
detecting errors, but after the validation the method save gets called
instead of invoking the input action it's executing the 'success' action.
I've tried several things but still can't see what's missing, I'm using
Spring a
If you haven't solved this, here are the things I would try.
* Check that the that the Validation files seem like valid XML. A
quick way to do that is to open them in IE.
* Deploy the MailReader example to the same environment, to be sure
its validation works.
* Deploy your application to anot
Hi all,
I'm new to this mailing list and still a bit confused on how to look
things up, so apologies if this one is already up there!
I'm using Tomcat to serve up JSPs using Struts 2 with java action classes
and xml validation files. For example:
signup.jsp
SignUp.java
SignUp-validation.xml
A
Thanks alot. This has solved my problem. I really appreciate it.
Thanks once again.
Regards,
Shoaib Ahmad
- Original Message
From: Dave Newton <[EMAIL PROTECTED]>
To: Struts Users Mailing List
Sent: Thursday, November 22, 2007 10:42:10 AM
Subject: Re: Struts 2 validation off a
tion.xml
The S2 documentation wiki covers these options (and
probably a few more) and there are a few WebWork
validation articles out there as well, I believe
they're linked to on the wiki.
d.
--- Shoaib Gauhar <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am new to struts 2 validati
Hello,
I am new to struts 2 validation architecture. I am facing a problem which might
be very simple. I am adding all of my validation rules in the
actionclass-validation.xml. It works fine. But what happens is that when the
JSP page opens for the first time, it validates the fields and shows
only the appropriate message displayed
> based
> on the input.
> note: Please ignore the extra spaces in the param tags, I had
> intentionally
> added the space to make sure the message preview'd properly.
> --
> View this message in context:
> http://ww
splayed based
on the input.
note: Please ignore the extra spaces in the param tags, I had intentionally
added the space to make sure the message preview'd properly.
--
View this message in context:
http://www.nabble.com/Struts-2-Validation-multiple-validators-on-same-field-tf4232748.htm
Just use the getText() method to resolve the key of your choice. For
example: addActionError(getText("my.message.key"));
Don
On 7/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi,
I have written my customised java class to do the form validation within
the action class.
I want to render
Hi,
I have written my customised java class to do the form validation within
the action class.
I want to render the validation error messages from a property file and not
hard coding it into the code.
What i understand is the struts ActionSupport class has
addActionError(String msg) which takes
Hi All,
I am trying to use struts 2 validation for the first time.
I have a action class called TestAction.java and two form bean attribute like
Form01 f1; - with getter/setter
Form 02 f2 ; with getter/setter
as the form will be populated from two different pages i want
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Perryn,
Fowler, Perryn wrote:
> If I have a form that I want to submit with a POST, I want the
> response to this to always be a REDIRECT to a GET.
>
> I probably want this even in the case of validation failures that
> cause the form to be re-displa
,
I want to use the redirect after post pattern in order to have a web app that is well behaved when the user hits back, refresh etc etc
I also want to use the Struts 2 validation framework.
At first glance though, the two seem incompatible:
If I have a form that I want to submit with a
Hi,
I want to use the redirect after post pattern in order to have a web app that
is well behaved when the user hits back, refresh etc etc
I also want to use the Struts 2 validation framework.
At first glance though, the two seem incompatible:
If I have a form that I want to
Hi,
I want to use the redirect after post pattern in order to have a web app that
is well behaved when the user hits back, refresh etc etc
I also want to use the Struts 2 validation framework.
At first glance though, the two seem incompatible:
If I have a form that I want to submit with a
68 matches
Mail list logo