Re: Validator question Struts 1.2.9

2007-03-21 Thread Dilip Ladhani

Thanks, I figured it out. I made sure this was by default bundle.

On 3/21/07, Niall Pemberton <[EMAIL PROTECTED]> wrote:

On 3/21/07, Dilip Ladhani <[EMAIL PROTECTED]> wrote:
> I have gotten the validator to work in may of my projects, but I am
> stuck on this one and was wondering if someone can help.
> I have a MessageResources.properties under WEB-INF/classes which
> contains all the messages.
> In my struts-config I have the following line
> 
> Here is my validation.xml
> 
>  property="selectedCategory"
> depends="required">
> 
> 
>  property="startDate"
> depends="required,date">
> 
> 
> datePattern
> MM/dd/
>   
> 
> 
> I also tried putting 
> I always get an exception when I validate. I call the form.validate
> from my action class, I always get the following exception

If you're not using the "default" bundle then you need to specify the
bundle for all the messages as well - so you would have to add 
elements for both the "required" and "date" validator in the above
example (with the "bundle" attribute specified).

Niall

> 2007-03-21 12:41:36,437] [location -
> 
org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:578)]
> Unhandled exception thrown during validation: No message resources
> found for bundle: org.apache.struts.action.MESSAGE
> java.lang.NullPointerException: No message resources found for bundle:
> org.apache.struts.action.MESSAGE
> at 
org.apache.struts.validator.Resources.getMessageResources(Resources.java:140)
> at 
org.apache.struts.validator.Resources.getActionMessage(Resources.java:349)
> at 
org.apache.struts.validator.FieldChecks.validateRequired(FieldChecks.java:94)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
>
> thanks
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validator question Struts 1.2.9

2007-03-21 Thread Niall Pemberton

On 3/21/07, Dilip Ladhani <[EMAIL PROTECTED]> wrote:

Thanks for the reply.
However, after doing that I get the error
Unhandled exception thrown during validation: No message resources
found for bundle: messages
java.lang.NullPointerException: No message resources found for bundle: messages


OK after making it the default - did you remove the bundle="messages"
from your validation.xml?

Also take a look at the "bundles" example in the validator part of the
struts-examples webapp shipped with Struts 1.2.9

Niall


Also, on various jsps, I would have to, I would have to remove
bundle="messages", for eg

This I can do, however, I still get the above error

On 3/21/07, Nuwan Chandrasoma <[EMAIL PROTECTED]> wrote:
> make your message resource as the defautl one, dont put any key just add the
> entry
> 
>
> in struts-config and see.,
>
> Thanks & Regards,
>
> Nuwan.
>
>
>
> - Original Message -
> From: "Dilip Ladhani" <[EMAIL PROTECTED]>
> To: 
> Sent: Wednesday, March 21, 2007 4:48 PM
> Subject: Validator question Struts 1.2.9
>
>
> >I have gotten the validator to work in may of my projects, but I am
> > stuck on this one and was wondering if someone can help.
> > I have a MessageResources.properties under WEB-INF/classes which
> > contains all the messages.
> > In my struts-config I have the following line
> > 
> > Here is my validation.xml
> >
> > >property="selectedCategory"
> >depends="required">
> >
> >
> > >property="startDate"
> >depends="required,date">
> >
> >
> >datePattern
> >MM/dd/
> >  
> >
> >
> > I also tried putting 
> > I always get an exception when I validate. I call the form.validate
> > from my action class, I always get the following exception
> >
> > 2007-03-21 12:41:36,437] [location -
> > 
org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:578)]
> > Unhandled exception thrown during validation: No message resources
> > found for bundle: org.apache.struts.action.MESSAGE
> > java.lang.NullPointerException: No message resources found for bundle:
> > org.apache.struts.action.MESSAGE
> > at
> > 
org.apache.struts.validator.Resources.getMessageResources(Resources.java:140)
> > at
> > org.apache.struts.validator.Resources.getActionMessage(Resources.java:349)
> > at
> > 
org.apache.struts.validator.FieldChecks.validateRequired(FieldChecks.java:94)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> > 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > at
> > 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:585)
> >
> > thanks
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validator question Struts 1.2.9

2007-03-21 Thread Niall Pemberton

On 3/21/07, Dilip Ladhani <[EMAIL PROTECTED]> wrote:

I have gotten the validator to work in may of my projects, but I am
stuck on this one and was wondering if someone can help.
I have a MessageResources.properties under WEB-INF/classes which
contains all the messages.
In my struts-config I have the following line

Here is my validation.xml







datePattern
MM/dd/
  


I also tried putting 
I always get an exception when I validate. I call the form.validate
from my action class, I always get the following exception


If you're not using the "default" bundle then you need to specify the
bundle for all the messages as well - so you would have to add 
elements for both the "required" and "date" validator in the above
example (with the "bundle" attribute specified).

Niall


2007-03-21 12:41:36,437] [location -
org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:578)]
Unhandled exception thrown during validation: No message resources
found for bundle: org.apache.struts.action.MESSAGE
java.lang.NullPointerException: No message resources found for bundle:
org.apache.struts.action.MESSAGE
at 
org.apache.struts.validator.Resources.getMessageResources(Resources.java:140)
at 
org.apache.struts.validator.Resources.getActionMessage(Resources.java:349)
at 
org.apache.struts.validator.FieldChecks.validateRequired(FieldChecks.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)

thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validator question Struts 1.2.9

2007-03-21 Thread Dilip Ladhani

Thanks for the reply.
However, after doing that I get the error
Unhandled exception thrown during validation: No message resources
found for bundle: messages
java.lang.NullPointerException: No message resources found for bundle: messages

Also, on various jsps, I would have to, I would have to remove
bundle="messages", for eg

This I can do, however, I still get the above error

On 3/21/07, Nuwan Chandrasoma <[EMAIL PROTECTED]> wrote:

make your message resource as the defautl one, dont put any key just add the
entry


in struts-config and see.,

Thanks & Regards,

Nuwan.



- Original Message -
From: "Dilip Ladhani" <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, March 21, 2007 4:48 PM
Subject: Validator question Struts 1.2.9


>I have gotten the validator to work in may of my projects, but I am
> stuck on this one and was wondering if someone can help.
> I have a MessageResources.properties under WEB-INF/classes which
> contains all the messages.
> In my struts-config I have the following line
> 
> Here is my validation.xml
>
>property="selectedCategory"
>depends="required">
>
>
>property="startDate"
>depends="required,date">
>
>
>datePattern
>MM/dd/
>  
>
>
> I also tried putting 
> I always get an exception when I validate. I call the form.validate
> from my action class, I always get the following exception
>
> 2007-03-21 12:41:36,437] [location -
> 
org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:578)]
> Unhandled exception thrown during validation: No message resources
> found for bundle: org.apache.struts.action.MESSAGE
> java.lang.NullPointerException: No message resources found for bundle:
> org.apache.struts.action.MESSAGE
> at
> org.apache.struts.validator.Resources.getMessageResources(Resources.java:140)
> at
> org.apache.struts.validator.Resources.getActionMessage(Resources.java:349)
> at
> org.apache.struts.validator.FieldChecks.validateRequired(FieldChecks.java:94)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
>
> thanks
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validator question Struts 1.2.9

