File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes <html:errors /> not viewing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "<html:errors /> not viewing" Watch "<html:errors /> not viewing" New topic
Author

<html:errors /> not viewing

Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
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 ?


Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

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/>

[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
this is the input page that the error will be redirected to:



and this is my action class:

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Redirected to?

Are Struts 1 errors held in request or session?
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1


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
 
subject: <html:errors /> not viewing