到 Google 资讯主页   
EasyJF首页   资料   源码   软件    论坛   网站    
   使用帮助    
    该信息为本站MyRSS系统缓存内容,部分图片及附件有可能无法正常使用.easyjf.comJava家无关,不对该信息负责.通过http://kb.csdn.net/keyword/java//../../java/Articles/200109/52d49c79-0715-4c72-93c0-ac16d717b05f.html访问该信息的原始内容.
页面功能  【加入收藏】 【推荐给朋友】 【字体:  】 【关闭】   
Session(Resin Example)
作者: 来源:Java家  发布时间:2001-09-20 00:00:00.0

<%@ page language=javascript %><% 
/* session.jsp 

* Trivial example of session variables, just stores a counter 
* in the session variable. 

* Since the Request object comes from the Servlet API, Resin 
* scripts can share session variables with Java Servlets. 
*/ 
var count = session.value.counter++; 

%> 

<html> 
<head><title>Counter</title></head> 
<body bgcolor=#ffffff> 
<% 

if (session.isNew()) { 
%><h1>Welcome to a new session.</h1><% 
} else if (session.value.name) { 
%><h1>Welcome back: <%= session.value.name %> <%= count %> </h1><% 
} else { 
%><h1>Welcome back: <%= count %> </h1><% 


%> 
<p/><a href="<%= response.encodeUrl("session.jsp") %>">click</a> to enable 
session rewriting. 
</body> 
</html> 

 
相关文章
 
页面功能  【加入收藏】 【推荐给朋友】 【字体:  】 【关闭】   


EasyJF.com 2006 隐私政策 使用EasyJF前必读