Re: Exception Handling in Struts 2.0.11

2009-04-27 Thread NR031
Hi Terry, My struts.xml looks like this : 405 The requested method is unsupported /JSPPages/Exception.jsp /JSPPages/LoginPage.jsp

Re: Exception Handling in Struts 2.0.11

2009-04-27 Thread Lukasz Lenart
2009/4/27 NR031 : >   I am using Struts 2.0.11 and NetBeans 6.1. Is there any way to handle > exception in Struts 2? Just define global result and put entries for given exceptions in struts.xml, like below 405 The requested method is unsupport

Re: Exception Handling in Struts 2.0.11

2009-04-27 Thread Terry Gardner
Can you be a little more clear about your ask? Using the examples in the given URL, are you asking about: 1. How to code exception.jsp? 2. How to code SQLExceptionAction.java? 3. What is on the ValueStack in these examples and an Exception occurs? 4. something else? On Apr 27, 2009, at 4:34 AM

RE: exception handling

2009-01-19 Thread doahh
the database. The point I was > trying to make was to use the PRG pattern. > > > > >> Date: Mon, 19 Jan 2009 03:27:57 -0800 >> From: ga...@prodia.co.uk >> To: user@struts.apache.org >> Subject: RE: exception handling >> >> >> I must be

RE: exception handling

2009-01-19 Thread Andy
pache.org > Subject: RE: exception handling > > > I must be misunderstanding something, is that not what I am already doing my > chaining to another action? > > > > Andy Hahn wrote: > > > > Regarding to the first responder - you could take this a step furt

RE: exception handling

2009-01-19 Thread doahh
; After Post)‏. > > > > >> Date: Sun, 18 Jan 2009 06:24:24 -0800 >> From: ga...@prodia.co.uk >> To: user@struts.apache.org >> Subject: Re: exception handling >> >> >> I know this is slightly different from the way you are trying it but this >

RE: exception handling

2009-01-18 Thread Andy
18 Jan 2009 06:24:24 -0800 > From: ga...@prodia.co.uk > To: user@struts.apache.org > Subject: Re: exception handling > > > I know this is slightly different from the way you are trying it but this is > the way I am currently doing it is: > > <global-exception-mappi

Re: exception handling

2009-01-18 Thread doahh
I know this is slightly different from the way you are trying it but this is the way I am currently doing it is:

RE: Exception Handling keeping user input

2007-12-26 Thread Jeremy JGR. Grumbach
/ExceptionMappingInterceptor.html For example, in my case, it is a global exception: Hope it helps, Jeremy -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Saturday, December 22, 2007 8:33 PM To: Struts Users Mailing List Subject: Re: Exception Handling keeping user input

Re: Exception Handling keeping user input

2007-12-22 Thread Adam Hardy
pond M-- - Original Message - From: "Adam Hardy" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Saturday, December 22, 2007 2:32 PM Subject: Re: Exception Handling keeping user input Jeremy, how do you control which result is chosen? Adam Jeremy JG

Re: Exception Handling keeping user input

2007-12-22 Thread Martin Gainty
age - From: "Adam Hardy" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Saturday, December 22, 2007 2:32 PM Subject: Re: Exception Handling keeping user input > Jeremy, > how do you control which result is chosen? > > Adam > > Jeremy JGR. Grum

Re: Exception Handling keeping user input

