📄 counter.jsp
字号:
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <%@ 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>
<jsp:useBean id="counterBean" class="com.jspdev.ch18.CounterCharacterBean"
scope="session" />
<f:use_faces><br />
<h:form id="counterForm" formName="counterForm" ><br />
要统计的字符串:<br />
<h:input_text id="target" valueRef="counterBean.target" /><br />
统计的结果:
<h:output_number id="output" valueRef="counterBean.counter"/><br>
<h:command_button id="submitButton"
label="submit" commandName="submit" action="success">
<f:action_listener
type="com.jspdev.ch18.CounterActionListener"/>
</h:command_button>
</h:form>
</f:use_faces>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -