DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9027>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9027

The Tomcat Servlet Container use the identity specified in a servlet with the element 
<run-as> for every web component.

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|DUPLICATE                   |



------- Additional Comments From [EMAIL PROTECTED]  2002-05-14 11:45 -------
This bug is not a duplicate of bug #9023. The problem exists already with 
servlet-mapping (use the following web.xml).


-----------------------------------------------------------------------------
Output for the URL 'http://localhost:8000/runas/testRunAs' with the user j2ee:
--> The ID of the EJB caller is ok
-----------------------------------------------------------------------------
Identity of the user in testRunAs.jsp: j2ee

Identity of the EJB caller: scott 


-----------------------------------------------------------------------------
Output for the URL 'http://localhost:8000/runas/test' with the user j2ee
--> The ID of the EJB caller is not ok, the servlet should use the caller-id
-----------------------------------------------------------------------------
Identity of the user in test.jsp: j2ee

Identity of the EJB caller: scott 



-----------------------------------------------------------------------------
WEB.XML:
-----------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 
2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>

<web-app>
  <display-name>RunAsWebApp</display-name>
  <servlet>
    <servlet-name>testRunAs</servlet-name>
    <display-name>testRunAs</display-name>
    <jsp-file>/testRunAs.jsp</jsp-file>
    <run-as>
      <role-name>eng</role-name>
    </run-as>
  </servlet>
  <servlet>
    <servlet-name>test</servlet-name>
    <display-name>test</display-name>
    <jsp-file>/test.jsp</jsp-file>
  </servlet>
  <servlet-mapping>
    <servlet-name>testRunAs</servlet-name>
    <url-pattern>/testRunAs</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>test</servlet-name>
    <url-pattern>/test</url-pattern>
  </servlet-mapping>
  <session-config>
    <session-timeout>30</session-timeout>
  </session-config>
  <security-constraint>
    <web-resource-collection>
      <web-resource-name>WRCollection</web-resource-name>
      <url-pattern>/testRunAs</url-pattern>
      <url-pattern>/test</url-pattern>
    </web-resource-collection>
    <auth-constraint>
      <role-name>mgr</role-name>
    </auth-constraint>
    <user-data-constraint>
      <transport-guarantee>NONE</transport-guarantee>
    </user-data-constraint>
  </security-constraint>
  <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>Default</realm-name>
  </login-config>
  <security-role>
    <role-name>eng</role-name>
  </security-role>
  <security-role>
    <role-name>mgr</role-name>
  </security-role>
</web-app>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to