On Sat, May 22, 2004 at 01:23:38PM +0100, Tim Penhey wrote:
: Using <jsp:useBean> would require a default constructor, but even if I wanted that, I
: can't get the request and hence the logged in user.

I don't think I understand this --
What stops you from getting the request object from within a JSP?

-and what would be the problem with a default, no-args ctor?
Beans aren't read-only once they're created. =)


: I looked at HttpSessionListener, but that doesn't seem to have any way to get the 
logged
: in user either.
: 
: Ideally I would like to use something that is container independant, but I could go 
with
: something like a filter if that is the only way.

Filters are so container-inependent, they're part of the servlet spec.

An idea: have the filter check the session for the bean.
If it's not there, populate the bean with the user's info from the DB,
then put that in the session.

The user's login name is available in the request object.  Map the
user's login name to the firstname:lastname pair in a db table or view,
and you're done.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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

Reply via email to