tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Preet Kamal Singh" <pr...@pugmarks.com>
Subject Basic Auth with tomcat is not working
Date Sat, 21 Jul 2001 15:05:10 GMT
Hi,

I need urgent help for working on Basic Authentication with tomcat. The

following is web.xml file

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

<!DOCTYPE web-app

PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"

"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>

<servlet>

<servlet-name>

default

</servlet-name>

<servlet-class>

org.apache.tomcat.servlets.DefaultServlet

</servlet-class>

<load-on-startup>

-2147483646

</load-on-startup>

</servlet>

<servlet>

<servlet-name>

invoker

</servlet-name>

<!--

org.apache.tomcat.servlets.NoInvokerServlet

-->

<servlet-class>

org.apache.tomcat.servlets.InvokerServlet

</servlet-class>

</servlet>

<servlet>

<servlet-name>

jsp

</servlet-name>

<servlet-class>

org.apache.jasper.runtime.JspServlet

</servlet-class>

<!-- uncomment the following to use Jikes for JSP compilation

<init-param>

<param-name>jspCompilerPlugin</param-name>

<param-value>org.apache.jasper.compiler.JikesJavaCompiler</param-value>

</init-param>

-->

<load-on-startup>

-2147483646

</load-on-startup>

</servlet>

<servlet-mapping>

<servlet-name>

invoker

</servlet-name>

<url-pattern>

