You need to use the html:errors tag. This will display all of the errors
that you returned from the validate function of your action form.
-Original Message-
From: Henry Lu [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 7:30 AM
To: Struts Users Mailing List
Subject: error
-
From: Henry Lu [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 7:30 AM
To: Struts Users Mailing List
Subject: error display
WHen there is error in the validate() function, my jsp page only displays
ul
/ulhr
Why? How to let the page display the message specified
On Tue, Feb 05, 2002 at 12:12:40PM -0500, Henry Lu wrote:
# I did. I include
#
# html:errors/
#
# in a jsp file. But when validate() function finds error, the jsp page
# displays something like:
#
# ul
# /ulhr
#
# on the screen.
#
# Why?
Have you provided the messages for all the keys
Here is my code:
errors.add(ActionErrors.GLOBAL_ERROR,
new ActionError(error.id.required, id=123));
Could you send me part of your code?
Thanks,
---
Henry Lu
MCIT
On Tue, Feb 05, 2002 at 12:30:25PM -0500, Henry Lu wrote:
# Here is my code:
# errors.add(ActionErrors.GLOBAL_ERROR,
# new ActionError(error.id.required, id=123));
then you have to provide message for the key error.id.required.
check the content of the file you
Here is my ApplicationResource.properties file used ./classes
directory
errors.header=ul
errors.footer=/ulhr
errors.id.required=id is required.
---
Here is my validate() function
if (id == null || id.equals(123)
]]
Sent: Tuesday, February 05, 2002 12:03 PM
To: Pavel Nejedly
Cc: Struts Users Mailing List
Subject: Re: error display
Here is my ApplicationResource.properties file used ./classes
directory
errors.header=ul
errors.footer=/ulhr
errors.id.required=id is required
On Tue, Feb 05, 2002 at 01:03:18PM -0500, Henry Lu wrote:
# Here is my ApplicationResource.properties file used ./classes
# directory
#
# errors.header=ul
# errors.footer=/ulhr
# errors.id.required=id is required.
# ---
: Henry Lu [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 05, 2002 12:03 PM
To: Pavel Nejedly
Cc: Struts Users Mailing List
Subject: Re: error display
Here is my ApplicationResource.properties file used ./classes
directory
errors.header=ul
errors.footer=/ulhr
errors.id.required=id
WHen there is error in the validate() function, my jsp page only displays
ul
/ulhr
Why? How to let the page display the message specified in the validate()
function?
---
Henry Lu
MCIT
10 matches
Mail list logo