Link to home
Start Free TrialLog in
Avatar of aquasw
aquasw

asked on

creating jsp error page

I want to create an error jsp page with parameters that will be passed on to it.

I want to be able to call it from any file - jsp,java,servlet...
meaning - anytime I get an exception - I want to be able to through some exception with defined attributes and to show the error page with those attributes.

what's to best way to implement it?
Avatar of matthew016
matthew016
Flag of Belgium image

What do you want in the parameters ?
Avatar of aquasw
aquasw

ASKER

according to the error I throw, I want to pass on my description, a possible solution to the error and also the exception stack.
ASKER CERTIFIED SOLUTION
Avatar of TimYates
TimYates
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aquasw

ASKER

the link describes the error page. and I can set it up as a default error page.
that I know how to do.

how do I call this error-page intentionally and throw my exception. (forward,resubmit....?)
 
If you throw your exception the error page will show up, and,
create your custom Exceptions and give them a message.
Then you call getMessage on the exception thrown, describing the possible solution.