2007-03-21 Thread Nuwan Chandrasoma
make your message resource as the defautl one, dont put any key just add the 
entry



in struts-config and see.,

Thanks & Regards,

Nuwan.



- Original Message - 
From: "Dilip Ladhani" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, March 21, 2007 4:48 PM
Subject: Validator question Struts 1.2.9



I have gotten the validator to work in may of my projects, but I am
stuck on this one and was wondering if someone can help.
I have a MessageResources.properties under WEB-INF/classes which
contains all the messages.
In my struts-config I have the following line

Here is my validation.xml
   
   
   
   
   
   
   
   datePattern
   MM/dd/
 
   
   
I also tried putting 
I always get an exception when I validate. I call the form.validate
from my action class, I always get the following exception

2007-03-21 12:41:36,437] [location -
org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:578)]
Unhandled exception thrown during validation: No message resources
found for bundle: org.apache.struts.action.MESSAGE
java.lang.NullPointerException: No message resources found for bundle:
org.apache.struts.action.MESSAGE
at 
org.apache.struts.validator.Resources.getMessageResources(Resources.java:140)
at 
org.apache.struts.validator.Resources.getActionMessage(Resources.java:349)
at 
org.apache.struts.validator.FieldChecks.validateRequired(FieldChecks.java:94)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validator question

2007-02-27 Thread Laurie Harper

Tom Bednarz wrote:
I have a FormBean derived from ValidatorActionForm. I define validation 
rules for certain properties in validation.xml.


No I like to add some additional validations which depend on user input. 
I thought, I can handle this in the validate(..) method but it gets 
never called!


I implemented something like:

public class QueryTripsForm extends ValidatorActionForm
{
   ...
   public ActionErrors validate(ActionMapping mapping,
javax.servlet.ServletRequest request)
   {
ActionErrors e = null;
super.validate(mapping, request);
// doing some special checks here
// ..   
return e;

   }
   
}


That looks OK. Are you sure you want to extend ValidatorActionForm 
rather than just ValidatorForm? The effect is subtly different. You 
haven't posted your validation config, so I can't tell which would be 
correct for your useage.


Why is this validate method never called? (validate is set to true, see 
below)



  



How is the form declared in struts-config.xml? What URL are you 
accessing? Assuming your form is declared with the name 'queryTripsForm' 
and you're actually hitting this action mapping, validate() should be 
getting called I think.


Is there any way to combile 'default' validations defined in 
validation.xml with additional validations implemented in the validate() 
method??


Yes, with a slight correction to your code above:

ActionErrors e = super.validate(mapping, request);

You need to capture the errors from the 'default' validation process or 
they'll be discarded.


L.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Validator Question

2006-02-06 Thread Kalcevich, Daniel
This would be useful to indicate on the Validator portion of the Struts
User guide on the website.  I think knowing that information is an
important aspect of the email validation.

