I need to dispaly error page when IOException in thrown. How to do that with web.xml error-page tag?
start.jsf
public String doButton1Action() throws IOException{
String value = getText1().getValue().toString();
try {
File f = new File(value);
InputStream in = new FileInputStream(f);
...
} catch (IOException e) {
throw new IOException();
}
return "success";
}
I have this in web.xml:
<error-page>
<exception-type>java.io.IOException</exception-type>
<location>/ioerror.jsp</location>
</error-page>