/servlet/*

</url-pattern>

</servlet-mapping>

<servlet-mapping>

<servlet-name>

jsp

</servlet-name>

<url-pattern>

*.jsp

</url-pattern>

</servlet-mapping>

<session-config>

<session-timeout>

30

</session-timeout>

</session-config>

<mime-mapping>

<extension>

txt

</extension>

<mime-type>

text/plain

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

html

</extension>

<mime-type>

text/html

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

htm

</extension>

<mime-type>

text/html

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

gif

</extension>

<mime-type>

image/gif

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

jpg

</extension>

<mime-type>

image/jpeg

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

jpe

</extension>

<mime-type>

image/jpeg

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

jpeg

</extension>

<mime-type>

image/jpeg

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

java

</extension>

<mime-type>

text/plain

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

body

</extension>

<mime-type>

text/html

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

rtx

</extension>

<mime-type>

text/richtext

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

tsv

</extension>

<mime-type>

text/tab-separated-values

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

etx

</extension>

<mime-type>

text/x-setext

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

ps

</extension>

<mime-type>

application/x-postscript

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

class

</extension>

<mime-type>

application/java

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

csh

</extension>

<mime-type>

application/x-csh

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

sh

</extension>

<mime-type>

application/x-sh

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

tcl

</extension>

<mime-type>

application/x-tcl

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

tex

</extension>

<mime-type>

application/x-tex

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

texinfo

</extension>

<mime-type>

application/x-texinfo

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

texi

</extension>

<mime-type>

application/x-texinfo

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

t

</extension>

<mime-type>

application/x-troff

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

tr

</extension>

<mime-type>

application/x-troff

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

roff

</extension>

<mime-type>

application/x-troff

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

man

</extension>

<mime-type>

application/x-troff-man

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

me

</extension>

<mime-type>

application/x-troff-me

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

ms

</extension>

<mime-type>

application/x-wais-source

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

src

</extension>

<mime-type>

application/x-wais-source

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

zip

</extension>

<mime-type>

application/zip

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

bcpio

</extension>

<mime-type>

application/x-bcpio

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

cpio

</extension>

<mime-type>

application/x-cpio

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

gtar

</extension>

<mime-type>

application/x-gtar

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

shar

</extension>

<mime-type>

application/x-shar

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

sv4cpio

</extension>

<mime-type>

application/x-sv4cpio

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

sv4crc

</extension>

<mime-type>

application/x-sv4crc

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

tar

</extension>

<mime-type>

application/x-tar

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

ustar

</extension>

<mime-type>

application/x-ustar

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

dvi

</extension>

<mime-type>

application/x-dvi

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

hdf

</extension>

<mime-type>

application/x-hdf

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

latex

</extension>

<mime-type>

application/x-latex

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

bin

</extension>

<mime-type>

application/octet-stream

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

oda

</extension>

<mime-type>

application/oda

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

pdf

</extension>

<mime-type>

application/pdf

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

ps

</extension>

<mime-type>

application/postscript

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

eps

</extension>

<mime-type>

application/postscript

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

ai

</extension>

<mime-type>

application/postscript

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

rtf

</extension>

<mime-type>

application/rtf

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

nc

</extension>

<mime-type>

application/x-netcdf

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

cdf

</extension>

<mime-type>

application/x-netcdf

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

cer

</extension>

<mime-type>

application/x-x509-ca-cert

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

exe

</extension>

<mime-type>

application/octet-stream

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

gz

</extension>

<mime-type>

application/x-gzip

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

Z

</extension>

<mime-type>

application/x-compress

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

z

</extension>

<mime-type>

application/x-compress

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

hqx

</extension>

<mime-type>

application/mac-binhex40

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

mif

</extension>

<mime-type>

application/x-mif

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

ief

</extension>

<mime-type>

image/ief

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

tiff

</extension>

<mime-type>

image/tiff

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

tif

</extension>

<mime-type>

image/tiff

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

ras

</extension>

<mime-type>

image/x-cmu-raster

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

pnm

</extension>

<mime-type>

image/x-portable-anymap

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

pbm

</extension>

<mime-type>

image/x-portable-bitmap

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

pgm

</extension>

<mime-type>

image/x-portable-graymap

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

ppm

</extension>

<mime-type>

image/x-portable-pixmap

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

rgb

</extension>

<mime-type>

image/x-rgb

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

xbm

</extension>

<mime-type>

image/x-xbitmap

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

xpm

</extension>

<mime-type>

image/x-xpixmap

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

xwd

</extension>

<mime-type>

image/x-xwindowdump

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

au

</extension>

<mime-type>

audio/basic

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

snd

</extension>

<mime-type>

audio/basic

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

aif

</extension>

<mime-type>

audio/x-aiff

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

aiff

</extension>

<mime-type>

audio/x-aiff

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

aifc

</extension>

<mime-type>

audio/x-aiff

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

wav

</extension>

<mime-type>

audio/x-wav

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

mpeg

</extension>

<mime-type>

video/mpeg

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

mpg

</extension>

<mime-type>

video/mpeg

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

mpe

</extension>

<mime-type>

video/mpeg

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

qt

</extension>

<mime-type>

video/quicktime

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

mov

</extension>

<mime-type>

video/quicktime

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

avi

</extension>

<mime-type>

video/x-msvideo

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

movie

</extension>

<mime-type>

video/x-sgi-movie

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

avx

</extension>

<mime-type>

video/x-rad-screenplay

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

wrl

</extension>

<mime-type>

x-world/x-vrml

</mime-type>

</mime-mapping>

<mime-mapping>

<extension>

mpv2

</extension>

<mime-type>

video/mpeg2

</mime-type>

</mime-mapping>

<welcome-file-list>

<welcome-file>

index.jsp

</welcome-file>

<welcome-file>

index.html

</welcome-file>

<welcome-file>

index.htm

</welcome-file>

</welcome-file-list>

<login-config>

<auth-method>BASIC</auth-method>

</login-config>

<security-constraint>

<web-resource-collection>

<web-resource-name>Protected Area</web-resource-name>

<url-pattern>/news/*</url-pattern>

<http-method>DELETE</http-method>

<http-method>GET</http-method>

<http-method>POST</http-method>

<http-method>PUT</http-method>

</web-resource-collection>

<auth-constraint>

<role-name>tomcat</role-name>

</auth-constraint>

</security-constraint>

</web-app>



I need to make the url http://<domain name>/news as proteced. But even after

configuring the web.xml I dont get the pop up box. Can someone please tell

me where I am going wrong.

I have added the /news as a context in server.xml and also integrated with

apache and its working fine.

Regards

Preet


Mime
View raw message