-Original Message-
From: Tom Ansley [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 06, 2006 8:33 AM
To: Struts Users Mailing List
Subject: Re: Validator Question

The email rule does that for you.  If you do not enter an email address
the
rule is not applied.  If you enter an email address the rule is applied
to
make sure the email is valid.

Cheers
Tom


On 2/6/06, Tom Ansley <[EMAIL PROTECTED]> wrote:
>
> The email rule does that for you.  If you do not enter an email
address
> the
> rule is not applied.  If you enter an email address the rule is
applied to
> make sure the email is valid.
>
> Cheers
> Tom
>
> -Original Message-
> From: Kalcevich, Daniel [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 06, 2006 8:32 AM
> To: Struts Users Mailing List
> Subject: RE: Validator Question
>
> So then how would you test a field that is not required to enter a
value
> into, but if the user does, it must be a valid email address?  That is
> what
> I am ultimately looking for.  Is there a way to achieve this using the
> validators that exist already, or do I need to create my own?
>
> Daniel
>
> -Original Message-
> From: Niall Pemberton [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 03, 2006 5:02 PM
> To: Struts Users Mailing List
> Subject: Re: Validator Question
>
> You shouldn't need to use validwhen to do what you describe - try just
> using
> email...
>
> 
>   
> 
>
> If however you do have reasons for using validwhen then the thing to
> remember is that the "test" variable specifies the condition when the
> field
> is valid. So what you have specified is that this field is valid when
> "notificationBcc" is null - otherwise it is invalid. So any value you
> enter
> in that field will cause a validation error. More recent versions of
> Struts
> (from 1.2.7 I think) include a "validwhen" examples page in the
> struts-examples webapp - which is included in the binary distro.
>
> Niall
>
> - Original Message -
> From: "Kalcevich, Daniel" <[EMAIL PROTECTED]>
> Sent: Friday, February 03, 2006 11:26 PM
>
>
> Everyone,
>
> I am using the validator to validate an email address in a text field.
> The field is not required, but when there is a value in there, I want
it
> to be a valid email address.  Here is my XML,
>
>
>
> 
>
>   
>
>   
>
>   test
>
> (*this* == null)
>
>   
>
> 
>
> But when I enter the value '[EMAIL PROTECTED]' I get an error
> message saying the field is required.  Any ideas?  Thanks.
>
> Daniel
>
>
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validator Question

2006-02-06 Thread Tom Ansley
The email rule does that for you.  If you do not enter an email address the
rule is not applied.  If you enter an email address the rule is applied to
make sure the email is valid.

Cheers
Tom


On 2/6/06, Tom Ansley <[EMAIL PROTECTED]> wrote:
>
> The email rule does that for you.  If you do not enter an email address
> the
> rule is not applied.  If you enter an email address the rule is applied to
> make sure the email is valid.
>
> Cheers
> Tom
>
> -Original Message-
> From: Kalcevich, Daniel [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 06, 2006 8:32 AM
> To: Struts Users Mailing List
> Subject: RE: Validator Question
>
> So then how would you test a field that is not required to enter a value
> into, but if the user does, it must be a valid email address?  That is
> what
> I am ultimately looking for.  Is there a way to achieve this using the
> validators that exist already, or do I need to create my own?
>
> Daniel
>
> -Original Message-
> From: Niall Pemberton [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 03, 2006 5:02 PM
> To: Struts Users Mailing List
> Subject: Re: Validator Question
>
> You shouldn't need to use validwhen to do what you describe - try just
> using
> email...
>
> 
>   
> 
>
> If however you do have reasons for using validwhen then the thing to
> remember is that the "test" variable specifies the condition when the
> field
> is valid. So what you have specified is that this field is valid when
> "notificationBcc" is null - otherwise it is invalid. So any value you
> enter
> in that field will cause a validation error. More recent versions of
> Struts
> (from 1.2.7 I think) include a "validwhen" examples page in the
> struts-examples webapp - which is included in the binary distro.
>
> Niall
>
> - Original Message -
> From: "Kalcevich, Daniel" <[EMAIL PROTECTED]>
> Sent: Friday, February 03, 2006 11:26 PM
>
>
> Everyone,
>
> I am using the validator to validate an email address in a text field.
> The field is not required, but when there is a value in there, I want it
> to be a valid email address.  Here is my XML,
>
>
>
> 
>
>   
>
>   
>
>   test
>
> (*this* == null)
>
>   
>
> 
>
> But when I enter the value '[EMAIL PROTECTED]' I get an error
> message saying the field is required.  Any ideas?  Thanks.
>
> Daniel
>
>
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: Validator Question

2006-02-06 Thread Tom Ansley
The email rule does that for you.  If you do not enter an email address the
rule is not applied.  If you enter an email address the rule is applied to
make sure the email is valid.

Cheers
Tom 

-Original Message-
From: Kalcevich, Daniel [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 06, 2006 8:32 AM
To: Struts Users Mailing List
Subject: RE: Validator Question

So then how would you test a field that is not required to enter a value
into, but if the user does, it must be a valid email address?  That is what
I am ultimately looking for.  Is there a way to achieve this using the
validators that exist already, or do I need to create my own?

Daniel

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Friday, February 03, 2006 5:02 PM
To: Struts Users Mailing List
Subject: Re: Validator Question

You shouldn't need to use validwhen to do what you describe - try just using
email...


  


If however you do have reasons for using validwhen then the thing to
remember is that the "test" variable specifies the condition when the field
is valid. So what you have specified is that this field is valid when
"notificationBcc" is null - otherwise it is invalid. So any value you enter
in that field will cause a validation error. More recent versions of Struts
(from 1.2.7 I think) include a "validwhen" examples page in the
struts-examples webapp - which is included in the binary distro.

Niall

- Original Message -
From: "Kalcevich, Daniel" <[EMAIL PROTECTED]>
Sent: Friday, February 03, 2006 11:26 PM


Everyone,

I am using the validator to validate an email address in a text field.
The field is not required, but when there is a value in there, I want it
to be a valid email address.  Here is my XML,





  

  

  test

(*this* == null)

  



But when I enter the value '[EMAIL PROTECTED]' I get an error
message saying the field is required.  Any ideas?  Thanks.

Daniel






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Validator Question

2006-02-06 Thread Kalcevich, Daniel
So then how would you test a field that is not required to enter a value
into, but if the user does, it must be a valid email address?  That is
what I am ultimately looking for.  Is there a way to achieve this using
the validators that exist already, or do I need to create my own?

Daniel

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 03, 2006 5:02 PM
To: Struts Users Mailing List
Subject: Re: Validator Question

You shouldn't need to use validwhen to do what you describe - try just
using
email...


  


If however you do have reasons for using validwhen then the thing to
remember is that the "test" variable specifies the condition when the
field
is valid. So what you have specified is that this field is valid when
"notificationBcc" is null - otherwise it is invalid. So any value you
enter
in that field will cause a validation error. More recent versions of
Struts
(from 1.2.7 I think) include a "validwhen" examples page in the
struts-examples webapp - which is included in the binary distro.

Niall

- Original Message - 
From: "Kalcevich, Daniel" <[EMAIL PROTECTED]>
Sent: Friday, February 03, 2006 11:26 PM


Everyone,

I am using the validator to validate an email address in a text field.
The field is not required, but when there is a value in there, I want it
to be a valid email address.  Here is my XML,





  

  

  test

(*this* == null)

  



But when I enter the value '[EMAIL PROTECTED]' I get an error
message saying the field is required.  Any ideas?  Thanks.

Daniel






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validator Question

2006-02-03 Thread Niall Pemberton
You shouldn't need to use validwhen to do what you describe - try just using
email...


  


If however you do have reasons for using validwhen then the thing to
remember is that the "test" variable specifies the condition when the field
is valid. So what you have specified is that this field is valid when
"notificationBcc" is null - otherwise it is invalid. So any value you enter
in that field will cause a validation error. More recent versions of Struts
(from 1.2.7 I think) include a "validwhen" examples page in the
struts-examples webapp - which is included in the binary distro.

Niall

- Original Message - 
From: "Kalcevich, Daniel" <[EMAIL PROTECTED]>
Sent: Friday, February 03, 2006 11:26 PM


Everyone,

I am using the validator to validate an email address in a text field.
The field is not required, but when there is a value in there, I want it
to be a valid email address.  Here is my XML,





  

  

  test

(*this* == null)

  



But when I enter the value '[EMAIL PROTECTED]' I get an error
message saying the field is required.  Any ideas?  Thanks.

Daniel






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: validator question

2005-08-04 Thread Dewitte Rémi
Le Mardi 2 Août 2005 20:14, Dewitte Rémi a écrit :
> Hi !
> In a wizard, I have some "required" checks with struts-validator assigned
> to pages (with page=).
> There is sometimes a "jump" in the wizard so that a property is null. When
> validating the page after the jump, the server-side validation failed as if
> validator checked all previous pages.
> For example,
> page1 -> property q1
> page2 -> property q2
> page3 -> property q3
> If i jump from page1 to page3, submitting page3 will failed telling q2 is
> required (because null).
>
> Can you confirm that the validator ckecks all properties for pages <=
> current page ?

Answer to myself : yes

From validator src :
/** 
 * Gets the page.  This in conjunction with the page property of 
 * a Field can control the processing of fields. If the 
field's 
 * page is less than or equal to this page value, it will be processed. 
 */ 
public int getPage() { 
return page; 
}

>
> Thanks.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validator question

2005-01-20 Thread Curtis Taylor
Hi Hubert,
Thanks for the reply; very helpful & much appreciated (as is all your 
work ;-).

I've done a bit more gumshoeing; it seems to me the html:javascript 
tag's exception handling is a bit different than other Struts tags. I 
discovered that the reason that the html:javascript tag printed the 
commons-validator.jar's scripts to the target JSP was the result of 
another non-related tag error (read: pebkac ;-).

So, by commenting it out I was able to discover what the root problem 
was. Perhaps this can be shared on the wiki? I'd be happy to add it to 
the tribal knowledge there...

Thanks again for your help,
Curtis
Hubert Rabago wrote:
I'm not exactly sure what you mean.  If you meant the
 resulted in javascript code being written without
being surrounded by 

Re: Validator question

2005-01-20 Thread Hubert Rabago
I'm not exactly sure what you mean.  If you meant the
 resulted in javascript code being written without
being surrounded by 

Re: Validator question

2005-01-04 Thread Craig McClanahan
If you install Struts and its dependencies in each of your ten
webapps's /WEB-INF/lib directories, it will indeed require more memory
than a single shared installation, because each class will get loaded
once per webapp instead of only once.

The downside of sharing, of course, is that the code you are sharing
has to be deliberately designed to work inside a parent class loader,
and not all the code in Struts (or its dependencies) has been audited
to ensure that it will actually work.  Indeed, the user guide has this
to say on the subject:

  http://struts.apache.org/userGuide/configuration.html#config_add

While progress has been made in improving the abililty of the various
libraries to work this way, I've never personally tried to examine
validator for this kind of problem.

Craig


On Tue, 4 Jan 2005 11:37:04 -0700, Jim Barrows <[EMAIL PROTECTED]> wrote:
> 
> 
> > -Original Message-
> > Wrom: XOEAIJJPHSCRTNHGSWZIDREXCAXZOWCONEUQZAAFXISHJEXXIMQZU
> > Sent: Tuesday, January 04, 2005 11:30 AM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Validator question
> >
> >
> > Agree 100%. My comment was purely theoretical.
> >
> > On a side note though... Does it consume more RAM if you have 10 apps
> > running on the same server all having their own validator jar
> > in their lib?
> 
> No, the jar is just where it looks for the definition of the class.
> 
> > If it does, this might not be as theoretical as I think.
> >
> > Of course, hopefully, I'll never be in a situation where such
> > things matter
> > enough for me to start doing these tricks.
> >
> > Thanks,
> > Yaakov.
> >
> > -----Original Message-
> > Wrom: IVOTQNQEMSFDULHPQQWOYIYZUNNYCGPKYLEJGD
> > Sent: Tuesday, January 04, 2005 1:05 PM
> > To: Struts Users Mailing List
> > Subject: RE: Validator question
> >
> >
> > > -Original Message-
> > > Wrom: GVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUWLSZLKBRNVWWCUFPEGAUT
> > > Sent: Tuesday, January 04, 2005 10:52 AM
> > > To: 'Struts Users Mailing List'
> > > Subject: RE: Validator question
> > >
> > >
> > > Although I agree with you that it's much easier to keep it
> > > all in the lib of
> > > the webapp, I think it should still be ok to keep
> > > common-validator.jar in
> > > the server's shared lib directory.
> > >
> > > The classloader problem would only apply to struts.jar since
> > > it tries to
> > > load classes dynamically and therefore needs to be in the
> > > same (or below)
> > > classloader. I don't think validator framework does the
> > same, does it?
> >
> > I have no idea.  I consider it to be a complete waste of my
> > time trying to
> > figure out classpath issues like this, so I just keep
> > everything a web app
> > needs in it's lib directory.  My time is worth more then
> > extra disk space,
> > so it doesn't make sense from a financial point of view.
> > Then, you have upgrade issues... the new web app needs the
> > latest jar, but
> > the old app blows up on the latest jar... so now your back to
> > where you
> > were, plus the added time of finding out (probably after install to
> > production) that the latest jar blows up old applications.
> >
> > Uggh.
> >
> >
> >
> > >
> > > Thanks,
> > > Yaakov.
> > >
> > > -Original Message-
> > > Wrom: FJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHV
> > > Sent: Tuesday, January 04, 2005 12:00 PM
> > > To: Struts Users Mailing List
> > > Subject: RE: Validator question
> > >
> > >
> > > > -Original Message-
> > > > Wrom: IBGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKS
> > > > Sent: Tuesday, January 04, 2005 2:02 AM
> > > > To: user@struts.apache.org
> > > > Subject: Validator question
> > > >
> > > >
> > > > I just started learning validator (struts) and developed one
> > > > small form with one single field. I used Javascript and
> > > > serverside validatin both.
> > > >
> > > > Till now i used to put all my jar files inside {Tomcat
> > > > home}/common/lib and it was all ok. (I do not want to keep
> > > > too many copies of jar files inside different application
> > > > directories). Till now this seems to be not working.
> > >
> > > Nope it won't work.  Classloader iss

RE: Validator question

2005-01-04 Thread Jim Barrows


> -Original Message-
> From: Chaikin, Yaakov Y. [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 11:30 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Validator question
> 
> 
> Agree 100%. My comment was purely theoretical.
> 
> On a side note though... Does it consume more RAM if you have 10 apps
> running on the same server all having their own validator jar 
> in their lib?

No, the jar is just where it looks for the definition of the class.

> If it does, this might not be as theoretical as I think. 
> 
> Of course, hopefully, I'll never be in a situation where such 
> things matter
> enough for me to start doing these tricks.
> 
> Thanks,
> Yaakov.
> 
> -Original Message-
> From: Jim Barrows [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 1:05 PM
> To: Struts Users Mailing List
> Subject: RE: Validator question
> 
> 
> > -Original Message-
> > From: Chaikin, Yaakov Y. [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 04, 2005 10:52 AM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Validator question
> >
> >
> > Although I agree with you that it's much easier to keep it
> > all in the lib of
> > the webapp, I think it should still be ok to keep
> > common-validator.jar in
> > the server's shared lib directory.
> >
> > The classloader problem would only apply to struts.jar since
> > it tries to
> > load classes dynamically and therefore needs to be in the
> > same (or below)
> > classloader. I don't think validator framework does the 
> same, does it?
> 
> I have no idea.  I consider it to be a complete waste of my 
> time trying to
> figure out classpath issues like this, so I just keep 
> everything a web app
> needs in it's lib directory.  My time is worth more then 
> extra disk space,
> so it doesn't make sense from a financial point of view. 
> Then, you have upgrade issues... the new web app needs the 
> latest jar, but
> the old app blows up on the latest jar... so now your back to 
> where you
> were, plus the added time of finding out (probably after install to
> production) that the latest jar blows up old applications.
> 
> Uggh. 
> 
> 
> 
> >
> > Thanks,
> > Yaakov.
> >
> > -Original Message-
> > From: Jim Barrows [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 04, 2005 12:00 PM
> > To: Struts Users Mailing List
> > Subject: RE: Validator question
> >
> >
> > > -Original Message-
> > > From: Manisha Sathe [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, January 04, 2005 2:02 AM
> > > To: user@struts.apache.org
> > > Subject: Validator question
> > >
> > >
> > > I just started learning validator (struts) and developed one
> > > small form with one single field. I used Javascript and
> > > serverside validatin both.
> > >
> > > Till now i used to put all my jar files inside {Tomcat
> > > home}/common/lib and it was all ok. (I do not want to keep
> > > too many copies of jar files inside different application
> > > directories). Till now this seems to be not working.
> >
> > Nope it won't work.  Classloader issues.  See archive for details.
> > Keep each wars jars in the lib.  Much easier.
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Validator question

2005-01-04 Thread Chaikin, Yaakov Y.
Agree 100%. My comment was purely theoretical.

On a side note though... Does it consume more RAM if you have 10 apps
running on the same server all having their own validator jar in their lib?
If it does, this might not be as theoretical as I think. 

Of course, hopefully, I'll never be in a situation where such things matter
enough for me to start doing these tricks.

Thanks,
Yaakov.

-Original Message-
From: Jim Barrows [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 04, 2005 1:05 PM
To: Struts Users Mailing List
Subject: RE: Validator question


> -Original Message-
> From: Chaikin, Yaakov Y. [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 10:52 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Validator question
>
>
> Although I agree with you that it's much easier to keep it
> all in the lib of
> the webapp, I think it should still be ok to keep
> common-validator.jar in
> the server's shared lib directory.
>
> The classloader problem would only apply to struts.jar since
> it tries to
> load classes dynamically and therefore needs to be in the
> same (or below)
> classloader. I don't think validator framework does the same, does it?

I have no idea.  I consider it to be a complete waste of my time trying to
figure out classpath issues like this, so I just keep everything a web app
needs in it's lib directory.  My time is worth more then extra disk space,
so it doesn't make sense from a financial point of view. 
Then, you have upgrade issues... the new web app needs the latest jar, but
the old app blows up on the latest jar... so now your back to where you
were, plus the added time of finding out (probably after install to
production) that the latest jar blows up old applications.

Uggh. 



>
> Thanks,
> Yaakov.
>
> -Original Message-
> From: Jim Barrows [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 12:00 PM
> To: Struts Users Mailing List
> Subject: RE: Validator question
>
>
> > -Original Message-
> > From: Manisha Sathe [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 04, 2005 2:02 AM
> > To: user@struts.apache.org
> > Subject: Validator question
> >
> >
> > I just started learning validator (struts) and developed one
> > small form with one single field. I used Javascript and
> > serverside validatin both.
> >
> > Till now i used to put all my jar files inside {Tomcat
> > home}/common/lib and it was all ok. (I do not want to keep
> > too many copies of jar files inside different application
> > directories). Till now this seems to be not working.
>
> Nope it won't work.  Classloader issues.  See archive for details.
> Keep each wars jars in the lib.  Much easier.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Validator question

2005-01-04 Thread Jim Barrows


> -Original Message-
> From: Chaikin, Yaakov Y. [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 10:52 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Validator question
> 
> 
> Although I agree with you that it's much easier to keep it 
> all in the lib of
> the webapp, I think it should still be ok to keep 
> common-validator.jar in
> the server's shared lib directory.
> 
> The classloader problem would only apply to struts.jar since 
> it tries to
> load classes dynamically and therefore needs to be in the 
> same (or below)
> classloader. I don't think validator framework does the same, does it?

I have no idea.  I consider it to be a complete waste of my time trying to 
figure out classpath issues like this, so I just keep everything a web app 
needs in it's lib directory.  My time is worth more then extra disk space, so 
it doesn't make sense from a financial point of view.  
Then, you have upgrade issues... the new web app needs the latest jar, but the 
old app blows up on the latest jar... so now your back to where you were, plus 
the added time of finding out (probably after install to production) that the 
latest jar blows up old applications. 

Uggh.  



> 
> Thanks,
> Yaakov.
> 
> -Original Message-
> From: Jim Barrows [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 12:00 PM
> To: Struts Users Mailing List
> Subject: RE: Validator question
> 
> 
> > -Original Message-
> > From: Manisha Sathe [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 04, 2005 2:02 AM
> > To: user@struts.apache.org
> > Subject: Validator question
> >
> >
> > I just started learning validator (struts) and developed one
> > small form with one single field. I used Javascript and
> > serverside validatin both.
> > 
> > Till now i used to put all my jar files inside {Tomcat
> > home}/common/lib and it was all ok. (I do not want to keep
> > too many copies of jar files inside different application
> > directories). Till now this seems to be not working.
> 
> Nope it won't work.  Classloader issues.  See archive for details.
> Keep each wars jars in the lib.  Much easier.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Validator question

2005-01-04 Thread Chaikin, Yaakov Y.
Although I agree with you that it's much easier to keep it all in the lib of
the webapp, I think it should still be ok to keep common-validator.jar in
the server's shared lib directory.

The classloader problem would only apply to struts.jar since it tries to
load classes dynamically and therefore needs to be in the same (or below)
classloader. I don't think validator framework does the same, does it?

Thanks,
Yaakov.

-Original Message-
From: Jim Barrows [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 04, 2005 12:00 PM
To: Struts Users Mailing List
Subject: RE: Validator question


> -Original Message-
> From: Manisha Sathe [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 2:02 AM
> To: user@struts.apache.org
> Subject: Validator question
>
>
> I just started learning validator (struts) and developed one
> small form with one single field. I used Javascript and
> serverside validatin both.
> 
> Till now i used to put all my jar files inside {Tomcat
> home}/common/lib and it was all ok. (I do not want to keep
> too many copies of jar files inside different application
> directories). Till now this seems to be not working.

Nope it won't work.  Classloader issues.  See archive for details.
Keep each wars jars in the lib.  Much easier.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Validator question

2005-01-04 Thread Jim Barrows


> -Original Message-
> From: Manisha Sathe [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 2:02 AM
> To: user@struts.apache.org
> Subject: Validator question
> 
> 
> I just started learning validator (struts) and developed one 
> small form with one single field. I used Javascript and 
> serverside validatin both.
>  
> Till now i used to put all my jar files inside {Tomcat 
> home}/common/lib and it was all ok. (I do not want to keep 
> too many copies of jar files inside different application 
> directories). Till now this seems to be not working.

Nope it won't work.  Classloader issues.  See archive for details.
Keep each wars jars in the lib.  Much easier.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Validator question

2005-01-04 Thread Ashutosh Satyam
It'll be good if you can have a look at Tomcat documentation - 'Class Loader 
Section'
 It clearly says that if you want to have jars accessible to different web 
application,
then it should be placed in $CATALINA_HOME/shared/lib  directory.

 Hope this should address your problem.

 - Ashutosh
   

-Original Message-
From: Manisha Sathe [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 04, 2005 2:32 PM
To: user@struts.apache.org
Subject: Validator question


I just started learning validator (struts) and developed one small form with 
one single field. I used Javascript and serverside validatin both.
 
Till now i used to put all my jar files inside {Tomcat home}/common/lib and it 
was all ok. (I do not want to keep too many copies of jar files inside 
different application directories). Till now this seems to be not working.
 
But when it comes to the validator part ->
 
If i keep jar files inside {Tomcat home}/common/lib - then validation is not 
taking place at all. (Although i can see in view source that JavaScript is 
being generted). Even server side validation won't take place.
 
If i put back all jar files inside {my web application}/WEB-INF/lib directory 
it works properly.
 
Ofcourse i am not expert but this is the observation after long hrs struggle. 
Is there any workaround ?
 
 
regards
Manisha
 
 


-
Do you Yahoo!?
 Yahoo! Mail - now with 250MB free storage. Learn more.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validator question

2004-12-13 Thread Susan Bradeen
On Mon, 13 Dec 2004 10:44:24 -0700, Jim Barrows <[EMAIL PROTECTED]> wrote:
> 
> 
> > -Original Message-
> > From: Vinicius Caldeira Carvalho
> > [mailto:[EMAIL PROTECTED]
> > Sent: Monday, December 13, 2004 11:32 AM
> > To: Struts Users Mailing List
> > Subject: Validator question
> >
> >
> > Hi there. Correct if I'm wrong, validator returns to the
> > input jsp after
> > a validation fails right?
> > Now if my jsp was called by an action that receives
> > parameters throught
> > the request, how can I handle this?
> 
> This is a problem with how validation works with struts.  The list history 
> has quite a few discussions on this.  My typical solution is to put the form 
> bean into session scope, rather then request scope.
> 

Or, include the parameters in your JSP as hidden fields. They will be
passed to the form bean again after submitting the form page, and
therefore will be available after validation fails.


> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Validator question

2004-12-13 Thread Jim Barrows


> -Original Message-
> From: Vinicius Caldeira Carvalho
> [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 13, 2004 11:32 AM
> To: Struts Users Mailing List
> Subject: Validator question
> 
> 
> Hi there. Correct if I'm wrong, validator returns to the 
> input jsp after 
> a validation fails right?
> Now if my jsp was called by an action that receives 
> parameters throught 
> the request, how can I handle this?

This is a problem with how validation works with struts.  The list history has 
quite a few discussions on this.  My typical solution is to put the form bean 
into session scope, rather then request scope.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Validator question

2004-11-30 Thread Ram Venkataswamy
Or if you want custom msg for required validator then name attribute of
msg element should match that specified for depends attribute
 
 
-Original Message-
From: Ram Venkataswamy 
Sent: Tuesday, November 30, 2004 9:57 AM
To: Struts Users Mailing List
Subject: RE: Validator question

Check "required" validator in your validator-rules file - the message
takes one argument {0} is required - whereas in validation file you are
passing two values for 1 argument





try removing  - it should work 


 
-Original Message-
From: Vinicius Caldeira Carvalho
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 30, 2004 5:44 AM
To: Struts Users Mailing List
Subject: Validator question

Hi there! I'm trying to make my validator projetct work on oc4j (oracle 
10g) and so far I got no success at all.
First thing that is really strange is that at deploy time the 
application runs it complains about some attributes being used but not 
declared: " XML-0149: (Error) Element 'arg0' used but not declared."
well this doesn't seem to be affecting the application though.

But when I submit a form that uses validation nothin happens, I'm 
submitted to a null page with this error on the stack:
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Objec
t, 
org.apache.commons.validator.ValidatorAction, 
org.apache.commons.validator.Field, 
org.apache.struts.action.ActionErrors, 
javax.servlet.http.HttpServletRequest)
org.apache.commons.validator.ValidatorException: 
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Objec
t, 
org.apache.commons.validator.ValidatorAction, 
org.apache.commons.validator.Field, 
org.apache.struts.action.ActionErrors, 
javax.servlet.http.HttpServletRequest)
at 
org.apache.commons.validator.ValidatorAction.loadValidationMethod(Valida
torAction.java:627)
at 
org.apache.commons.validator.ValidatorAction.executeValidationMethod(Val
idatorAction.java:557)
at
org.apache.commons.validator.Field.validateForRule(Field.java:811)
at org.apache.commons.validator.Field.validate(Field.java:890)
at org.apache.commons.validator.Form.validate(Form.java:174)
at
org.apache.commons.validator.Validator.validate(Validator.java:367)
at 
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:11
2)
at 
org.apache.struts.action.RequestProcessor.processValidate(RequestProcess
or.java:921)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
206)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestD
ispatcher.java:765)
at 
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(Servle
tRequestDispatcher.java:317)
at 
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHa
ndler.java:790)
at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:
270)
at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:
112)
at 
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Releasab
leResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)

No matter if I entered a value or not on the field:

here's my validation.xml













Any ideas?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Validator question

2004-11-30 Thread Ram Venkataswamy
Check "required" validator in your validator-rules file - the message
takes one argument {0} is required - whereas in validation file you are
passing two values for 1 argument





try removing  - it should work 


 
-Original Message-
From: Vinicius Caldeira Carvalho
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 30, 2004 5:44 AM
To: Struts Users Mailing List
Subject: Validator question

Hi there! I'm trying to make my validator projetct work on oc4j (oracle 
10g) and so far I got no success at all.
First thing that is really strange is that at deploy time the 
application runs it complains about some attributes being used but not 
declared: " XML-0149: (Error) Element 'arg0' used but not declared."
well this doesn't seem to be affecting the application though.

But when I submit a form that uses validation nothin happens, I'm 
submitted to a null page with this error on the stack:
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Objec
t, 
org.apache.commons.validator.ValidatorAction, 
org.apache.commons.validator.Field, 
org.apache.struts.action.ActionErrors, 
javax.servlet.http.HttpServletRequest)
org.apache.commons.validator.ValidatorException: 
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Objec
t, 
org.apache.commons.validator.ValidatorAction, 
org.apache.commons.validator.Field, 
org.apache.struts.action.ActionErrors, 
javax.servlet.http.HttpServletRequest)
at 
org.apache.commons.validator.ValidatorAction.loadValidationMethod(Valida
torAction.java:627)
at 
org.apache.commons.validator.ValidatorAction.executeValidationMethod(Val
idatorAction.java:557)
at
org.apache.commons.validator.Field.validateForRule(Field.java:811)
at org.apache.commons.validator.Field.validate(Field.java:890)
at org.apache.commons.validator.Form.validate(Form.java:174)
at
org.apache.commons.validator.Validator.validate(Validator.java:367)
at 
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:11
2)
at 
org.apache.struts.action.RequestProcessor.processValidate(RequestProcess
or.java:921)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
206)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestD
ispatcher.java:765)
at 
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(Servle
tRequestDispatcher.java:317)
at 
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHa
ndler.java:790)
at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:
270)
at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:
112)
at 
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Releasab
leResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)

No matter if I entered a value or not on the field:

here's my validation.xml













Any ideas?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validator question

2004-11-30 Thread Vinicius Caldeira Carvalho
Duncan Mills wrote:
It might be worth enabling logging on the digester classes to see 
what's happening on the XML.
I run validator using apps  with Struts 1.1 in OC4J with no problem so 
there's not a fundamental issue here.  Are you using OC4J inside 
JDeveloper or deploying to it from an external IDE? / Manually

Regards
Duncan Mills

Vinicius Caldeira Carvalho wrote:
Bill Siggelkow wrote:
Make sure you are using the latest release of Struts 
(http://struts.apache.org/acquiring.html).
In Struts 1.2.2 (IIRC) there was an inconsistency with the Validator 
that caused this problem.

-Bill Siggelkow
Vinicius Caldeira Carvalho wrote:
Hi there! I'm trying to make my validator projetct work on oc4j 
(oracle 10g) and so far I got no success at all.
First thing that is really strange is that at deploy time the 
application runs it complains about some attributes being used but 
not declared: " XML-0149: (Error) Element 'arg0' used but not 
declared."
well this doesn't seem to be affecting the application though.

But when I submit a form that uses validation nothin happens, I'm 
submitted to a null page with this error on the stack:
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object, 
org.apache.commons.validator.ValidatorAction, 
org.apache.commons.validator.Field, 
org.apache.struts.action.ActionErrors, 
javax.servlet.http.HttpServletRequest)
org.apache.commons.validator.ValidatorException: 
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object, 
org.apache.commons.validator.ValidatorAction, 
org.apache.commons.validator.Field, 
org.apache.struts.action.ActionErrors, 
javax.servlet.http.HttpServletRequest)
   at 
org.apache.commons.validator.ValidatorAction.loadValidationMethod(ValidatorAction.java:627) 

   at 
org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:557) 

   at 
org.apache.commons.validator.Field.validateForRule(Field.java:811)
   at org.apache.commons.validator.Field.validate(Field.java:890)
   at org.apache.commons.validator.Form.validate(Form.java:174)
   at 
org.apache.commons.validator.Validator.validate(Validator.java:367)
   at 
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:112) 

   at 
org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:921) 

   at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:206) 

   at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) 

   at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765) 

   at 
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317) 

   at 
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) 

   at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) 

   at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) 

   at 
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) 

   at java.lang.Thread.run(Thread.java:534)
