users@glassfish.java.net

Re: realm security with the hello world duke program...

From: <glassfish_at_javadesktop.org>
Date: Mon, 19 May 2008 11:37:27 PDT

still not working properly...

most current files are:
WEB.XML
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="h
ttp://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>
            index.jsp
        </welcome-file>
    </welcome-file-list>
     <login-config>
          <auth-method>BASIC</auth-method>
          <realm-name>LeggeTest</realm-name>
     </login-config>
        <security-constraint>
        <web-resource-collection>
            <web-resource-name>Secure Pages</web-resource-name>
            <url-pattern>/*</url-pattern>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
        </web-resource-collection>
        <auth-constraint>
            <role-name>USERS</role-name>
        </auth-constraint>
    </security-constraint>
</web-app>

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

<!--
 Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved.
 Use is subject to license terms.
-->

<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.1 Servlet 2.4//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-1.dtd">
<sun-web-app>
  <context-root>/hello</context-root>
    <security-role-mapping>
          <role-name>USERS</role-name>
          <group-name>Users</group-name>
     </security-role-mapping>
</sun-web-app>


i still not getting the challenge box to pop up...
[Message sent by forum member 'huggy77' (huggy77)]

http://forums.java.net/jive/thread.jspa?messageID=275282