On Jan 8, 2004, at 7:05 AM, Vincent Massol wrote:
So the question is - is it possible to combine the following 2 methods?
public void begin(WebRequest request) { request.setRedirectorName("ServletRedirectorSecure"); request.setAuthentication(new FormAuthentication( login.getString("username"), login.getString("encryptedPassword"))); }
public void setUp() throws Exception { super.setUp();
conn = ServiceLocator.getConnection(); // populate the userForm and place into session String username = login.getString("username"); UserManager userMgr = new UserManagerImpl(conn); userForm = (UserForm) userMgr.getUser(username); session.setAttribute(Constants.USER_KEY, userForm); }
I don't think so. The begin method is used to connect to the server side, whereas the setup is used to set up server side objects. They are executed in different JVM (client and server side).
Thanks -Vincent
Cool - just wanted to clarify I'm doing it right. After using the begin() and setUp() - I seem to like that better, then I can override begin() as needed in subclass - for instance, to cancel form authentication with an empty method.
Thanks,
Matt
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
