> -----Original Message-----
> From: Ernesto Garcia [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, November 03, 2005 9:00 AM
> To: users@tomcat.apache.org
> Subject: Inner class session attributes not supported?
> 
> 
> I define a static inner class inside my JSP

... and then put it in the session. So even if you *could* cast it back out
to the right type (which in my own testing, I haven't managed to do)... you
now have a situation where any class can now access your private inner class
of another class? (Because any other JSP page can call
session.getAttribute).  If that's the usage you want, then why bother making
it a "private inner class" in the first place? 
 
Also, the classname for inner classes has the $ in it, and for JSP pages,
has the name of the jsp page prepended as well.  In my own test, I put a
page at the root of the webapp named test.jsp and the classname of the inner
class was:

instanceObj.getClass() = class org.apache.jsp.test_jsp$MyInnerClass 
 
none of these work:
(org.apache.jsp.test_jsp$MyInnerClass)foo
(test_jsp$MyInnerClass)foo
(test_jsp.MyInnerClass)foo
 
In fact, the nice little "perchance you meant" in the stack trace tells me
someone has a sense of humour about these sorts of situations.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to