RE: null in html on validation

2002-04-23 Thread Jesse Alexander (KADA 12)

Hi,

if you talk about Struts 1.0.x:

check in your application-resource-file whether you have the following 
keys with some value:

errors.header=Errors found:
errors.footer=

hope this helps
Alexander

-Original Message-
From: Team Gasoline [mailto:[EMAIL PROTECTED]]
Sent: Samstag, 20. April 2002 02:29
To: [EMAIL PROTECTED]
Subject: null in html on validation


Hello --

I'm having a problem  with errors being surrounded by "null" on my page 
after validation. Here is a snippet of the html when i view source of 
the page through the browser.

   
 
   User Name:
 
 
   
   null
<--Required 
Field
null

 
   

Here is what I have in my jsp.

   
 
   
 
 
   
   
 
   

and my form.

 public ActionErrors validate(ActionMapping mapping,
  HttpServletRequest request) {

 ActionErrors errors = new ActionErrors();
 if ((username == null) || (username.length() < 1))
 errors.add("username", new 
ActionError("error.username.required"));

 return errors;

 }

Has anyone ever seen this before. I have checked everywhere and have 
found no good answers.

Thanks.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: null in html on validation

2002-04-20 Thread Galbreath, Mark

If the request object contains nulls, the response object in JSP returns the
String "null."  Test for the presence of nulls in the request object and
return an empty String ("").

Mark

-Original Message-
From: Team Gasoline [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 19, 2002 8:29 PM
To: [EMAIL PROTECTED]
Subject: null in html on validation


Hello --

I'm having a problem  with errors being surrounded by "null" on my page 
after validation. Here is a snippet of the html when i view source of 
the page through the browser.

   
 
   User Name:
 
 
   
   null
<--Required 
Field
null

 
   

Here is what I have in my jsp.

   
 
   
 
 
   
   
 
   

and my form.

 public ActionErrors validate(ActionMapping mapping,
  HttpServletRequest request) {

 ActionErrors errors = new ActionErrors();
 if ((username == null) || (username.length() < 1))
 errors.add("username", new 
ActionError("error.username.required"));

 return errors;

 }

Has anyone ever seen this before. I have checked everywhere and have 
found no good answers.

Thanks.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: null in html on validation

2002-04-20 Thread srinivas

Hi,
In the action did u save errors and then forward to the jsp.

Try calling this method
saveErrors(request, errors);
and then forward.

Regards,
srinivas


-Original Message-
From: Team Gasoline [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, April 20, 2002 3:29 AM
To: [EMAIL PROTECTED]
Subject: null in html on validation

Hello --

I'm having a problem  with errors being surrounded by "null" on my page 
after validation. Here is a snippet of the html when i view source of 
the page through the browser.

   
 
   User Name:
 
 
   
   null
<--Required 
Field
null

 
   

Here is what I have in my jsp.

   
 
   
 
 
   
   
 
   

and my form.

 public ActionErrors validate(ActionMapping mapping,
  HttpServletRequest request) {

 ActionErrors errors = new ActionErrors();
 if ((username == null) || (username.length() < 1))
 errors.add("username", new 
ActionError("error.username.required"));

 return errors;

 }

Has anyone ever seen this before. I have checked everywhere and have 
found no good answers.

Thanks.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: