📄 hello.jsp
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page contentType="text/html;charset=GBK"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<f:view>
<html>
<head>
<title>
简单 JSF 实例
</title>
</head>
<body>
<h:form id="welcomeForm">
<h:outputText id="welcomeOutput" value="北京 2008 欢迎您!"
style="font-family: Arial, sans-serif, 宋体; font-size: 24; color: green;"/>
<p>
<h:message id="errors" for="helloInput" style="color: red"/>
</p>
<p>
<h:outputLabel for="helloInput">
<h:outputText id="helloInputLabel"
value="请输入要显示的网格数:"/>
</h:outputLabel>
<h:inputText id="helloInput" value="#{helloBean.numControls}"
required="true">
<f:validateLongRange minimum="1" maximum="500"/>
</h:inputText>
</p>
<p>
<h:panelGrid id="controlPanel" binding="#{helloBean.controlPanel}"
columns="15" border="1" cellspacing="0"/>
</p>
<h:commandButton id="redisplayCommand" type="submit" value="重新显示"
actionListener="#{helloBean.addControls}"/>
<h:commandButton id="goodbyeCommand" type="submit" value="退出系统"
action="#{helloBean.goodbye}" immediate="true"/>
</h:form>
</body>
</html>
</f:view>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -