Nope, perfectly okay.
One other thing you might want to know: if your JSPs
use an error page, your servlet will have to set the
request attribute javax.servlet.jsp.jspException in
your doPost(), like this:
try
{
// useful stuff here
}
catch (Exception e)
{
servletContext.log(e.getMessage(), e);
request.setAttribute("javax.servlet.jsp.jspException",
e);
forwardTo = "/error.jsp";
RequestDispatcher rd =
request.getRequestDispatcher(forwardTo);
rd.forward(request, response);
}
I'm glad you found a solution to your problem. - MOD
--- Lee W <[EMAIL PROTECTED]> wrote:
> Michael Duffy wrote:
>
> > Hi Lee,
> >
> > Do you have <error-page> tags in your web.xml?
> You
> > can tell Tomcat to send 404 errors to a JSP of
> your
> > choosing by adding something like this to web.xml,
> > after <welcome-file-list> and before <taglib>:
> >
> > <error-page>
> > <error-code>404</error-code>
> > <location>/not-found.jsp</location>
> > </error-page>
> >
> > Put your custom message in not-found.jsp.
> >
> > HTH - MOD
> >
> >
>
> Hi Michael,
>
> Yep I have got that stuff in web.xml. I think I've
> figured out what the
> problem is although I am not sure if it is the best
> way to have done it.
>
> When I was specifying the setStatus tag I was only
> using the variable
> name not the fully quantified package so therefore
> when I changed it to:
>
> response.setStatus(
>
>
javax.servlet.http.HttpServletResponseWrapper.SC_NOT_FOUND);
>
> The page appears to work fine in both IE & Mozilla.
>
> Do you think to is any OK was to have done it or
> could it cause problems ?
>
> Regards
>
> Lee
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]