Hi Dan,

I haven't had a chance to look at the JSP stack trace yet, but loading
a servlet does not start a session.  A developer somewhere - either in
your codebase or a library you're using - must call
httpServletRequest.getSession() (or getSession(true)) to start a
session.

Also, JSP pages by design won't bypass a filter if the filter is
configured to filter requests that will go to that JSP.  That is, the
filters always 'sit in front of' JSP pages or Servlets.

If you put a debugger breakpoint on HttpServletRequest.getSession()
and HttpServletRequest.getSession(true) you will find the culprit in
no time.  I recommend doing that as it is far more efficient than
looking at stack traces.

HTH,

-- 
Les Hazlewood
CTO, Katasoft | http://www.katasoft.com | 888.391.5282
twitter: @lhazlewood | http://twitter.com/lhazlewood
katasoft blog: http://www.katasoft.com/blogs/lhazlewood
personal blog: http://leshazlewood.com

On Thu, Sep 22, 2011 at 5:31 PM, dan <[email protected]> wrote:
> Here's another clue about JspServlet.  Looking through the tomcat sources,
> which includes Jasper, I found that they load JspServlet before anything
> else.  Here's from their org.apache.catalina.core.StandardWrapper class:
>
>    /**
>     * Return the load-on-startup order value (negative value means
>     * load on first call).
>     */
>    public int getLoadOnStartup() {
>
>        if (isJspServlet && loadOnStartup < 0) {
>            /*
>             * JspServlet must always be preloaded, because its instance is
>             * used during registerJMX (when registering the JSP
>             * monitoring mbean)
>             */
>             return Integer.MAX_VALUE;
>        } else {
>            return (this.loadOnStartup);
>        }
>    }
>
> I didn't see anything about this in the list. Perhaps I'm running across
> this because I'm the first one trying it with native sessions?
>
> Dan
>
>
> --
> View this message in context: 
> http://shiro-user.582556.n2.nabble.com/Using-native-web-sessions-tp6799265p6822446.html
> Sent from the Shiro User mailing list archive at Nabble.com.

Reply via email to