jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kazuhito SUGURI <suguri.kazuh...@lab.ntt.co.jp>
Subject Re: CACTUS + JBOSS + JAAS
Date Thu, 19 Feb 2004 11:15:36 GMT
Hi Horatiu,

In article <401539C8.2040507@memiq.ro>,
Mon, 26 Jan 2004 18:01:12 +0200,
Horatiu Parfene <horatiu.parfene@memiq.ro> 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:suguri.kazuhito@lab.ntt.co.jp

Mime
View raw message