2007-12-22 Thread Adam Hardy
mbach [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 19, 2007 10:28 AM To: Struts Users Mailing List Subject: RE: Exception Handling keeping user input Yes I think it's more what I had in mind. My three requests were: 1) Go back to the "add" page without losing user input 2)

RE: Exception Handling keeping user input

2007-12-20 Thread Jeremy JGR. Grumbach
I will post the results of my investigation here (and I hope I will have something to post :)) Thanks! Jeremy -Original Message- From: Gary Affonso [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 19, 2007 12:06 AM To: Struts Users Mailing List Subject: Re: Exception Handling keeping

RE: Exception Handling keeping user input

2007-12-19 Thread Jeremy JGR. Grumbach
(and I hope I will have something to post :)) Thanks! Jeremy -Original Message- From: Gary Affonso [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 19, 2007 12:06 AM To: Struts Users Mailing List Subject: Re: Exception Handling keeping user input Jeremy JGR. Grumbach wrote: >

Re: Exception Handling keeping user input

2007-12-18 Thread Gary Affonso
Jeremy JGR. Grumbach wrote: Thanks also for the answer, I'm using Velocity so no problem with the null values. And yes that's a way to manage exceptions, but I as said in my previous post, I was looking for something more generic, without specific code in all my actions. If you want a generi

RE: Exception Handling keeping user input

2007-12-18 Thread Jeremy JGR. Grumbach
hing... Jeremy -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 18, 2007 11:30 AM To: Struts Users Mailing List Subject: Re: Exception Handling keeping user input I don't know how to do this but a generic solution sounds desirable (and technical

Re: Exception Handling keeping user input

2007-12-18 Thread Adam Hardy
l searching for a more generic solution during next days, and if I don't find it, I will of course use your solution or the one from Dave :) Jeremy -Original Message- From: Gary Affonso [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 18, 2007 6:42 AM To: Struts Users Mailing L

RE: Exception Handling keeping user input

2007-12-18 Thread Jeremy JGR. Grumbach
eneric solution during next days, and if I don't find it, I will of course use your solution or the one from Dave :) Jeremy -Original Message- From: Gary Affonso [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 18, 2007 6:42 AM To: Struts Users Mailing List Subject: Re: Exception H

RE: Exception Handling keeping user input

2007-12-18 Thread Jeremy JGR. Grumbach
fields still filled in because the forward was "input". Not sure to be clear but that's what I hope to be able to do in Struts 2. Jeremy -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Monday, December 17, 2007 7:17 PM To: Struts Users Mailing List Subjec

Re: Exception Handling keeping user input

2007-12-17 Thread Gary Affonso
To follow up on my previous post, here's some code from a "showForm" action that does exactly what I described... public void prepare() { if(session.get(SignUpFormBean.SESSION_KEY) == null) { // they're here for the first time. do nothing (leave the signUpFormBean model

Re: Exception Handling keeping user input

2007-12-17 Thread Gary Affonso
Jeremy JGR. Grumbach wrote: Let's take the following scenario: we have a database which manage car models (for example Dogde Viper). The column "name" of the "car model" table must be unique. The user wants to add a "car model" in the database, thus he has an "add screen" containing all the field

Re: Exception Handling keeping user input

2007-12-17 Thread Dave Newton
Sure; catch the exception in your Action, which IMO is what should happen anyway. This is a gray area of design for me; I am not convinced that this is "exceptional" behavior. That aside, business-level exceptions should (IMO, of course :) be caught by actions--*real* exceptions, like a database e

Re: Exception Handling and Logging

2007-10-12 Thread Richard Sayre
Hi Paul, I know its been a while but I am now trying to log my exceptions. Previously I was redirecting to a JSP and outputting the error. A requirement has come up where the client does not want the user seeing any stack traces etc. So I want to log the exception in the action and then redirect

Re: Exception Handling and Logging

2007-08-06 Thread Richard Sayre
In my interceptor stack i added this parameter: true I assume it is using either commons logging or log4j but I'm not sure where the log file is or how to manipulate what information goes into the log file. On 8/6/07, Dave Newton <[EMAIL PROTECTED]> wrote: > --- Richard Sayr

Re: Exception Handling and Logging

2007-08-06 Thread Dave Newton
--- Richard Sayre <[EMAIL PROTECTED]> wrote: > Do I open a file stream on the JSP page or is there a > better way to log this information? Use commons-logging and / or Log4J? d. Need a vacation? Get gr

Re: Exception Handling and Logging

2007-08-06 Thread Richard Sayre
I set up my application to throw the Exceptions back and I am using Exception mapping to redirect the user to an error page. The error page displays the exception and stack trace. How do I log this to a file instead? Do I open a file stream on the JSP page or is there a better way to log this in

Re: Exception Handling and Logging

2007-08-01 Thread Paul Benedict
My applications do not catch any errors. I let them bubble out of the Action and into an ExceptionHandler object for logging. You can log whatever you want -- including the user -- in the handler. Paul Richard Sayre wrote: After reading the Mail Reader walk through, it would seem the best pra

Re: Exception handling in Struts

2005-08-02 Thread Tremal Nailk
2005/8/1, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > Doesn't look like you are using it to me . . . ok, I didn't use the errorPage attribute in the @page directive because I'm using tiles and the error page would substitute only the errored tile if an exception is thrown, resulting in a unpleasant e

Re: Exception handling in Struts

2005-08-01 Thread erikweber
Doesn't look like you are using it to me . . . http://www.imagescript.com/atg/articles/jsp_j2ee/error_page_basics.htm Erik -Original Message- From: Tremal Nailk <[EMAIL PROTECTED]> Sent: Aug 1, 2005 12:26 PM To: Struts Users Mailing List Subject: Re: Exception handling in S

Re: Exception handling in Struts

2005-08-01 Thread Tremal Nailk
2005/8/1, Dave Newton <[EMAIL PROTECTED]>: > Probably want to use the web.xml exception stuff, then (error-page > element, maybe?) well, I'm using it (see my original posting), but the exception is not caught, simply ignored. Anyway you are right when you say that the exception should always be ca

Re: Exception handling in Struts

2005-08-01 Thread Dave Newton
Tremal Nailk wrote: 2005/8/1, Joe Germuska <[EMAIL PROTECTED]>: what's I'm doing wrong? Struts can't catch exceptions thrown by the JSP. This is one reason ok, anyway I'm looking for a way to catch all the exception thrown by may app. So throwing a dbexception was just an exa

Re: Exception handling in Struts

2005-08-01 Thread Tremal Nailk
2005/8/1, Joe Germuska <[EMAIL PROTECTED]>: > >what's I'm doing wrong? > > Struts can't catch exceptions thrown by the JSP. This is one reason ok, anyway I'm looking for a way to catch all the exception thrown by may app. So throwing a dbexception was just an example. There is always something t

Re: Exception handling in Struts

2005-08-01 Thread Joe Germuska
what's I'm doing wrong? Struts can't catch exceptions thrown by the JSP. This is one reason (among many) why I would design something like this to do the database work in an action and deliver only data to the JSP. Joe At 4:40 PM +0100 8/1/05, Tremal Nailk wrote: Hello, I'm trying to cap

RE: exception handling

2004-06-16 Thread Rajat Pandit, Gurgaon
:) lol -Original Message- From: Viral_Thakkar [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 5:12 PM To: Struts Users Mailing List Subject: RE: exception handling I just want to verify my approach from the experts. Thanks Viral -Original Message- From: Pilgrim

RE: exception handling

2004-06-16 Thread Viral_Thakkar
I just want to verify my approach from the experts. Thanks Viral -Original Message- From: Pilgrim, Peter [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 4:57 PM To: 'Struts Users Mailing List' Subject: RE: exception handling Please, really! Do you really want to us

RE: exception handling

2004-06-16 Thread Pilgrim, Peter
Please, really! Do you really want to us to design and develop your application for you? Check out Struts global exception configuration. HTH > -Original Message- > From: Viral_Thakkar [mailto:[EMAIL PROTECTED] > > Please verify the below exception handling scenario. -1 > > Struts Act

RE: Exception handling with scaffold

2004-03-31 Thread Barett McGavock
Mr. Austin, You can override the catchException method. You should put your exception handler therein. Hopefully I understood the question...! B -Original Message- From: Tate Austin [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 31, 2004 10:22 AM To: Struts Users Mailing List Subject: