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 Exception Handling in existing application? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Exception Handling in existing application?" Watch "Exception Handling in existing application?" New topic
Author

Exception Handling in existing application?

Pravin Shirke
Ranch Hand

Joined: Apr 05, 2008
Posts: 150

Hi all,
i have an application made in struts. now i need to plugin the exception handling module into the application without using the deployment descriptor. (i.e) No declarative exception handling. now i need to create a exception handling in such a way that its effects is minimal (less code change in the existing application). how to i proceed further? any ideas...

[Vipassana] - It is seeing the reality as it is, And not as you want it to be.!!!
SCJP1.5.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You don't say what you want to *do* with exceptions, so it's hard to help. Nor do I understand why you can't use declarative exception handling. Or if there's already any declarative exception handling in place. So it's hard to help, but my first thought would be to use a filter.
Pravin Shirke
Ranch Hand

Joined: Apr 05, 2008
Posts: 150

Hi David,
thanks for the reply.

actually what i want to do is, whenever an exception has occurred in my application(i mean anywhere and of anytype it can be of checked or unchecked type) i need to show the user the custom message. say "due to some problem the request cannot be processed and please try again." and internally i want to log the stack trace to the log file. wherein it will log the actual exception caught and at what position like line number etc. which will be helpful in debugging.



David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Same answer.
Pravin Shirke
Ranch Hand

Joined: Apr 05, 2008
Posts: 150

Hi David,
thats what i am asking how should i proceed in achieving the same. any pointers for same will do.

thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception Handling in existing application?