tapestry 异常页面配置

<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" >
<head>
    <title>Error</title>
</head>
    <body>
        Error: ${error}
    </body>
</html>

 

package yourapp.tapestry.pages;

import org.apache.tapestry.services.ExceptionReporter;

public class ExceptionReport implements ExceptionReporter
{
    private String error;

    public void reportException(Throwable exception)
    {
        error = exception.getLocalizedMessage();
    }

    public String getError()
    {
        return error;
    }
}

 

ExceptionReport.java

 

 

ExceptionReport.html

 

http://wiki.apache.org/tapestry/Tapestry5ExceptionPage

你可能感兴趣的:(tapestry)