login.jsp
来自「《JSF第一步》的源码清华大学出版社的书」· JSP 代码 · 共 47 行
JSP
47 行
<%@page contentType="text/html; charset=UTF-8"%>
<html>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<f:view>
<f:loadBundle basename="messages" var="msgs"/>
<head>
<title><h:outputText value="#{msgs.login_title}"/></title>
</head>
<body>
<h:form>
<h3><h:outputText value="#{msgs.login_prompt}"/></h3>
<table>
<tr>
<td></td>
<td>
<h:graphicImage value="#{msgs.login_jsfabcImg}"/>
</td>
</tr>
<tr>
<td><h:outputText value="#{msgs.login_name}"/>:</td>
<td>
<h:inputText id="userName" value="#{user.userName}" required="true"/>
<h:message for="userName" />
</td>
</tr>
<tr>
<td><h:outputText value="#{msgs.login_password}"/>:</td>
<td>
<h:inputSecret id="password" value="#{user.password}" required="true">
</h:inputSecret>
<h:message for="password" />
</td>
</tr>
</table>
<p>
<h:commandButton value="#{msgs.login_login}" action="#{user.loginAction}"/>
</h:form>
<h:messages globalOnly="true">
</h:messages>
</body>
</f:view>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?