public void setValue(String newValue) {
        Subject subject = SecurityUtils.getSubject();
        Session session = subject.getSession();

        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("saving session key [" + VALUE_KEY + "] with value ["
                    + newValue + "] on session with id [" + session.getId() + "]");
        }

        session.setAttribute(VALUE_KEY, newValue);
    }
Key used to store the value in the user's session.
samples/spring-mvc/src/main/java/org/apache/shiro/samples/spring/DefaultSampleManager.java