A while ago, Yoav Shapira wrote:
> I asked if it's the "nice" IE error pages or the actual tomcat ones.  
> There's an IE setting in Internet Options along the lines of 
> "Display Friendly Error Pages" that can mask the server's error pages
> if enabled, and it's enabled by default on some platforms.

I finally got a chance to work on this again, and this is exactly the
problem.  Which makes my lovely error pages fairly useless since I can't
go around to everyone's computer and make sure they've unchecked the
box.

So... From a plain-old Servlet, when, for example, I'm retrieving text
from a database and trying to create a PDF, and there is no text, how do
I show a nice error page?

It's been a LONG time since I've done a regular Servlet.  Am I trying to
apply some Struts-type global forward idea here without realizing it?
Or is this supposed to work, except that in this case IE is "helpfully"
refusing to show my page?

What I'm currently doing:
[in PDFServlet.java]
throw new ServletException( "No data found in HOLD file" );

[in web.xml]
<error-page>
   <exception-type>javax.servlet.ServletException</exception-type>
   <location>/error.jsp</location>
</error-page>

Should I instead be doing something with RequestDispatcher and
forwarding to this JSP to avoid the status being set to 500 and
confusing IE?

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to