about resin 3.0.8

04-11-18 z-axis

hi,friends

I use servlet A to call SLSB B as below:

public init(ServletConfig sc) throws ServletException
{
  ...
  BHome = (new InitialContext()).lookup("java:comp/env/ejb/bname");
  ...
}
<p>

it works very well before adding authenticator in web.xml:

...
<authenticator type="com.caucho.security.XmlAuthenticator">
...
</authenticator>
<login-config auth-method="form">
<form-login-config>
   <login-page>/login.jsp</login-page>
   <error-page>/errinfo.jsp</error-page>
</form-login-config>
</login-config>
...
<security-constaint url-pattern="/*" role-name="admin"/>
<security-role><role-name>admin</role-name></security-role>
...
<p>

then after loginning successfully, the lookup() will fail reporting "unauthorized ".But i am indeed in admin role ...

why does resin report that message ?

regards!

banq
2004-11-20 22:41

还需要配置容器。