[jboss-user] [JBoss Seam] - problem with @Redirect
X490812
do-not-reply at jboss.com
Fri Nov 2 18:43:19 EDT 2007
here is my custom exception
| @ApplicationException
| @Redirect(viewId="genericErrorPage.xhtml")
| public class FraudException extends Exception {
| public FraudException(){}
| }
|
here is my genericErrorPage.xhtml
| .
| .
| .
| <body>
| <h:messages
| globalOnly="true"
| styleClass="message"
| id="globalMessages" />
| </body>
|
| </html>
|
here is where I throw it:
| private void doQry(String qry) throws FraudException {
| Connection con = null;
| Statement st = null;
|
| try {
| con = ds.getConnection();
| st = con.createStatement();
| ResultSet rs = st.executeQuery(qry);
| caseList.clear();
| while (rs.next()) {
| caseList.add(new Tblcase(rs.getObject(1), rs.getObject(2), rs
| .getObject(3), rs.getObject(4), rs.getObject(5), rs
| .getObject(6), rs.getObject(7), rs.getObject(8), rs
| .getObject(9), rs.getObject(10), rs.getObject(11), rs
| .getObject(12)));
| }
| } catch (Exception e) {
| e.printStackTrace();
| log.error("ERROR: " + e.getMessage());
| facesMessages.add("ERROR RENDERING DATA: " + e.getMessage());
| throw new FraudException();
| } finally {
| try {
| con.close();
| st.close();
| } catch (Exception e) {
| e.printStackTrace();
| log.error("ERROR: " + e.getMessage());
| facesMessages.add("ERROR CLOSING CONNECTIONS: " + e.getMessage());
| throw new FraudException();
| }
| }
|
Why does the SEAM.debug (or facelets.debug - not sure which) come up when I deliberately force an exception instead of my genericErrorPage.xhtml?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4101487#4101487
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4101487
More information about the jboss-user
mailing list