<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri ="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ taglib tagdir="/WEB-INF/tags/jsfx" prefix="jsfx" %> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>用户登录</title> <!-- 公共JavaScript文件 --> <script type="text/javascript" src="../script/common/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="../script/common/jquery.alerts.js"></script> <!-- 公共CSS文件 --> <link rel="stylesheet" href="../css/common/jquery.alerts.css" type="text/css" /> </head> <body> <f:view> <%-- JSF的标签要写在<f:view>里面 --%> <h:form id="pintr001Form" > 账号: <h:inputText id="username" styleClass="" accesskey="u" value="请输入账号" ></h:inputText> <br/> 密码: <h:inputSecret id="password" styleClass="" accesskey="p" value="" ></h:inputSecret> <br/> <h:commandButton id="submit" value="提交" ></h:commandButton> </h:form> </f:view> </body> </html>
package li.kang.wang.badan.intr.pintr001.pr.form; /** PINTR001Form用于存储表单信息 */ public class PINTR001Form { /** 账号 */ private String username; /** 密码 */ private String password; /** * @return the username */ public String getUsername() { return username; } /** * @param username the username to set */ public void setUsername(String username) { this.username = username; } /** * @return the password */ public String getPassword() { return password; } /** * @param password the password to set */ public void setPassword(String password) { this.password = password; } }
<?xml version="1.0" encoding="UTF-8"?> <faces-config xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd" version="2.0"> <!-- Home --> <managed-bean> <managed-bean-name>PINTR001Form</managed-bean-name> <managed-bean-class>li.kang.wang.badan.intr.pintr001.pr.form.PINTR001Form</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> </faces-config>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri ="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ taglib tagdir="/WEB-INF/tags/jsfx" prefix="jsfx" %> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>用户登录</title> <!-- 公共JavaScript文件 --> <script type="text/javascript" src="../script/common/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="../script/common/jquery.alerts.js"></script> <!-- 公共CSS文件 --> <link rel="stylesheet" href="../css/common/jquery.alerts.css" type="text/css" /> </head> <body> <f:view> <%-- JSF的标签要写在<f:view>里面 --%> <h:form id="pintr001Form" > 账号: <h:inputText id="username" styleClass="" accesskey="u" value="#{PINTR001Form.username }" ></h:inputText> <br/> 密码: <h:inputSecret id="password" styleClass="" accesskey="p" value="#{PINTR001Form.password }" ></h:inputSecret> <br/> <h:commandButton id="submit" value="提交" ></h:commandButton> </h:form> </f:view> </body> </html>
package li.kang.wang.badan.intr.pintr001.pr.event; import li.kang.wang.badan.intr.pintr001.pr.form.PINTR001Form; /** PINTR001页面Event */ public class PINTR001Event { /* 用来保存表单数据 */ private PINTR001Form pintr001Form; /** * @return the pintr001Form */ public PINTR001Form getPintr001Form() { return pintr001Form; } /** * @param pintr001Form the pintr001Form to set */ public void setPintr001Form(PINTR001Form pintr001Form) { this.pintr001Form = pintr001Form; } /** * 登录验证 * @return */ public String checkUser() { System.out.println("checkUser:\n " + "username: " + pintr001Form.getUsername() + "\n" + "password: " + pintr001Form.getPassword()); if (pintr001Form.getUsername().equals("wkl") && pintr001Form.getPassword().equals("wkl")) { return "loginSuccess"; } return "loginError"; } }
<?xml version="1.0" encoding="UTF-8"?> <faces-config xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd" version="2.0"> <!-- Home --> <managed-bean> <managed-bean-name>PINTR001Form</managed-bean-name> <managed-bean-class>li.kang.wang.badan.intr.pintr001.pr.form.PINTR001Form</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> <managed-bean> <managed-bean-name>PINtr001Event</managed-bean-name> <managed-bean-class>li.kang.wang.badan.intr.pintr001.pr.event.PINTR001Event</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> <managed-property> <property-name>pintr001Form</property-name> <!-- 这是PINTR001Event.java中的属性 --> <property-class>li.kang.wang.badan.intr.pintr001.pr.form.PINTR001Form</property-class> <value>#{PINTR001Form}</value> <!-- 绑定了PINTR001Form的值,才能取得表单数据 --> </managed-property> </managed-bean> </faces-config>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>成功登录</title> </head> <body> rigth! </body> </html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>登录失败</title> </head> <body> error! </body> </html>
<?xml version="1.0" encoding="UTF-8"?> <faces-config xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd" version="2.0"> <!-- Home --> <managed-bean> <managed-bean-name>PINTR001Form</managed-bean-name> <managed-bean-class>li.kang.wang.badan.intr.pintr001.pr.form.PINTR001Form</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> <managed-bean> <managed-bean-name>PINtr001Event</managed-bean-name> <managed-bean-class>li.kang.wang.badan.intr.pintr001.pr.event.PINTR001Event</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> <managed-property> <property-name>pintr001Form</property-name> <!-- 这是PINTR001Event.java中的属性 --> <property-class>li.kang.wang.badan.intr.pintr001.pr.form.PINTR001Form</property-class> <value>#{PINTR001Form}</value> <!-- 绑定了PINTR001Form的值,才能取得表单数据 --> </managed-property> </managed-bean> <!-- Home --> <!-- 这里容易根据字面意思理解 --> <navigation-rule> <description>八丹Android应用主页</description> <display-name>八丹Android应用主页</display-name> <from-view-id>/INTR/PINTR001.jsp</from-view-id> <navigation-case> <from-outcome>home</from-outcome> <to-view-id>/INTR/PINTR001.jsp</to-view-id> <redirect/> <!-- 重定向, 不填的话地址栏是上一个页面的地址 --> </navigation-case> <navigation-case> <from-outcome>loginSuccess</from-outcome> <to-view-id>/INTR/PINTR002.jsp</to-view-id> <redirect/> </navigation-case> <navigation-case> <from-outcome>loginError</from-outcome> <to-view-id>/INTR/PINTR003.jsp</to-view-id> <redirect/> </navigation-case> </faces-config>
log4j在初始化的时候 会先在classpath中寻找 log4j.porperties,当找不到该文件时,会接着寻找log4j.xml
研究了一下xml配置文件的书写方式,提供一个样例,具体的可以参考 log4j.dtd
通过<logger></logger>的定义可以将各个包中的类日志输出到不同的日志文件中
以下是完整的log4j.xml :
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'> <!-- CONSOLE --> <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{yyyy/MM/dd HH:mm:ss} %-5p [%c{1}] - %m%n" /> </layout> </appender> <!-- INFO --> <appender name="INFO" class="org.apache.log4j.FileAppender"> <param name="File" value="f:/logs/badan/application.log" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{yyyy/mm/dd} %p:%r:%c:%m%n" /> </layout> </appender> <!-- ERROR --> <appender name="ERROR" class="org.apache.log4j.DailyRollingFileAppender"> <param name="Threshold" value="error" /> <param name="File" value="f:/logs/badan/error.log" /> <param name="Append" value="true" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{yyyy/MM/dd HH:mm:ss} %-5p [%c] - %m%n" /> </layout> </appender> <!-- DEBUG --> <appender name="DEBUG" class="org.apache.log4j.DailyRollingFileAppender"> <param name="Threshold" value="debug" /> <param name="File" value="f:/logs/badan/debug.log" /> <param name="Append" value="true" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{yyyy/MM/dd HH:mm:ss} %-5p [%c] - %m%n" /> </layout> </appender> <logger name="org.apache"> <level value="warn" /> <appender-ref ref="DEBUG" /> <appender-ref ref="INFO" /> <appender-ref ref="ERROR" /> </logger> <logger name="java.sql"> <level value="warn" /> <appender-ref ref="CONSOLE" /> <appender-ref ref="DEBUG" /> <appender-ref ref="INFO" /> <appender-ref ref="ERROR" /> </logger> <logger name="li.kang.wang.badan"> <level value="debug" /> <appender-ref ref="CONSOLE" /> <appender-ref ref="DEBUG" /> <appender-ref ref="INFO" /> <appender-ref ref="ERROR" /> </logger> </log4j:configuration>
package li.kang.wang.badan.intr.pintr001.pr.event; import li.kang.wang.badan.intr.pintr001.pr.form.PINTR001Form; import org.apache.log4j.Logger; /** PINTR001页面Event */ public class PINTR001Event { private static Logger log = Logger.getLogger(PINTR001Event.class.getName()); private PINTR001Form pintr001Form; /** * @return the pintr001Form */ public PINTR001Form getPintr001Form() { return pintr001Form; } /** * @param pintr001Form * the pintr001Form to set */ public void setPintr001Form(PINTR001Form pintr001Form) { this.pintr001Form = pintr001Form; } /** * 登录验证 * * @return */ public String checkUser() { log.debug("checkUser:\n" + "username: " + pintr001Form.getUsername() + "\n" + "password: " + pintr001Form.getPassword()); if (pintr001Form.getUsername().equals("wkl") && pintr001Form.getPassword().equals("wkl")) { return "loginSuccess"; } return "loginError"; } }
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-config-2.dtd"> <!-- Always ensure to use the correct XML header as above! --> <sqlMapConfig> <!-- The properties (name=value) in the file specified here can be used placeholders in this config file (e.g. “${driver}”. The file is usually relative to the classpath and is optional. --> <properties resource="ibatis/resources/SqlMapConfig.properties" /> <!-- These settings control SqlMap configuration details, primarily to do with transaction management. They are all optional (see the Developer Guide for more). --> <settings cacheModelsEnabled="true" enhancementEnabled="true" lazyLoadingEnabled="true" maxRequests="32" maxSessions="10" maxTransactions="5" useStatementNamespaces="true" /> <!-- Configure a datasource to use with this SQL Map using SimpleDataSource. Notice the use of the properties from the above resource --> <transactionManager type="JDBC" > <dataSource type="SIMPLE" > <property name="JDBC.Driver" value="${driver}" /> <property name="JDBC.ConnectionURL" value="${url}" /> <property name="JDBC.Username" value="${username}" /> <property name="JDBC.Password" value="${password}" /> <property name="JDBC.DefaultAutoCommit" value="#{defaultautocommit}" /> </dataSource> </transactionManager> <!-- Identify all SQL Map XML files to be loaded by this SQL map. Notice the paths are relative to the classpath. --> <!-- 稍后添加 --> <sqlMap resource="/li/kang/wang/badan/intr/pintr001/db/sql/PINTR001SqlMap.xml" /> </sqlMapConfig>
# This is just a simple properties file that simplifies automated configuration # of the SQL Maps configuration file (e.g. by Ant builds or continuous # integration tools for different environments\u2026 etc.) # These values can be used in any property value in the file above (e.g. \u201c${driver}\u201d) # Using a properties file such as this is completely optional. driver=com.mysql.jdbc.Driver url=jdbc:mysql://192.168.1.116:3306/badan username=wkl password=wkl defaultautocommit=false
package li.kang.wang.badan.common; import java.io.IOException; import java.io.Reader; import java.nio.charset.Charset; import org.apache.log4j.Logger; import com.ibatis.common.resources.Resources; import com.ibatis.sqlmap.client.SqlMapClient; import com.ibatis.sqlmap.client.SqlMapClientBuilder; /** * 系统公共SqlMap配置 */ public class SqlConfig { /** sqlMap instance */ private static SqlMapClient sqlMap; /** Log */ private static Logger log = Logger.getLogger(SqlConfig.class.getName()); /** 静态代码块优先执行 */ static { Reader reader = null; try { String resource = "ibatis/resources/SqlMapConfig.xml"; Resources.setCharset(Charset.forName("UTF-8")); reader = Resources.getResourceAsReader(resource); sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader); } catch (Exception e) { log.error("SqlMapConfig.xml连接异常"); log.error(e); } finally { if (reader != null) { try { reader.close(); } catch (IOException e) { log.error("SqlMapConfig.xml连接异常"); log.error(e); } } } } /** * SqlMap实例取得 * @return SqlMapClient */ public static SqlMapClient getSqlMapInstance() { return sqlMap; } }
-- ---------------------------- -- Table structure for `user` -- ---------------------------- DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` int(20) NOT NULL auto_increment, `username` varchar(50) NOT NULL, `password` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of user -- ---------------------------- INSERT INTO `user` VALUES ('1', 'wkl', 'wkl'); INSERT INTO `user` VALUES ('2', 'ok', 'ok');
package li.kang.wang.badan.intr.pintr001.db.dto; import java.io.Serializable; /** 数据库表绑定Java Bean */ public class UserInfo implements Serializable{ /** * serialVersionUID */ private static final long serialVersionUID = 1646885493639314417L; /** 账号 */ private String username; /** 密码 */ private String password; /** * @return the username */ public String getUsername() { return username; } /** * @param username the username to set */ public void setUsername(String username) { this.username = username; } /** * @return the password */ public String getPassword() { return password; } /** * @param password the password to set */ public void setPassword(String password) { this.password = password; } }
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <sqlMap namespace="PINTR001" > <resultMap id="ResultMap01" class="li.kang.wang.badan.intr.pintr001.db.dto.UserInfo" > <!-- 绑定DTO JavaBean --> <result column="username" javaType="string" jdbcType="VARCHAR" property="username" /> <result column="password" javaType="string" jdbcType="VARCHAR" property="password" /> </resultMap> <!-- 选择用户信息 --> <select id="getUserInfo" parameterClass="li.kang.wang.badan.intr.pintr001.db.dto.UserInfo" resultMap="ResultMap01" > SELECT username, password FROM user WHERE username = #username:VARCHAR# AND password = #password:VARCHAR# </select> </sqlMap>
package li.kang.wang.badan.intr.pintr001.pr.event; import li.kang.wang.badan.intr.pintr001.ap.data.ContextData; import li.kang.wang.badan.intr.pintr001.ap.logicbean.ISelectLogicBean; import li.kang.wang.badan.intr.pintr001.pr.form.PINTR001Form; import org.apache.log4j.Logger; /** PINTR001页面Event */ public class PINTR001Event { private static Logger log = Logger.getLogger(PINTR001Event.class.getName()); private PINTR001Form pintr001Form; // 通过接口, 可以从faces-config.xml指定pintr001SelectLogicBean对应某个实际的值(实现类) private ISelectLogicBean pintr001SelectLogicBean; /** * @return the pintr001Form */ public PINTR001Form getPintr001Form() { return pintr001Form; } /** * @param pintr001Form * the pintr001Form to set */ public void setPintr001Form(PINTR001Form pintr001Form) { this.pintr001Form = pintr001Form; } /** * @return the pintr001SelectLogicBean */ public ISelectLogicBean getPintr001SelectLogicBean() { return pintr001SelectLogicBean; } /** * @param pintr001SelectLogicBean the pintr001SelectLogicBean to set */ public void setPintr001SelectLogicBean(ISelectLogicBean pintr001SelectLogicBean) { this.pintr001SelectLogicBean = pintr001SelectLogicBean; } /** * 登录验证 * * @return */ public String checkUser() { ContextData contextData = new ContextData(); log.debug("checkUser:\n" + "username: " + pintr001Form.getUsername() + "\n" + "password: " + pintr001Form.getPassword()); // 通过LogicBean查询数据库 contextData.setUsername(pintr001Form.getUsername()); contextData.setPassword(pintr001Form.getPassword()); if(pintr001SelectLogicBean.checkUserInfo(contextData)){ return "loginSuccess"; } return "loginError"; } }
package li.kang.wang.badan.intr.pintr001.ap.data; import java.util.List; /** 保存数据库查询结果 */ public class SelectResultData { /** 查询结果List */ private List<ListContextData> list; /** * @return the list */ public List<ListContextData> getList() { return list; } /** * @param list the list to set */ public void setList(List<ListContextData> list) { this.list = list; } }
package li.kang.wang.badan.intr.pintr001.ap.data; /** 用于存储多条记录常用表格显示,如用户一览 */ public class ListContextData { /** ID */ private int userId; /** 账号 */ private String username; /** 密码 */ private String password; /** * @return the userId */ public int getUserId() { return userId; } /** * @param userId the userId to set */ public void setUserId(int userId) { this.userId = userId; } /** * @return the username */ public String getUsername() { return username; } /** * @param username the username to set */ public void setUsername(String username) { this.username = username; } /** * @return the password */ public String getPassword() { return password; } /** * @param password the password to set */ public void setPassword(String password) { this.password = password; } }
package li.kang.wang.badan.intr.pintr001.ap.logicbean; import li.kang.wang.badan.intr.pintr001.ap.data.ContextData; import li.kang.wang.badan.intr.pintr001.ap.data.SelectResultData; /** ISelectLogicBean接口 */ public interface ISelectLogicBean { /** * 查询用户信息 */ public SelectResultData getUserList(); /** * 验证用户信息 */ public boolean checkUserInfo(ContextData contextData); }
package li.kang.wang.badan.intr.pintr001.ap.logicbean;
import li.kang.wang.badan.common.SqlConfig;
import li.kang.wang.badan.intr.pintr001.ap.data.ContextData;
import li.kang.wang.badan.intr.pintr001.ap.data.SelectResultData;
import li.kang.wang.badan.intr.pintr001.db.dto.UserInfo;
import org.apache.log4j.Logger;
import com.ibatis.sqlmap.client.SqlMapClient;
/** SelectLogicBean实现类 */
public class SelectLogicBean implements ISelectLogicBean {
private static Logger log = Logger.getLogger(SelectLogicBean.class
.getName());
@Override
/**
* 查询用户信息
*/
public SelectResultData getUserList() {
return null;
}
@Override
/**
* 验证用户信息
*/
public boolean checkUserInfo(ContextData contextData) {
/** 取得sqlMap实例 */
SqlMapClient sqlMap = SqlConfig.getSqlMapInstance();
try {
// 事务开始
sqlMap.startTransaction();
//
UserInfo userInfo = new UserInfo();
userInfo.setUsername(contextData.getUsername());
userInfo.setPassword(contextData.getPassword());
Object queryResult = sqlMap.queryForObject("PINTR001.getUserInfo", userInfo);
sqlMap.commitTransaction();
if (queryResult != null){
return true;
}
} catch (Exception e) {
log.error(e.getMessage());
}finally{
try {
sqlMap.endTransaction();
} catch (Exception e) {
}
}
return false;
}
}
<?xml version="1.0" encoding="UTF-8"?> <faces-config xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd" version="2.0"> <!-- Home --> <managed-bean> <managed-bean-name>PINTR001Form</managed-bean-name> <managed-bean-class>li.kang.wang.badan.intr.pintr001.pr.form.PINTR001Form</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> <managed-bean> <managed-bean-name>PINTR001SelectLogicBean</managed-bean-name> <managed-bean-class>li.kang.wang.badan.intr.pintr001.ap.logicbean.SelectLogicBean</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> <managed-bean> <managed-bean-name>PINtr001Event</managed-bean-name> <managed-bean-class>li.kang.wang.badan.intr.pintr001.pr.event.PINTR001Event</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> <managed-property> <property-name>pintr001Form</property-name> <!-- 这是PINTR001Event.java中的属性 --> <property-class>li.kang.wang.badan.intr.pintr001.pr.form.PINTR001Form</property-class> <value>#{PINTR001Form}</value> <!-- 绑定了PINTR001Form的值,才能取得表单数据 --> </managed-property> <managed-property> <property-name>pintr001SelectLogicBean</property-name> <property-class>li.kang.wang.badan.intr.pintr001.ap.logicbean.ISelectLogicBean</property-class> <value>#{PINTR001SelectLogicBean}</value> </managed-property> </managed-bean> <!-- Home --> <navigation-rule> <description>八丹Android应用主页</description> <display-name>八丹Android应用主页</display-name> <from-view-id>/INTR/PINTR001.jsp</from-view-id> <navigation-case> <from-outcome>home</from-outcome> <to-view-id>/INTR/PINTR001.jsp</to-view-id> <redirect/> </navigation-case> <navigation-case> <from-outcome>loginSuccess</from-outcome> <to-view-id>/INTR/PINTR002.jsp</to-view-id> <redirect/> </navigation-case> <navigation-case> <from-outcome>loginError</from-outcome> <to-view-id>/INTR/PINTR003.jsp</to-view-id> <redirect/> </navigation-case> </navigation-rule> </faces-config>