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?
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?
What do you want in the parameters ?
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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....?)
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.
create your custom Exceptions and give them a message.
Then you call getMessage on the exception thrown, describing the possible solution.