Hi Horatiu, In article <[EMAIL PROTECTED]>, Mon, 26 Jan 2004 18:01:12 +0200, Horatiu Parfene <[EMAIL PROTECTED]> wrote: horatiu.parfene> I want to test my EJBs but I am unable to autehnticate against jboss my horatiu.parfene> Cactus Test Classes. The login of the application uses j_security_check.
I have done it recentry. # You may already solved this :-) What I did is as follows: 1. configure Servlet Container and EJB Container to use the same security-domain. 2. define ServletRedirectSecure and its security in web.xml. 3. add authentication related statements in beginXXX() methods: public void beginXXX(WebRequest request){ request.setRedirectorName("ServletRedirectorSecure"); FormAuthentication auth = new FormAuthentication("usernam", "password"); request.setAuthentication(auth); } 4. run test (as usual) See also http://jakarta.apache.org/cactus/writing/howto_security.html In my testcase, Context is set in setUp() method like: private Context context; ... public void setUp(){ super.setUp(); context = new InitialContext(); } As show above, I don't pass a Properties object in the InitialContext constructor, however, this works fine for me with JBoss-3.2.3. For your informatin, ---- Kazuhito SUGURI mailto:[EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]