Re: Declarative Exception Handling with Struts Validation

2006-05-16 Thread Paul Benedict
>> forwarded to the correct view, I cannot display the error message using > >> . Does anyone know why? > >> > >> I have the validate attribute of the action element set to false in my > >> 'struts-config.xml' and this is the only way that I ha

Re: Declarative Exception Handling with Struts Validation

2006-05-16 Thread Asad Habib
know why? I have the validate attribute of the action element set to false in my 'struts-config.xml' and this is the only way that I have been able to make declarative exception handling work with the Struts Validator. If I set the validate attribute to true, declarative exception han

Re: Declarative Exception Handling with Struts Validation

2006-05-16 Thread Paul Benedict
e I have been > forwarded to the correct view, I cannot display the error message using > . Does anyone know why? > > I have the validate attribute of the action element set to false in my > 'struts-config.xml' and this is the only way that I have been able to > make d

Declarative Exception Handling with Struts Validation

2006-05-16 Thread Asad Habib
to false in my 'struts-config.xml' and this is the only way that I have been able to make declarative exception handling work with the Struts Validator. If I set the validate attribute to true, declarative exception handling does not work and I am forwarded to the view specified in the inpu

Re: Declarative Exception Handling

2006-04-23 Thread Ted Husted
On 4/21/06, Asad Habib <[EMAIL PROTECTED]> wrote: > When using declarative exception handling, where do you create the > exception instances? In the action itself? Yes. The framework first catches all exceptions thrown by an Action. Then, it looks to see if there's an exception

Declarative Exception Handling

2006-04-21 Thread Asad Habib
When using declarative exception handling, where do you create the exception instances? In the action itself? I would like to use the ModuleException class and pass a resource key to the constructor but don't know where this should be accomplished. On another note, are there any reso

Declarative exception handling behaving wierdly.

2005-02-26 Thread Keith Sader
I'm trying to experiment with declarative exceptions. When I add a global handler that deals with java.lang.Exception, I get redirected to my global error page as I expect. However, when I add an action specific handler, I still get directed to the global page instead of to the action specific pa

Re: Displaying exceptions from declarative exception handling

2004-12-29 Thread Brandon Goodin
source bundle (application.properties) > 3) Add the declarative exception handling in my action mapping, like bellow: >type="com.foo.bar.UserRegistrationAction" > name="userRegistrationForm" > input="/userReg

Re: Displaying exceptions from declarative exception handling

2004-12-29 Thread Daniel H. F. e Silva
Hey Brandon, That's a weird report. I never had problems doing so with Struts 1.1. What i do is: 1) In my exception jsp page, i use tag. 2) Add an entry to the resource bundle (application.properties) 3) Add the declarative exception handling in my action mapping, like b

Displaying exceptions from declarative exception handling

2004-12-28 Thread Brandon Goodin
I am trying to display an exception caught by the Struts declarative exception handling. I have tried to use the html:errors and html;messages tags with no sucess. Does anyone have a sample they can post on how to extract the exceptions that are being stored in the ActionErrors? Brandon

Re: Declarative Exception handling question

2004-07-13 Thread Hubert Rabago
Just to clarify for archive searchers. The and work with declarative programming. These tags were introduced to provide the programmer more control over the formatting of the messages, compared to what provide. For example, require HTML tags to be present in the message itself in the applica

Re: Declarative Exception handling question

2004-07-13 Thread Erik Weber
Thanks Hubert. If you see my last post, you'll see that I solved the problem without having to write any Java code -- I did it all declaratively and with tags. Nowhere in my code do I create ActionMessages instances -- I am trying to let Struts do this for me, and stick with declarative program

Re: Declarative Exception handling question

2004-07-13 Thread Erik Weber
OK I solved the problem. The problem was that the html:errors tag that is pulling messages from the default bundle apparently renders errors.header and error.footer if *any* error message is stored as a request attribute, no matter what bundle that error message might come from. This seems wron

Re: Declarative Exception handling question

2004-07-13 Thread Hubert Rabago
For validation errors, do the usual, using the saveErrors to pass them to the JSP: // validation error ActionMessages actionMessages = new ActionMessages(); actionMessages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("illegal.username", username)); saveErrors(request, actionMessages)

Re: Declarative Exception handling question

2004-07-13 Thread Erik Weber
Well, this didn't work, the header and footer from the default bundle are rendered even though there are no form validation errors, despite that the displayed error message is from the other bundle! Perhaps the errors.header and errors.footer are "inherited" from the default bundle if they are

Re: Declarative Exception handling question

2004-07-13 Thread Erik Weber
Seemingly a simple way to accomplish this would be to put the form validation error messages into one properties file, and to define errors.header and errors.footer for that file, and to put the non-form validation error messages into a different properties file, and to *not* define errors.head

Declarative Exception handling question

2004-07-13 Thread Erik Weber
I am using the Validator plugin to do my form validation, and so with the tag placed at the top of my content area, the form validation messages are presented, with the header and footer defined by errors.header and errors.footer. In the traditional manner, the form validation output looks som

Declarative Exception Handling

2004-07-13 Thread Ashutosh Satyam
Hi All, If I'm going by the Declarative Exception handling approach, either by configuring in the struts-config.xml file or by using the exception element of , how do I replace parameter values for the key pointing to the message resource property

RE: Declarative Exception handling

2004-05-13 Thread Ashutosh Satyam
That was a nice piece of information. Thanks a lot Mat. Regards, Ashutosh -Original Message- From: Lowery, Mat [mailto:[EMAIL PROTECTED] Sent: Thursday, May 13, 2004 9:19 PM To: Ashutosh Satyam; Struts Users Mailing List Subject: RE: Declarative Exception handling I use the Log Jakarta

RE: Declarative Exception handling

2004-05-13 Thread Lowery, Mat
I use the Log Jakarta Taglib in my error page like so: http://jakarta.apache.org/taglibs/doc/log-doc/intro.html -Original Message- From: Ashutosh Satyam [mailto:[EMAIL PROTECTED] Sent: Thursday, May 13, 2004 6:39 AM To: Struts Users Mailing List Subject: Declarative Exception

Declarative Exception handling

2004-05-13 Thread Ashutosh Satyam
Hi, In my struts configuration file, I have declared a global exception as mentioned below. I'm using the default ExceptionHandler. The idea behind defining this global exception was not to show any kind of exception on the browser. This works fine. But now I'm not able to trac

Declarative Exception handling in JSP's

2004-04-24 Thread Jim Kennedy
I have the struts declarative exception handling system working fine. However, it does not seem to catch JSPExceptions that occur in JSP's (i.e. org.apache.jasper.JasperException). I there a way to do this other than the built-in java spec way using isErrorPage="true" page directiv