消息页面 - lonesafe/roubsite GitHub Wiki
RSAction中提供了内置消息页面的接口,消息页面分为两种: 1、错误页面 2、提示页面 这两种类型的页面可以在config.properties中自定义,对应的配置项为errorPage、successPage。如不定义这两个参数,程序会使用默认的错误页面和提示页面。 用户可以在Action类中使用以下方法分别输出对应的页面 注意:error方法对应的错误码为http状态码如:404、500、403等等
/**
* 输出错误页面(在config.properties中定义errorPage的值)
*
* @param errorCode 错误码
* @param message 错误信息
* @param jumpUrl 跳转链接
* @param isAjax 是否ajax
* @param waitSecond 跳转时间
* @throws IOException
*/
public void error(int errorCode, String message, String jumpUrl, boolean isAjax, int waitSecond)
/**
* 输出错误页面(在config.properties中定义errorPage的值)
*
* @param errorCode 错误码
* @param message 错误信息
* @throws IOException
*/
public void error(int errorCode, String message)
/**
* 输出错误页面(在config.properties中定义errorPage的值)
*
* @param message 错误信息
* @throws IOException
*/
public void error(Message message)
/**
* 输出消息页面(在config.properties中定义successPage的值)
*
* @param message 提示信息
* @param jumpUrl 页面跳转地址
* @param isAjax 是否为Ajax方式
* @param waitSecond 跳转时间
* @throws IOException
*/
public void success(String message, String jumpUrl, boolean isAjax, int waitSecond)
/**
* 输出消息页面(在config.properties中定义successPage的值)
*
* @param message 提示
* @throws IOException
*/
public void success(String message)
/**
* 输出消息页面(在config.properties中定义successPage的值)
*
* @param message Message
* @throws IOException
*/
public void success(Message message)