request and session from custom class

S

scdev

Hi to all,
I have to work with a servlet web application (that use jcifs for
authentication) but I can modify only a custom class that is not a
servlet and that is not called directly from a servlet (is called
through other classes) .
I know that is not a good solution but it's the only one possible.
So... From custom class i would like to recover current domain user
returnet by request.getRemoteUser() and a session variable; but i
can't reach request object, can't modify calls to myclass, i can't
pass additional parameter etc...
Did you have any suggestion to solve my problem? Is there a method to
recover request object?
ThanKyou .
 
S

scdev

You cannot recover what you aren't given.  From your description, the only
class you are allowed to alter is not given that information.  The caller has
eaten it.  You are SOL.

Thankyou,
In fact i could modify another class at the login procedure and store
my username "somewhere" but the problem still exist because i can't
recover it from the custom class. So i have no solution.
Thakyou anyway
 
C

conrad

In fact i could modify another class at the login procedure and store
my username "somewhere" but the problem still exist because i can't
recover it from the custom class. So i have no solution.
Thakyou anyway

The right answer would be to modify the calling class to pass that
information into an instance member of the class that needs to use it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top