您的位置:首页-> 资讯中心-> JSP技术-> JSP-> jsp计数器-jsp文件

JSP

JSP

本类阅读TOP10

·用JSP文件上载轻松实现
·用JSP编写文件上传
·jsp留言板源代码一: 给jsp初学者.
·JSP数据库操作例程(Use Bean)
· jsp计数器代码
·JSP发送邮件实例
·jsp留言板源代码三: 给jsp初学者.
·jsp文件操作之读取篇
·配置Web应用环境实现JSP留言簿
·jsp文件操作之追加篇

精品推荐
jsp计数器-jsp文件

加入时间:2005-2-22 快乐下载

<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>




相关文章

相关软件