67,514
社区成员
发帖
与我相关
我的任务
分享
<a href="A2.jsp""> clienk web </a>
<%
System.out.println("A1 SESSION:"+session.getId());
if(session.isNew()){
System.out.println("A1 is new session");
session.setAttribute("ssoSid", "hello");
}else{
System.out.println("A1 is old session");
}
%>
web2
<%
System.out.println("A2 SESSION:"+session.getId());
if(session.isNew()){
System.out.println("A2 is new session");
}else{
System.out.println("A2 is old session");
}
String ssoSid = (String)session.getAttribute("ssoSid");
System.out.println("A ssoSid:"+ssoSid);
%>
<a href="B2.jsp""> client use </a>
<%
System.out.println("B1 SESSION:"+session.getId());
if(session.isNew()){
System.out.println("B1 is new session");
session.setAttribute("ssoSid", "LGM");
}else{
System.out.println("B1 is old session");
}
%>
hello user2
<%
System.out.println("B2 SESSION:"+session.getId());
if(session.isNew()){
System.out.println("B2 is new session");
}else{
System.out.println("B2 is old session");
}
String ssoSid = (String)session.getAttribute("ssoSid");
System.out.println("B ssoSid:"+ssoSid);
%>
<Service name="A">
<Connector port="99".../>
......
<Engine name="A" defaultHost="localhost">
......
<Host name="localhost" appBase="A" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context path="/" docBase="D:/Workspaces/A/WebRoot/" debug="0" reloadable="true" />
</Host>
</Engine>
</Service>
<Service name="B">
<Connector port="92" .../>
......
<Engine name="B" defaultHost="localhost">
......
<Host name="localhost" appBase="B" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context path="/" docBase="D:/Workspaces/B/WebRoot/" debug="0" reloadbale="true" />
</Host>
</Engine>
</Service>