• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

<html:errors /> not viewing

 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm using html errors tag in struts as <html:errors /> but errors are not being displayed but the right page that has to show the errors is being displayed.

What could be the problem ?
 
Sagar Rohankar
Ranch Hand
Posts: 2905
1
Java Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Didn't get your question. Can you post the JSP with the Action class where you're storing action messages.
OR
Try using <html:messages/>
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is the input page that the error will be redirected to:



and this is my action class:

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Redirected to?

Are Struts 1 errors held in request or session?
 
Sagar Rohankar
Ranch Hand
Posts: 2905
1
Java Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

If you're using ActionErrors, then its bad. why ? this is what Struts 1.x JavaDocs says about ActionErrors class.
A class that encapsulates the error messages being reported by the validate() method of an ActionForm. Validation errors are either global to the entire ActionForm bean they are associated with, or they are specific to a particular bean property (and, therefore, a particular input field on the corresponding form).

ActionErrors are associated with the ActionForm, if you really want to return error message, consider using ActionMessages.

Also, the input page to which your returning(redirecting ??) is normally the page from which action gets called, like a html submit form page.

HTH
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic