页面导航: 首页网络编程JSP编程 → 正文内容

jsp计数器-jsp文件

发布:dxy 字体:[增加 减小] 类型:转载
<HTML>
<HEAD>
<TITLE>JSP Bean Example</TITLE>
</HEAD>
<BODY>
<!-- Set the scripting language to java -->
<%@ page language="java" %>
<!-- Instantiate the Counter bean with an id of "counter" -->
<jsp:useBean id="counter" scope="session" class="Counter" />
<!-- Set the bean's count property to the value of -->
<!-- the request parameter "count", using the -->
<!-- jsp:setProperty action. -->
<jsp:setProperty name="counter" property="count" param="count" />
<%
// write the current value of the property count
out.println("Count from scriptlet code : "
+ counter.getCount() + "<BR>");
%>
<!-- Get the bean's count property, -->
<!-- using the jsp:getProperty action. -->
Count from jsp:getProperty :
<jsp:getProperty name="counter" property="count" /><BR>
</BODY>
</HTML>
浏览次数:载入中... 打印本文关闭本文文章来源
·在百度中搜索关于“jsp计数器-jsp文件”相关内容
·在谷歌中搜索关于“jsp计数器-jsp文件”相关内容

文章评论

共有 位脚本之家网友发表了评论我来说两句

同 类 文 章
最 近 更 新
热 点 排 行