tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Euan Guttridge <EGuttri...@buildonline.com>
Subject RE: security constraint & web.xml
Date Sat, 14 Jun 2003 18:29:36 GMT
Thanks John - solved.

-----Original Message-----
From: John Rishea [mailto:jrishea@avaya.com] 
Sent: 14 June 2003 16:46
To: Tomcat Users List
Subject: RE: security constraint & web.xml


Euan,

If you look at the DTD 2.3 specs, the <security constraint> and
<login-confi> entries have to be placed after the <taglib> entries.  It's
very picky about tags being in the correct order.

Hope that helps.

__________________
John Rishea
Avaya, Inc.
(303) 538-4503

-----Original Message-----
From: Euan Guttridge [mailto:EGuttridge@buildonline.com]
Sent: Saturday, June 14, 2003 9:41 AM
To: 'tomcat-user@jakarta.apache.org'
Subject: security constraint & web.xml


The security constraint I am adding is screwing up my web.xml. After adding
the contraint tomcat cannot find my taglibs. Any ideas? (web.xml below)

Thanks,
Euan




<?xml version="1.0" encoding="ISO-8859-1"?>

<!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>
  <!-- General description of your web application -->
  <display-name>TestOnline</display-name>
  <description>
     Build of Test
  </description>

   <context-param>
    <param-name>webmaster</param-name>
    <param-value>test@test.com</param-value>
    <description>
        The EMAIL address of the administrator to whom questions
        and comments about this application should be addressed.
      </description>
  </context-param>

   <security-constraint>
        <web-resource-collection>
                <web-resource-name>test1</web-resource-name>
                <url-pattern>/jsp/admin/test1/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
                <role-name>test1-user</role-name>
        </auth-constraint>
   </security-constraint>

  <security-constraint>
        <web-resource-collection>
                <web-resource-name>test2</web-resource-name>
                <url-pattern>/jsp/admin/test2/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
                <role-name>test2-user</role-name>
        </auth-constraint>
  </security-constraint>

  <login-config>
        <auth-method>BASIC</auth-method>
        <realm-name>test1</realm-name>
        <realm-name>test2</realm-name>
  </login-config>


  <servlet>
    <servlet-name>User</servlet-name>
    <servlet-class>com.test.user.UserServlet</servlet-class>
  </servlet>


  <servlet-mapping>
      <servlet-name>User</servlet-name>
      <url-pattern>/ProjectsOnline</url-pattern>
  </servlet-mapping>

  <session-config>
    <session-timeout>30</session-timeout>
    <!-- 30 minutes -->
  </session-config>


  <taglib>
    <taglib-uri>/archtaglib</taglib-uri>
    <taglib-location>/WEB-INF/lib/archtaglib.jar</taglib-location>
  </taglib>
  <taglib>
    <taglib-uri>/distributiontaglib</taglib-uri>
    <taglib-location>/WEB-INF/lib/distributiontaglib.jar</taglib-location>
  </taglib>
  <taglib>
    <taglib-uri>/formstaglib</taglib-uri>
    <taglib-location>/WEB-INF/lib/formstaglib.jar</taglib-location>
  </taglib>
  <taglib>
    <taglib-uri>/localtaglib</taglib-uri>
    <taglib-location>/WEB-INF/lib/localtaglib.jar</taglib-location>
  </taglib>
  <taglib>
    <taglib-uri>/navigationtaglib</taglib-uri>
    <taglib-location>/WEB-INF/lib/navigationtaglib.jar</taglib-location>
  </taglib>
  <taglib>
    <taglib-uri>/summarytaglib</taglib-uri>
    <taglib-location>/WEB-INF/lib/summarytaglib.jar</taglib-location>
  </taglib>


</web-app>


Euan Guttridge
Technical Operations
BuildOnline
40 Holborn Viaduct
London
EC1N 2PB
UK Customer Services:  0870 241 2283
Telephone:                   +44 (0)20 7836 2883
Fax:                             +44 (0)20 7836 2886


www.BuildOnline.com
'Save Time, BuildOnline'



This email and any files transmitted are confidential and intended solely
for the use of the individual or entity to which they are addressed. If you
have received this email in error, please notify
BuildOnline: Tel: +44 (0)20 7836 2883
****************************************************************************
******

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message