Java web request.getSession () source code

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.
Mar.14,2021

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

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4d4e7-44f13.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4d4e7-44f13.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?