loginform.jsp

来自「一些的javaee5的实用代码」· JSP 代码 · 共 32 行

JSP
32
字号
<%@ page language="java" pageEncoding="gb2312"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

<html>
<head>
	<title>登录</title>
</head>
  
<body>
<f:view>
	<h:form>   
        <h:panelGrid columns="3">   
            <h:outputLabel for="username" value="用户名:" />   
            <h:inputText id="username" value="#{loginBean.username}" required="true" />   
            <h:message for="username" />   
            <h:outputLabel for="password" value="密码:"   />   
            <h:inputSecret id="password" value="#{loginBean.password}" required="true" >
              <f:validateLength minimum="6" />
            </h:inputSecret>   
            <h:message for="password" />  
        </h:panelGrid>   
        <h:panelGrid>   
            <h:panelGroup>   
              <h:commandButton value="Login" action="#{loginBean.login}" />   
            </h:panelGroup>   
        </h:panelGrid>   
    </h:form>
</f:view>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?