Re: Exception handling in struts

2004-03-25 Thread Tate Austin
<[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Thursday, March 25, 2004 10:04 AM Subject: Re: Exception handling in struts > Didn't someone already answer this for you? Maybe we need to be more > explicit. Try this: > > >

Re: Exception handling in struts

2004-03-25 Thread Nick Wesselman
Didn't someone already answer this for you? Maybe we need to be more explicit. Try this: key="uncaught_exception" type="java.lang.Exception" path="/jsp/error.jsp" handler="com.graysail.pgbadmecs.exceptions.ExceptionCatcher" scope="request"/> "Exception" needs to be upper case. If y

Re: Exception handling in struts

2004-03-23 Thread Nick Wesselman
And I bet ExceptionCatcher needs the same treatment. Larry Meadors wrote: type="java.lang.exception" There is not such class. Think big "E" instead... Larry [EMAIL PROTECTED] 03/23/04 9:10 AM >>> I'm trying to write an exception handler in my struts-config to clean up my applicati

Re: Exception handling in struts

2004-03-23 Thread Larry Meadors
type="java.lang.exception" There is not such class. Think big "E" instead... Larry >>> [EMAIL PROTECTED] 03/23/04 9:10 AM >>> I'm trying to write an exception handler in my struts-config to clean up my application's exception behavior. Well, I've followed the directions in the docs to a T, I h

Re: Exception Handling

2004-01-13 Thread Henrique VIECILI
Hi, i figured out the answer! i changed the scope in the global exceptions declaration to session instead of request. sometimes some atributes in request scope simply disapear, *weird* Henrique - Original Message - From: "Henrique VIECILI" <[EMAIL PROTECTED]> To: "Struts Users Mailing L

RE: Exception handling in struts

2004-01-11 Thread Mike Duffy
004 10:32 AM > > To: Struts Users Mailing List; [EMAIL PROTECTED]; > > [EMAIL PROTECTED] > > Subject: Re: Exception handling in struts > > > > > > Robert > > Attempting to link to the first link.. > > > > ht://Dig error > > htsearch dete

Re: Exception handling in struts

2004-01-11 Thread Martin Gainty
Thanks Robert your suggestion worked Any idea on what a "dig error" is? Thanks again, -Martin - Original Message - From: "Robert Taylor" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Sunday, January 11, 2004 11:36 AM

RE: Exception handling in struts

2004-01-11 Thread Robert Taylor
truts Users Mailing List; [EMAIL PROTECTED]; > [EMAIL PROTECTED] > Subject: Re: Exception handling in struts > > > Robert > Attempting to link to the first link.. > > ht://Dig error > htsearch detected an error. Please report this to the webmaster of this > site. The e

Re: Exception handling in struts

2004-01-11 Thread Martin Gainty
o: "Struts Users Mailing List" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, January 11, 2004 8:45 AM Subject: RE: Exception handling in struts > http://www.mail-archive.com/cgi-bin/htsearch?config=struts-user_jakarta_apac > he_org&restrict=&exclude=&

RE: Exception handling in struts

2004-01-11 Thread Robert Taylor
http://www.mail-archive.com/cgi-bin/htsearch?config=struts-user_jakarta_apac he_org&restrict=&exclude=&words=handle+exceptions http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=Struts+Exception+Hand ling robert > -Original Message- > From: vasudevrao gupta [mailto:[EMAIL PROTECTED]

RE: Exception Handling in Action objects

2003-11-03 Thread chinmay . r . parikh
rPage") default: Unknown error page; -Original Message- From: Hubert Rabago [mailto:[EMAIL PROTECTED] Sent: 03 November 2003 18:10 To: Struts Users Mailing List Subject: RE: Exception Handling in Action objects I'm just trying to get other ideas for exception handling, spec

RE: Exception Handling in Action objects

2003-11-03 Thread Hubert Rabago
I'm just trying to get other ideas for exception handling, specifically within Struts Action objects. I'm working on two different projects at the moment, both of which handle exceptions differently, and I'm wondering if one is better than the other and if I should propose changes for improvement

RE: Exception Handling in Action objects

2003-11-03 Thread David Friedman
Hubert, In struts v1.1 and newer, you can setup local exception handlers for an action such as: ... ... You sound like you're worried about a phenomenal number of exceptions. It sounds a little like overkill for exceptions. Regards, David -Original Message- From: Hubert Rabago [m

Re: Exception handling 100% declarative

2003-10-29 Thread Tim T. Young
Sounds like you need to add a custom handler like so: Your "EJBCreateHandler" class would extend from ExceptionHandler and override execute. In there you can then create the custom parameterized messages you want. In the execute method of a ExeceptionHandler you have references to the

Re: Exception handling - please help!

2003-10-29 Thread Bard A. Evjen
Ok, thanks, I'll give it my best shot. Cheers, Bard "Mark Lowe" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Its not the best way, but a reasonable and simple way of dealing with > this stuff is to use a try/catch statement in you action servlet. > > try { > > //your code that do

Re: Exception handling - please help!

2003-10-29 Thread Mark Lowe
Its not the best way, but a reasonable and simple way of dealing with this stuff is to use a try/catch statement in you action servlet. try { //your code that does the search stuff bla bla return (mapping.findForward("success")); } catch (WhatEverExceptionYouWantToThrow e) { //print expe

Re: Exception handling - please help!

2003-10-29 Thread Bard A. Evjen
Thanks for your reply, but public SearchTradesAction extends Action throws Exception does not work. My problem is that I am not really a java programmer and I have found the documentation on this subject to be somewhat "sucky?". Do I need to use an ActionExceptionHandler or is it another way of d

Re: Exception handling - please help!

2003-10-28 Thread Pratik Patel
=?iso-8859-1?B?QuVyZCBBcnZlIEV2amVu ?= wrote: Hi, I'm trying hard not to rip out hair from my scalp. I cannot get the exception handling in struts to work. What am I doing wrong? Please help me before I go insane... You are actually handling the exception in your Action class. You have to pass th

Re: Exception handling in struts

2003-09-23 Thread Andrew Kuzmin
http://jakarta.apache.org/struts/userGuide/building_controller.html";> 4.5 Exception Handler You can define an ExceptionHandler to execute when an Action's execute method throws an Exception. First, you need to subclass org.apache.struts.action.ExceptionHandler and override the execute method. Yo

Re: exception handling

2003-07-13 Thread Yann Cébron
Nathan, have a look at your container's (context-)logfile, you should be able to find the detailed exception in there. HTH, Yann > Hi, > > I'm using tiles to manage my layouts, one of the sections of a page is > throwing an exception: > > [ServletException in:/log4j/Loggers_body.jsp] > org

Re: Exception handling question

2003-06-05 Thread Bradley M. Handy
Here are the request scope attributes you need to worry about (page 64 of the Servlet 2.3 spec): javax.servlet.error.status_code java.lang.Integer javax.servlet.error.exception_type java.lang.Class javax.servlet.error.message java.lang.String javax.servlet.error.exception java.

Re: Exception handling question

2003-06-05 Thread David Graham
How do you get access to the exception that was thrown when your action is called by the container (i.e. from the error-page directive in web.xml)? for example: a custom tag throws an exception, it is caught by the container and the container forwards to my action. so where is the exception ob

Re: Exception handling question

2003-06-04 Thread p
Ideally I would like to log all exceptions that occur, and I can create an ExceptionHandler to do this, but it will only catch exceptions that get thrown from within one of my Actions, anything thrown from JSP pages or custom tags won't get caught. (right?) How do most people deal with this? I

RE: Exception handling question

2003-06-04 Thread Mark Galbreath
I give any user that causes an exception an electric shock. -Original Message- From: p [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 3:46 PM To: [EMAIL PROTECTED] Subject: Exception handling question Ideally I would like to log all exceptions that occur, and I can create an Ex

Re: Exception handling question

2003-06-04 Thread David Graham
Ideally I would like to log all exceptions that occur, and I can create an ExceptionHandler to do this, but it will only catch exceptions that get thrown from within one of my Actions, anything thrown from JSP pages or custom tags won't get caught. (right?) How do most people deal with this? I

RE: Exception handling - DispatchAction

2003-01-23 Thread Karr, David
Assuming you're using the "execute" method instead of the "perform" method, you can technically avoid having a try/catch block at all (because "execute" throws "Exception"). You would then define an "exception" element in your struts-config that specifies how to handle exceptions of that type (or

Re: exception handling in actionForm validate method

2003-01-21 Thread Giri Alwar
> > In the validate method of my actionForm I am using the Jakarta regular > > expression api to validate user input. > > > > In the method I use a try catch block when creating a RE (regular expression > > pattern) object. In the event an exception is thrown the catch block will > > catch the exce

Re: exception handling in actionForm validate method

2003-01-21 Thread Ben Starr
> In the validate method of my actionForm I am using the Jakarta regular > expression api to validate user input. > > In the method I use a try catch block when creating a RE (regular expression > pattern) object. In the event an exception is thrown the catch block will > catch the exception-- but

Re: Exception Handling with Struts 1.02

2002-11-14 Thread Marcus Biel
Works fine! Thanks! marcus [EMAIL PROTECTED] schrieb: > > 2002. november 14. 10:02 dátummal Marcus Biel ezt írtad: > > > return mapping.getInput(); didn't work - it gives back a String, > > but my Action class needs to return an ActionForward. (Struts 1.02). > > So I tried it that way: > > retu

Re: Exception Handling with Struts 1.02

2002-11-14 Thread Gemes Tibor
2002. november 14. 10:02 dátummal Marcus Biel ezt írtad: > return mapping.getInput(); didn't work - it gives back a String, > but my Action class needs to return an ActionForward. (Struts 1.02). > So I tried it that way: > return mapping.findForward(mapping.getInput() ); return new ActionForward(

Re: [EXCEPTION HANDLING] Handing bean errors in Action class (perStruts Users Guide)

2002-09-11 Thread Eddie Bush
Charlie Toohey wrote: >The Struts User's Guide advocates the following (section 4.2), with respect >to how exceptions/errors in beans called by Action classes should be handled >by the Action class : > >"The beans that represent the Model of your system may throw exceptions due >to problems ac

RE: Exception Handling

2002-08-19 Thread Jason Rosen
If you are looking to catch the session timeout, then you could implement HttpSessionBindingListener and wrap your session in it. When the session expires, the HttpSessionBindingListener can execute some code. For example, if you need to log a user out of a database or other network resource whe

RE: Exception Handling - Chapter 10

2002-06-05 Thread Galbreath, Mark
Constructors don't return coconuts. -Original Message- From: Nelson, Laird [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 2:26 PM To: 'Struts Users Mailing List' Subject: RE: Exception Handling - Chapter 10 > From: Galbreath, Mark [mailto:[EMAIL PROTEC

RE: Exception Handling - Chapter 10

2002-06-05 Thread James Mitchell
ne 05, 2002 2:26 PM > To: 'Struts Users Mailing List' > Subject: RE: Exception Handling - Chapter 10 > > > > From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] > > What's the purpose of the single-argument constructor in > > Example 10-1 on > > page 8

RE: Exception Handling - Chapter 10

2002-06-05 Thread chuckcavaness
Mark, I don't have chapter 10 in front of me and I'm too lazy to go and download it, but if my memory is correct, that's the exception chaining example. The constructor should take a Throwable, which is the root cause of the exception. So the constructor just allows a new exception to be

RE: Exception Handling - Chapter 10

2002-06-05 Thread Nelson, Laird
> From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] > What's the purpose of the single-argument constructor in > Example 10-1 on > page 8? How do you mean: African or European? Cheers, Laird -- To unsubscribe, e-mail: For additional commands, e-mail:

RE: Exception Handling - Chapter 10

2002-06-05 Thread Galbreath, Mark
Hey Chuck, What's the purpose of the single-argument constructor in Example 10-1 on page 8? Mark -- To unsubscribe, e-mail: For additional commands, e-mail:

RE: Exception handling by radhika

2002-04-28 Thread Vikram Goyal01
Hi Radhika, What is it that you want to do? Exception handling in Struts is no different from normal exception handling, so I am not quite sure what you want to do. Rgs Vikram -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 27, 2002 6:23 PM

Re: Exception handling by radhika

2002-04-28 Thread Chuck Cavaness
I'm not sure of your reasons for not wanting to ActionErrors or ActionMessages, but that is only a fraction of what might be considered the exception handling framework in Struts. The Exception Handling Chapter is one of the chapters that many have asked me about and I'm working hard to get th

RE: exception handling in business beans

2002-04-11 Thread Sandeep Takhar
this? > > -- Larry Maturo >[EMAIL PROTECTED] > > > -Original Message- > From: Jerome Josephraj [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 09, 2002 10:07 AM > To: Struts Users Mailing List > Subject: RE: exception handling in business beans > > > Ad

RE: exception handling in business beans

2002-04-09 Thread Maturo, Larry
good solution for this? -- Larry Maturo [EMAIL PROTECTED] -Original Message- From: Jerome Josephraj [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 10:07 AM To: Struts Users Mailing List Subject: RE: exception handling in business beans Adolfo, We have si

RE: exception handling in business beans

2002-04-09 Thread Jerome Josephraj
Adolfo, We have similar architecture and we follow the second approach. We propagate all the exceptions from the business bean to action class and log it in there (infact in ActionClass facade which delegates all the requests to appropriate action classes). By doing this way any ch

Re: Exception handling best-practise

2002-02-22 Thread Jonathan Fuerth
On Fri, Feb 22, 2002 at 04:58:28AM -0500, Ted Husted wrote: > IMHO, the messages and the messages keys belong to the model. The > controller is simply transferring this data to the view, as it does with > everything else, like records from a database. Aha, that makes perfect sense to me! Thanks

Re: Exception handling best-practise

2002-02-22 Thread Ted Husted
Jonathan Fuerth wrote: > This seems to break the MVC design pattern though, because now the > controller contains information the belongs to the view (message keys) > and is making decisions that are the responsibility of the model > (handling the exceptions that the model generated). Or is it, i

Re: exception handling in struts actions

2001-07-23 Thread Ted Husted
The Action handles flow-control, and selects page displays, including error pages. Actions should be prepared to cope with whatever exceptions are thrown, either directly or with an ancestor method. See also < http://www.mail-archive.com/struts-user@jakarta.apache.org/msg09256.html > and < ht

Re: Exception handling in the ActionServlet

2001-06-12 Thread klaus . bucka-lassen
Thanks for the feedback to both of you! Subclassing the ServletException is actually what I wanted to avoid. I consider that a hack, if the new exception I'm creating doesn't have anything to do with a Servlet (a UserNotAuthorizedException for instance shouldn't have to inherit from ServletExc

RE: Exception handling in the ActionServlet

2001-06-11 Thread Howard Moore
> -Original Message- > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] > Sent: 10 June 2001 02:00 > To: [EMAIL PROTECTED] > Subject: Re: Exception handling in the ActionServlet > > > > > On Sat, 9 Jun 2001 [EMAIL PROTECTED] wrote: > > >

Re: Exception handling in the ActionServlet

2001-06-09 Thread Craig R. McClanahan
On Sat, 9 Jun 2001 [EMAIL PROTECTED] wrote: > Hi, > > I would like to catch all of our project specific exceptions in one place (as a > last resort, if nobody else catches them earlier on) and handle them in a > generic way. The obvious way to do this, I think, is by overriding > processAct

Re: exception handling

2001-03-21 Thread Incze Lajos
On Wed, Mar 21, 2001 at 02:23:38PM -0800, s l wrote: > Is there a way to catch exceptions throw > in bean's getter methods (so we don't have > to see the stack trace on web page)? > > __ > Do You Yahoo!? > Get email at your own domain with Yahoo! Ma

Re: exception handling

2001-03-21 Thread Scott Walter
You could use the JSP error handling mechanism to display a friendly message instead of the stacktrace. Within the error handling page you could log the exception to the file system or a database. Look into the page directive tag, in particular the isErrorPage and errorPage attributes. scott. -