No matter if I entered a value or not on the field:
here's my validation.xml


   
   
   
   
   
   
   


Any ideas?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

well, problem is... I'm using struts 1.1 is this inconsitence present 
in this release as well?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Hi there Duncan, I'm using the second option. We use eclipse + ant to 
deploy our app. I'll try to log the errors to see what's going wrong.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Validator question

2004-11-30 Thread Duncan Mills
It might be worth enabling logging on the digester classes to see what's 
happening on the XML.
I run validator using apps  with Struts 1.1 in OC4J with no problem so 
there's not a fundamental issue here.  Are you using OC4J inside 
JDeveloper or deploying to it from an external IDE? / Manually

Regards
Duncan Mills

Vinicius Caldeira Carvalho wrote:
Bill Siggelkow wrote:
Make sure you are using the latest release of Struts 
(http://struts.apache.org/acquiring.html).
In Struts 1.2.2 (IIRC) there was an inconsistency with the Validator 
that caused this problem.

-Bill Siggelkow
Vinicius Caldeira Carvalho wrote:
Hi there! I'm trying to make my validator projetct work on oc4j 
(oracle 10g) and so far I got no success at all.
First thing that is really strange is that at deploy time the 
application runs it complains about some attributes being used but 
not declared: " XML-0149: (Error) Element 'arg0' used but not 
declared."
well this doesn't seem to be affecting the application though.

But when I submit a form that uses validation nothin happens, I'm 
submitted to a null page with this error on the stack:
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object, 
org.apache.commons.validator.ValidatorAction, 
org.apache.commons.validator.Field, 
org.apache.struts.action.ActionErrors, 
javax.servlet.http.HttpServletRequest)
org.apache.commons.validator.ValidatorException: 
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object, 
org.apache.commons.validator.ValidatorAction, 
org.apache.commons.validator.Field, 
org.apache.struts.action.ActionErrors, 
javax.servlet.http.HttpServletRequest)
   at 
