jsp计数器-jsp文件
来源:网络 责任编辑:栏目编辑 发表时间:2013-07-02 04:47 点击:次
<HTML>
<HEAD>
<TITLE>jsp(SUN企业级应用的首选) Bean Example</TITLE>
</HEAD>
<BODY>
<!-- Set the scripting language to java -->
<%@ page language="java" %>
<!-- Instantiate the Counter bean with an id of "counter" -->
<jsp(SUN企业级应用的首选):useBean id="counter" scope="session" class="Counter" />
<!-- Set the beans count property to the value of -->
<!-- the request parameter "count", using the -->
<!-- jsp(SUN企业级应用的首选):setProperty action. -->
<jsp(SUN企业级应用的首选):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 beans count property, -->
<!-- using the jsp(SUN企业级应用的首选):getProperty action. -->
Count from jsp(SUN企业级应用的首选):getProperty :
<jsp(SUN企业级应用的首选):getProperty name="counter" property="count" /><BR>
</BODY>
</HTML>
<HEAD>
<TITLE>jsp(SUN企业级应用的首选) Bean Example</TITLE>
</HEAD>
<BODY>
<!-- Set the scripting language to java -->
<%@ page language="java" %>
<!-- Instantiate the Counter bean with an id of "counter" -->
<jsp(SUN企业级应用的首选):useBean id="counter" scope="session" class="Counter" />
<!-- Set the beans count property to the value of -->
<!-- the request parameter "count", using the -->
<!-- jsp(SUN企业级应用的首选):setProperty action. -->
<jsp(SUN企业级应用的首选):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 beans count property, -->
<!-- using the jsp(SUN企业级应用的首选):getProperty action. -->
Count from jsp(SUN企业级应用的首选):getProperty :
<jsp(SUN企业级应用的首选):getProperty name="counter" property="count" /><BR>
</BODY>
</HTML>
相关新闻>>
- 发表评论
-
- 最新评论 更多>>