I want to look at the source code of HttpSession session = request.getSession (); and want to know how to get the
of the current session.I want to look at the source code of HttpSession session = request.getSession (); and want to know how to get the
of the current session.different libraries have different implementations, as you can see below debug. Or you can just navigate to the implementation with the code view function of ide. In this way, you can only have a rough look. It is easier for you to understand debug by yourself
@Override
public HttpSession getSession(boolean create) {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
if (SecurityUtil.isPackageProtectionEnabled()){
return AccessController.
doPrivileged(new GetSessionPrivilegedAction(create));
} else {
return request.getSession(create);
}
}
check the entry method of debug
Previous: Vue running error report
isn t inheriting abstract classes a necessary abstract method in an implementation? an abstract subclass must implement all abstract methods in the abstract class, otherwise the subclass is also an abstract class. ...