This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes How to Detect a File not Found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How to Detect a File not Found" Watch "How to Detect a File not Found" New topic
Author

How to Detect a File not Found

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1393
My following code displays the PDF sent to it but I need to know how to make it work when there is no PDF file found. The code as it is now generates an error:

SRVE0068E: Could not invoke the service() method on servlet /NoPDFfileExists.jsp. Exception thrown : java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained

 
jQuery in Action, 2nd edition
 
subject: How to Detect a File not Found
 
Similar Threads
File is Not Displaying
Checking for none existing Attribute
Open File in New Browse Window
Write an Image From Servlet
Scope of Session Attributes