PROTECTED]>
Sent: Wednesday, December 12, 2001 4:30 AM
Subject: RE: Help:Handling Exceptions within Formbean Validate ???
> Hi Greg,
>
> Try setting validate=true and input= in your action
> mapping. This way if your form bean returns ActionError(s) Struts will
> return
Hi Greg,
Try setting validate=true and input= in your action
mapping. This way if your form bean returns ActionError(s) Struts will
return to the named input form to display errors (see html:error tag).
Jon.
-Original Message-
From: Greg Callaghan [mailto:[EMAIL PROTECTED]]
Sent: 12
form is processed remove
the list from the session...
hope this helps
Alexander Jesse
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 12, 2001 1:06 AM
To: [EMAIL PROTECTED]
Subject: Help:Handling Exceptions within Formbean Validate ???
Hi
Hi,
With struts how is one supposed to handle exceptions which are caught within
the validate method of a formbean? That is, how can you from here go to
ones generic error page?
Background - I have a case where the form (eg create new X) has some pull
down lists which are dynamically
no longer be returned? I tried setting the
> form scope to both
> > session and request, to no avail.
> >
> > Thanks again for any help.
> >
> > >>
> > >>--
> > >> > >> pat
data
> will no longer be returned? I tried setting the form scope to both
> session and request, to no avail.
>
> Thanks again for any help.
>
> >>
> >>--
> >> >> path="/user/add1"
> >> type="com.usba
gt; > path="/user/add1"
>> type="com.usbank.crm.user.UserAction"
>> name="userForm"
>> scope="session"
>> validate="false"
>> input="/user/user1.jsp"
Dan Tanner wrote:
>
> I'm having the problem of losing form data when my action class returns
> errors. The error displays properly, but I lose all the form data.
If you are talking about form data that is generated by an Action, and
not passed back through the HTTP request, then you may need t
packages for Bean Utils,
Collections, and the Digester. I believe some people
have this working, but I haven't had time to try it.
David
>
> Thanks in advance for any help.
>
> --
>path="/user/add1"
>
my two cents is instance of the view(value object) which is used to populate
the form had gone in the request scope after form validation, because the
validate() is called before the action class instance is created. Hmm... try
set the view in session however be careful remember to reset the view
}
// the continue is used for both adds and edits...it validates the
// data and continues on to the next page if successful.
if ("continue".equals(action)) {
System.err.println("\n\n\n in continue action \n\n\n");
// vali
Hello,
I don´t know if it is a validator in the commons, but the Struts version 1.1
have one.
The ISValidator was originaly developed to work in diferents scenarios. I
was searching routines to validate data but the routines that I found were
focused in form validation.
I thought: Why I can´t
/
-Ursprüngliche Nachricht-
Von: Iñigo Serrano [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 27. November 2001 03:01
An: Struts User
Betreff: [ANN] Routines to validate Date in Struts
Hello
I am developing a routines (ISValidator) to validate data in diferents
scenarios, command line argumets, Servlets
Hello
I am developing a routines (ISValidator) to validate data in diferents scenarios,
command line argumets, Servlets Parameters, etc,...
I have develop also some classes to use ISValidator in Struts 1.0
With this routines the process of validating a form is more easy and sistematic i
You may want to send them to a logon Action instead, which displayed the
logon page but had validate set to false. The page would then submit to
another Action with validate set to true. You could also add a redirect
option to that mapping. (Which would also cure any problem with orphan
have a situation where
> multiple jsps pages use
> the same ActionForm.
>
> As I understand it, when the Form's validate()
> method returns an error,
> then the ActionServlet forwards control to the
> "input" page where "input"
> is the input specif
I'm using Struts 1.0 and I have a situation where multiple jsps pages use
the same ActionForm.
As I understand it, when the Form's validate() method returns an error,
then the ActionServlet forwards control to the "input" page where "input"
is the input specified
My application requires that users log on, so created a tag to check if the
requester has already logged on. If not, this tag redirects him to a logon
page (/logon.jsp).
I have found that if the validate() method of the form bean returns errors
and the user's session is lost (e.g. time
Hi Andras,
check the struts-example for app.tld.. and the associated
.
--Rakesh
- Original Message -
From: "Andras Balogh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 13, 2001 4:18 PM
Subject: validate() method and session timeout
request is processed and automatically redirect them to
the logon page when it was appropriate.
Jon.
-Original Message-
From: Andras Balogh [mailto:[EMAIL PROTECTED]]
Sent: 13 November 2001 10:48
To: [EMAIL PROTECTED]
Subject: validate() method and session timeout
Hi,
I am using stru
i am forwarding to a login.jsp page.
Now i have a form (form.jsp) and the asociated ActionForm class.
This class has a validate method for checking emtpy fields etc.
Now here is the following scenario:
The user logs in and he goes to this form page. For some reason he waits
and the session time
Whoops, that seems to be it :).
Thank you!
On Tue, 23 Oct 2001, Geddes, Mark (ANTS) wrote:
> Does you element in struts-config include the attribute
> validate="true" ?
>
> Mark
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROT
Does you element in struts-config include the attribute
validate="true" ?
Mark
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: 23 October 2001 10:57
To: [EMAIL PROTECTED]
Subject: automatically calling validate() of ActionForm
Hi!
my applicati
Hi!
my application doesn't automatically call the validate() function in my
ActionForm-extending class. I added the form to the struts-config file in
the right manner, but it won't work. The form is filled and passed to the
Action-class, but it won't execute validate().
I
Just a follow-up to
describe how I fixed the problem below:
===
"Blessing, Jeffrey"
wrote:> > I've just recently read the entire thread on this issue
posted> last Wed 9/19/01 and still have the following problem:>
> Wh
716 737-3463
-- http://www.husted.com/about/struts/
"Blessing, Jeffrey" wrote:
>
> I've just recently read the entire thread on this issue posted
> last Wed 9/19/01 and still have the following problem:
>
> When the validate() method of my form bean returns a
I've just recently read the entire thread on this issue posted
last Wed 9/19/01 and still have the following problem:
When the validate() method of my form bean returns a non-
empty ActionErrors list, struts fails to re-populate the form
fields with the text that was submitted success
why not server side? with ActionForm and validate?
jsp:
=
Datum von:
...
the form bean:
=
public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request) {
ActionErrors errors = new ActionErrors();
if (from == null
All
Does anybody can give me a small Example or explanation on how to use
javascript to validate field input in JSP not null and be integer ?
Thanks
Julia
Title: RE: Does struts validate input field in JSP type by itself ?
you can validate the input field by implementing a validate method in form bea.
actionservlet will do it for you
Frank
-Original Message-
From: Julia Yang [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 10, 2001
hi julia,
you get, as far as I know, only strings for settings. you can validate the
string in your ActionForm within the validate method. you have to look if
the string can be transfered to a integer; when no you can add an error and
redirect back to the jsp.
public void
Hi, all
Do you know if struts validate input fields in JSP by itself, which has
matched getter and setter methods in bean,?
For example: You have field called companyID in JSP and in you xxxForm
bean you have
int companyID();
public int getCompanyID(){
return
m. I'll look
> over it again. If a field is of type int, you don't
> need to validate to see if it is an int. Also if you
> have a field defined as an int, then you don't know if
> someone entered something bad because you will always
> get the default value of the fiel
I didn't think it would cause a problem. I'll look
over it again. If a field is of type int, you don't
need to validate to see if it is an int. Also if you
have a field defined as an int, then you don't know if
someone entered something bad because you will always
get the
>
> David
>
> --- Ho Soo Aun <[EMAIL PROTECTED]> wrote:
> > Had I missed any step?
> > Been trying to implement David's Struts Validator
> > for quite a while.
> >
> > Every time I access a editmeter.jsp through an
> > action which popul
david,
Struts 1.0.
jakarta-tomcat-3.2.3
-Sanjay
Original Message Follows
From: David Winterfeldt <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Validator::validate() reflection - null
Date: Fri, 17 Aug 2001 08:16:19 -0700 (PDT)
What vers
e I access a editmeter.jsp through an
> action which populate the
> fields.
> Tomcat 3.2.2 console show "Validator::validate()
> reflection - null"
> twice
> Enter char in int field (to be validate) is saved as
> '0'. No validation
> was done.
>
Something to try.
In your struts-config.xml set validate="false", that seems to work better
for some reason. Everything else looks good.
Hope this helps,
Kent
-Original Message-
From: Ho Soo Aun [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 5:01 AM
To: [EMAIL
Had I missed any step?
Been trying to implement David's Struts Validator for quite a while.
Every time I access a editmeter.jsp through an action which populate the
fields.
Tomcat 3.2.2 console show "Validator::validate() reflection - null"
twice
Enter char in int field (to
Yep. That was it.
Thanks for the help!
David.
-Original Message-
From: David Winterfeldt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 15, 2001 2:26 PM
To: [EMAIL PROTECTED]
Subject: Re: validate() interaction with
OptionsTag.getIterator(OptionsTag) - NullPointerException
It
orresponding ActionForm and Action
> class.
>
> If I don't populate the ActionErrors object in
> validate, everything works
> great.
>
> If I do populate the ActionErrors object, I get a
> NullPointerException in
> t
I have a simple for with a text input field, submit button and select
components
in the form.
There is a corresponding ActionForm and Action class.
If I don't populate the ActionErrors object in validate, everything works
great.
If I do populate the ActionErrors object, I
I have been wracking my brain to remember how to do this but no luck so
hopefully someone can help.
I am trying to figure out how to forward to a jsp page or .do from
within the ActionForm validate method. If for example during my
validation I encounter a system error I want to redirect the
It may sound strange but try to change
validate attribute from "true" to "false".
Best of luck,
Yuriy Zubarev
--- BinhMinh Nguyen <[EMAIL PROTECTED]> wrote at 27 Jul 13:21 :
> Hi,>
> I have a problem calling the validate(...) method from>
>
Hi,
I have a problem calling the validate(...) method from
the ActionForm: this is what I have done:
1- implement the validate() method in ActionForm,
2- in struts-config.xml, set the validate attribute to
true for the action-mapping.
But the method is not called when I clicked one of the
Does anyone know of a "time" validation that I can add to my validation.xml
file. It would be similar to the entry below (I figure), but would validate
the time is between 0:00 and 12:00, or 0:00 and 24:00
___
Title: session formbeans with validate errors BUG?
I have a session-scoped action which uses a form bean to collect and validate properties. This page is within a set of frames, which explains the session scoping.
When the page is submitted, it is submitted to the controller but to the
ut the last step only forward to the next phase. I am
using validate="true" so if the user has an error, struts will forward back
to the input page. So my single Action class just checks forward to "next"
for all but the last step.
Next I'm going to learn about the token functionality.
Thanks very much,
Seth
Title: RE: Where to forward when validate returns false in wizard style forms?
Yes, it would be better to have an action for each step in the process. That is what MVC/Model 2 is all about.
-Original Message-
From: Seth Ladd [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 30, 2001 8
Hello,
I may not understand properly the way struts deals with things when
validate="true" in the action mapping, so please bear with me.
I have a wizard style input form(s) all using the same Action. Most of the
time, the Action will only forward to the next page. Only at the last
On Tue, 10 Apr 2001, Cecil Pang wrote:
> I have some trouble in initializing a variable of type ListArray in an
> action form and I am getting null pointer exceptions. Can someone tell me
> when exactly are the reset(ActionMapping mapping, HttpServletRequest
> request)
1, 2001 2:33 PM
To: [EMAIL PROTECTED]
Subject: Use of Mapping in ActionForm's validate() method
Hi! All
Can anybody provide me with a use for mapping parameter in validate()
method of ActionForm?
If u have used this parameter for something please let me know.
T
Hi! All
Can anybody provide me with a use for mapping parameter in validate()
method of ActionForm?
If u have used this parameter for something please let me know.
Thanks in advance.
Rajan
__
Do You Yahoo!?
Get email at your own domain with
I have some trouble in initializing a variable of type ListArray in an
action form and I am getting null pointer exceptions. Can someone tell me
when exactly are the reset(ActionMapping mapping, HttpServletRequest
request) and validate(ActionMapping mapping, HttpServletRequest) methods
thanks david...
i used this approach and its working...
Nishit
-Original Message-
From: David Winterfeldt [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 02, 2001 2:33 PM
To: [EMAIL PROTECTED]
Subject: Re: relation between "validate", validate method and perform
method
If v
If validate is set to true in the struts-config.xml,
then the ActionServlet will automatically call the
validate method in your ActionForm for you. If there
are errors, it will return you to your input
attribute's URL. If there aren't any errors, it will
call your perform method. I
hi..
( sorry if this is dumb que)
Can any body tell me what is the relation between these three
1. "validate" parameter of Action mapping definition in struts-config file
2. the "validate" method of a form bean and
3. a "perform" method of any class extende
On Wed, 28 Mar 2001, Suriyanarayanan, Senthil Kumar wrote:
> Hello,
> How do I redirect to the input jsp page from the formbean's validate
> method instead of populating ActionErrors. I knew redirecting from the
> perform method of the Action object, wondering is it pos
Hello,
How do I redirect to the input jsp page from the formbean's validate
method instead of populating ActionErrors. I knew redirecting from the
perform method of the Action object, wondering is it possible to simulate
the same from the validate method.
Thanks in advance,
Se
On Tue, 27 Mar 2001, Matthias Bauer wrote:
> Hi everybody,
>
> I am trying to set the default value for validate in the ActionMapping class to
> false. So I subclassed ActionMapping and did this in the constructor:
>
> public ApplicationMapping()
> {
I use validate="false" in struts-config.xml and then sometimes call the
validate() from my save class.
So sorry but that?s my advice.
KN
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Matthias Bauer
Sent: den 27 mars 2001 15:29
To: [EMAIL
That is exactly what I want to avoid. I don't always want to write
validate="false" in struts-config.xml. I would like to have the value false to
be the default. And I still want to provide a validate() method in the form
bean, because from some actions I would like to ha
Just write you own validate() method (with no values) in your form bean.
Then your own method overwrites the super class? validate method.
Or just write "validate=false" in your struts-config.xml file for the
corresponding action
e.g.:
.
/Katarina
-Original Message-
Fr
Hi everybody,
I am trying to set the default value for validate in the ActionMapping class to
false. So I subclassed ActionMapping and did this in the constructor:
public ApplicationMapping()
{
super();
setValidate(false);
}
The
Mike Campbell wrote:
Is there some reason for the name "validate" in the web.xml
file to indicate using the "new" format vs. the old? Is there more
to it than that, because I can't grasp how the term "validate" relates
to deciding which version/DTD of the
Title: "validate" param in web.xml
Is there some reason for the name "validate" in the web.xml file to indicate using the "new" format vs. the old? Is there more to it than that, because I can't grasp how the term "validate" relates to deciding w
f course, you could still set it to false instead of true,
> > but that would be your entire responsibility, and would have the same
> > consequences as inadvertently returning null in your validate method.
> >
> > What do you think?
>
> I'm in favor of being able t
e your entire responsibility, and would have the same
> consequences as inadvertently returning null in your validate method.
>
> What do you think?
I'm in favor of being able to configure validation independently of the form also.
This allows me to use my form object for both setup of t
Hello,
I have a problem using the current validate scheme.
Scenario:
I have a Struts action that adds a bean B in the request, also populates a
form bean. Next, the Struts controller forwards the request to a jsp page P.
Then the next request is made, but the validate method on the form bean
t; it was before this change, consider the following scenario:
> > * You declare your action to require a form bean
> > * Your form bean wants to do validation
> > * You forget to define an "input" parameter
> > in the action mapping
> > * Struts never calls
; * Your form bean wants to do validation
> * You forget to define an "input" parameter
> in the action mapping
> * Struts never calls your validate() method
> * Your action method gets called, probably
> assuming that validation was successful,
> and relies on incorr
ter
in the action mapping
* Struts never calls your validate() method
* Your action method gets called, probably
assuming that validation was successful,
and relies on incorrect assumptions.
This seems like a Bad Thing for a framework to allow when the developer simply
forgets to update a config
401 - 472 of 472 matches
Mail list logo