org.apache.commons.validator.ValidatorAction.loadValidationMethod(ValidatorAction.java:627) 

   at 
org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:557) 

   at 
org.apache.commons.validator.Field.validateForRule(Field.java:811)
   at org.apache.commons.validator.Field.validate(Field.java:890)
   at org.apache.commons.validator.Form.validate(Form.java:174)
   at 
org.apache.commons.validator.Validator.validate(Validator.java:367)
   at 
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:112) 

   at 
org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:921) 

   at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:206) 

   at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
   at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765) 

   at 
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317) 

   at 
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) 

   at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) 

   at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) 

   at 
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) 

   at java.lang.Thread.run(Thread.java:534)
No matter if I entered a value or not on the field:
here's my validation.xml


   
   
   
   
   
   
   


Any ideas?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

well, problem is... I'm using struts 1.1 is this inconsitence present 
in this release as well?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Validator question

2004-11-30 Thread Vinicius Caldeira Carvalho
Bill Siggelkow wrote:
Make sure you are using the latest release of Struts 
(http://struts.apache.org/acquiring.html).
In Struts 1.2.2 (IIRC) there was an inconsistency with the Validator 
that caused this problem.

-Bill Siggelkow
Vinicius Caldeira Carvalho wrote:
Hi there! I'm trying to make my validator projetct work on oc4j 
(oracle 10g) and so far I got no success at all.
First thing that is really strange is that at deploy time the 
application runs it complains about some attributes being used but 
not declared: " XML-0149: (Error) Element 'arg0' used but not declared."
well this doesn't seem to be affecting the application though.

But when I submit a form that uses validation nothin happens, I'm 
submitted to a null page with this error on the stack:
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object, 
org.apache.commons.validator.ValidatorAction, 
org.apache.commons.validator.Field, 
org.apache.struts.action.ActionErrors, 
javax.servlet.http.HttpServletRequest)
org.apache.commons.validator.ValidatorException: 
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object, 
org.apache.commons.validator.ValidatorAction, 
org.apache.commons.validator.Field, 
org.apache.struts.action.ActionErrors, 
javax.servlet.http.HttpServletRequest)
   at 
