I tried this
<html>
<head>
<title>Active users</title>
</head>
<%@ page language="java" import="java.sql.*" %>
<%@ page import="java.util.*"%>
<%@ page import="javax.servlet.http.HttpSession.*"%>
<body>
<%
int i=0;
HttpSession CID=request.getSession(false);
HttpSessionContext context=CID.getSessionContext();
Enumeration ids=context.getIds();
while(ids.hasMoreElements())
{
String id=(String)ids.nextElement();
HttpSession fs=context.getSession(id);
i++;
}
%>
<%=ids%><br>
<%=ids.hasMoreElements()%><br>
No of sessions=<%=i%><br>
Session id <%=CID%><br>
</body>
</html>
but the result is
java.util.Vector$1@659374c2
false
No of sessions=0
Session id com.tagtraum.jo.JoSession@6b9774c2
why does it return false
regards
vtr
- V.T.R.Ravi Kumar
- Engineer, ITX,
- Bharat Heavy Electrical Ltd.,
- Engineer, ITX,
Krodhad bhavati Sammoha
Sammohat smritivibrahmah
Smritivibrahmat buddinaso
Buddhinasat pranasyati
memory loss leads to knowledge loss, If knowledge is lost you perish"
=====================================================================Sammohat smritivibrahmah
Smritivibrahmat buddinaso
Buddhinasat pranasyati
- -Bhagvatgita
memory loss leads to knowledge loss, If knowledge is lost you perish"
=========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
