i want session Object not in servlet class but ordinary from we application.
WEB.XML
com.abc.web.ApplicationManager
com.abc.web.SessionManager
ViewPrices.java
public class ViewPrices implements Cloneable, Serializable {
Session session = request.getSession();
servletContext.getSession()
anyWay.getSession();
}
解决方案
I don't think it's possible, to directly access session and request object. What you can do is pass the session and/or request object from servlet to a Java class either in some method or in constructor of the Java class.