org.apache.commons.validator.ValidatorAction.loadValidationMethod(ValidatorAction.java:627) 

   at 
org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:557) 

   at org.apache.commons.validator.Field.validateForRule(Field.java:811)
   at org.apache.commons.validator.Field.validate(Field.java:890)
   at org.apache.commons.validator.Form.validate(Form.java:174)
   at 
org.apache.commons.validator.Validator.validate(Validator.java:367)
   at 
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:112) 

   at 
org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:921) 

   at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:206) 

   at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
   at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765) 

   at 
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317) 

   at 
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) 

   at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) 

   at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) 

   at 
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) 

   at java.lang.Thread.run(Thread.java:534)
No matter if I entered a value or not on the field:
here's my validation.xml


   
   
   
   
   
   
   


Any ideas?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

well, problem is... I'm using struts 1.1 is this inconsitence present in 
this release as well?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Validator question

2004-11-30 Thread Bill Siggelkow
Make sure you are using the latest release of Struts 
(http://struts.apache.org/acquiring.html).
In Struts 1.2.2 (IIRC) there was an inconsistency with the Validator 
that caused this problem.

-Bill Siggelkow
Vinicius Caldeira Carvalho wrote:
Hi there! I'm trying to make my validator projetct work on oc4j (oracle 
10g) and so far I got no success at all.
First thing that is really strange is that at deploy time the 
application runs it complains about some attributes being used but not 
declared: " XML-0149: (Error) Element 'arg0' used but not declared."
well this doesn't seem to be affecting the application though.

