⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.jsp

📁 简单的用户验证,一个小型的J2EE应用,JSF做的表示层(只用了HTML,可以自己2次开发变JSP风格),主要是可以用来学习如何使用spring结合JSF和HIBERNATE做开发
💻 JSP
字号:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<html>
    <head>
       <title>Login</title>
    </head>
    <body>
       <f:view>
           <h:form>
              <h:panelGrid columns="3">
                  <h:outputLabel for="username" value="User Name:" />
                  <h:inputText id="username" value="#{userBean.user.username}" required="true" />
                  <h:message for="username" />
                  <h:outputLabel for="password" value="Password:" />
                  <h:inputSecret id="password" value="#{userBean.user.password}" required="true" />
                  <h:message for="password" />
      </h:panelGrid>
              <h:panelGrid>
                  <h:panelGroup>
                     <h:commandButton value="Login" action="#{userBean.loginAction}" />
                  </h:panelGroup>
              </h:panelGrid>
           </h:form>
       </f:view>
    </body>
</html>

⌨️ 快捷键说明

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