> I thought a JSP would share the same session within
> the servlet if a session already exists in the
> container. JSP is eventually translated into servlet
> code, doesn't it?
> I insert the log message code in the servlet before
> getting to the JSP and find that a session already
> exists at the point. If a session in JSP is unrelated
> with a session in servlet, how these two share session
Again, the page directive specifies whether the JSP joins a session (if
one is already associated with the current request -- as in your case). By
specifying the attribute value "false", you're saying you do not want to
join the session, and hence, waiving your ability to access anything
within the session.
Please read the related bit here: