<!-- DwrSession - DwrSession -->
<create creator="" javascript="DwrSession">
<param name="" value="您完整包名称.DwrSession"/>
< method="getSessionId"/>
< method="Session"/>
< method="getSession"/>
</create>
JAVA类代码:
import uk.ltd.getahead.dwr.*;
public DwrSession {
//得到session编号
public String getSessionId {
WebContext webContext = WebContextFactory.get;
webContext.getSession;
webContext.getHttpServletRequest;
webContext.getHttpServletResponse;
webContext.getSession.getId;
}
public void Session(String value,String sessionName){
WebContext webContext = WebContextFactory.get;
//设定session值
webContext.getSession.Attribute(sessionName, value);
}
public String getSession(String sessionName){
WebContext webContext = WebContextFactory.get;
//返回session值
(String)webContext.getSession.getAttribute(sessionName);
}
}
="xspace-totlerecord">2="xspace-totlepages">1/2="xspace-current">12>
最新评论