But when I submit a form that uses validation nothin happens, I'm 
submitted to a null page with this error on the stack:
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object, 
org.apache.commons.validator.ValidatorAction, 
org.apache.commons.validator.Field, 
org.apache.struts.action.ActionErrors, 
javax.servlet.http.HttpServletRequest)
org.apache.commons.validator.ValidatorException: 
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object, 
org.apache.commons.validator.ValidatorAction, 
org.apache.commons.validator.Field, 
org.apache.struts.action.ActionErrors, 
javax.servlet.http.HttpServletRequest)
   at 
org.apache.commons.validator.ValidatorAction.loadValidationMethod(ValidatorAction.java:627) 

   at 
org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:557) 

   at org.apache.commons.validator.Field.validateForRule(Field.java:811)
   at org.apache.commons.validator.Field.validate(Field.java:890)
   at org.apache.commons.validator.Form.validate(Form.java:174)
   at org.apache.commons.validator.Validator.validate(Validator.java:367)
   at 
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:112)
   at 
org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:921) 

   at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:206) 

   at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
   at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765) 

   at 
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317) 

   at 
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) 

   at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) 

   at 
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) 

   at 
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) 

   at java.lang.Thread.run(Thread.java:534)
No matter if I entered a value or not on the field:
here's my validation.xml


   
   
   
   
   
   
   


