User: starksm 
  Date: 02/02/21 18:17:17

  Modified:    src/resources/web/WEB-INF notjbosstest-web.xml
  Log:
  Add a secured and unsecured servlet mapping
  
  Revision  Changes    Path
  1.2       +52 -1     jbosstest/src/resources/web/WEB-INF/notjbosstest-web.xml
  
  Index: notjbosstest-web.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/resources/web/WEB-INF/notjbosstest-web.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- notjbosstest-web.xml      21 Feb 2002 07:02:34 -0000      1.1
  +++ notjbosstest-web.xml      22 Feb 2002 02:17:17 -0000      1.2
  @@ -4,5 +4,56 @@
      "http://java.sun.com/dtd/web-app_2_3.dtd";>
   
   <web-app>
  -   <description>A root war</description>
  +   <description>A war that can be run standalone</description>
  +
  +    <servlet>
  +        <servlet-name>SecureServlet</servlet-name>
  +        <servlet-class>org.jboss.test.web.servlets.SecureServlet</servlet-class>
  +    </servlet>
  +
  +    <servlet-mapping>
  +        <servlet-name>SecureServlet</servlet-name>
  +        <url-pattern>/restricted/SecureServlet</url-pattern>
  +    </servlet-mapping>
  +    <servlet-mapping>
  +        <servlet-name>SecureServlet</servlet-name>
  +        <url-pattern>/unrestricted/SecureServlet</url-pattern>
  +    </servlet-mapping>
  +
  +<!-- ### Security -->
  +    <security-constraint>
  +        <web-resource-collection>
  +            <web-resource-name>Restricted</web-resource-name>
  +            <description>Declarative security tests</description>
  +            <url-pattern>/restricted/*</url-pattern>
  +            <http-method>HEAD</http-method>
  +            <http-method>GET</http-method>
  +            <http-method>POST</http-method>
  +            <http-method>PUT</http-method>
  +            <http-method>DELETE</http-method>
  +        </web-resource-collection>
  +        <auth-constraint>
  +            <description>Only authenticated users can access secure 
content</description>
  +            <role-name>AuthorizedUser</role-name>
  +        </auth-constraint>
  +        <user-data-constraint>
  +            <description>no description</description>
  +            <transport-guarantee>NONE</transport-guarantee>
  +        </user-data-constraint>
  +    </security-constraint>
  +
  +    <login-config>
  +      <auth-method>FORM</auth-method>
  +      <realm-name>Principal Tests</realm-name>
  +      <form-login-config>
  +        <form-login-page>/restricted/login.html</form-login-page>
  +        <form-error-page>/restricted/error.html</form-error-page>
  +      </form-login-config>
  +    </login-config>
  +
  +    <security-role>
  +        <description>A AuthorizedUser is one with a valid username and 
password</description>
  +        <role-name>AuthorizedUser</role-name>
  +    </security-role>
  +
   </web-app>
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to