首页后端开发其他后端知识jsp计数器-jsp文件

jsp计数器-jsp文件

时间2024-02-07 19:34:03发布访客分类其他后端知识浏览400
导读:收集整理的这篇文章主要介绍了jsp计数器-jsp文件,觉得挺不错的,现在分享给大家,也给大家做个参考。 <HTML><HEAD><TITLE>JSP...
收集整理的这篇文章主要介绍了jsp计数器-jsp文件,觉得挺不错的,现在分享给大家,也给大家做个参考。 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>

声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!


若转载请注明出处: jsp计数器-jsp文件
本文地址: https://pptw.com/jishu/604466.html
IBM HTTP Server 远程溢出漏洞 JAVA/JSP学习系列之二(Tomcat安装)

游客 回复需填写必要信息