Any ideas?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Validator question

2004-09-16 Thread Niall Pemberton
Are you sure your destinationName validation is correct - seems to me like
it should always give a validation error if buttonSelected is not "find"? I
think it should be something like the following


> destinationName is required only when destinationReference is null AND
> the parameter 'buttonSelected' is 'find'




 test
 (*this* != null) or
  ( (buttonSelected != "find") or
(destinationRef != null))
 

 


For the destinationReference validation, how about the following...

> destinationReference is ALWAYS required EXCEPT when 'buttonSelected' is
> 'find' and destinationReference is not null




 test
 (*this* != null) or
  ((buttonSelected == "find") and
(destinationName != null))


 

Niall

- Original Message - 
From: "Marco Mistroni" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, September 16, 2004 12:13 PM
Subject: Validator question


> Hi all,
> I have following issue with Validator
>
> I have a form that has, between other fields, two fields,
> destinationReference and destinationName.
>
> destinationName is required only when destinationReference is null AND
> the parameter 'buttonSelected' is 'find'
>
> destinationReference is ALWAYS required EXCEPT when 'buttonSelected' is
> 'find' and destinationReference is not null
>
> any hints?
>
> Following the validator guide I have entered following in the
> validation.xml
>
> 
> 
>   
>  test
>  (buttonSelected == "find") and
> ((destinationRef== null) or (*this* != null))
>   
> 
>   
>
>
> this works fine for the destinationName field
> I am missing how to specify   destinationReference is ALWAYS required
> except
> When destinationName is NOT null and buttonSelected is 'find'
>
> Anyone can help?
>
> Thanx in advance and regards
> marco



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validator question

2004-05-25 Thread Joe Germuska
At 5:15 PM -0500 5/25/04, Peter Martin wrote:
I have a select list that I want to validate the user picked one of the
values.  The options in the select list are as follows:
option[0]value = "" label = "Please Select"
option[1]value = "P"   label = "Probation"
option[2]value = "T"   label = "Trial"
option[3]value = " "label = "None"
option[1], option[2], or option[3] where option[3] is one blank are valid
selections.  I know that I can't use "required" because required will not
except option[3] since it is blank.  I tried using a mask of [ TP].  That
worked for the JavaScript validation, but failed in the validate method of
the ValidatorActionForm.
Any thoughts?
Make the value for "None" a non-empty string (maybe the word 'none'), 
and translate it in the action before passing it into your 
application core.

Joe
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
  "Imagine if every Thursday your shoes exploded if you tied them 
the usual way.  This happens to us all the time with computers, and 
nobody thinks of complaining."
-- Jef Raskin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Validator question

2004-04-22 Thread Marco Mistroni
Hi Hernan,
Htanx for ur input, but I am still experiencing problems
Here is my validation.xml



  
  
  
 test
 (buttonSelected == "find") and
((destinationRef == null) or (*this* != null))
   


  
  
  
 test
 (buttonSelected == "find") and
((destinationRef == null) or (*this* != null))
  

  

when I enter nothing in both fields, it seems that it does not validate
since the business logic is executed...

can you point me to what could be wrong in this file? Both fields need
to be
validated if the buttonSelected is equal to find and the other field is
empty...

thanx and regards
marco



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: 22 April 2004 15:21
To: Struts Users Mailing List
Subject: Re: Validator question

In de Struts Validator guide, under the title "Conditionally required
fields" is an example of how to do conditional requirement.
http://jakarta.apache.org/struts/userGuide/dev_validator.html

Hope it helps
Hernan



> Hi all,
>   I need help on struts validator.
> I have a form bean with two fields,and either one
> Or the other needs to be entered.
> How can I express, in validation.xml, that I want that either
> One field or the other is required?
>
> Thanx in advance and regards
>   marco
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validator question

2004-04-22 Thread hernans
In de Struts Validator guide, under the title "Conditionally required
fields" is an example of how to do conditional requirement.
http://jakarta.apache.org/struts/userGuide/dev_validator.html

Hope it helps
Hernan



> Hi all,
>   I need help on struts validator.
> I have a form bean with two fields,and either one
> Or the other needs to be entered.
> How can I express, in validation.xml, that I want that either
> One field or the other is required?
>
> Thanx in advance and regards
>   marco
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]