I would think your url-pattern is not valid :

<url-pattern>/*corejspbean*/StringBean.jsp</url-pattern>

I don't know the exact rules for the pattern, but could you try first with
/* and see if that works, and then tweak the url-pattern further to your
needs ?

regards,
Harry

2010/3/28 Binu Kuttikkattu Idicula <binukuttikka...@googlemail.com>

> > Hi,
> >    I was trying a very basic example of authentication using HTTP Basic
> > Authentication. However this seems not working in TOMCAT 6.0.20 for my
> > application. Here is the web.xml which tells about login
> >
> >
> > <security-role>
> >
> > <role-name>application</role-name>
> >
> > </security-role>
> >
> > <!-- SECURITY CONSTRAINT -->
> >
> > <security-constraint>
> >
> > <web-resource-collection>
> >
> > <web-resource-name>JSP</web-resource-name>
> >
> > <url-pattern>/*corejspbean*/StringBean.jsp</url-pattern>
> >
> > <http-method>GET</http-method>
> >
> > <http-method>POST</http-method>
> >
> > </web-resource-collection>
> >
> > <auth-constraint>
> >
> > <role-name>application</role-name>
> >
> > </auth-constraint>
> >
> > <user-data-constraint>
> >
> > <transport-guarantee>CONFIDENTIAL</transport-guarantee>
> >
> > </user-data-constraint>
> >
> > </security-constraint>
> >
> > <!-- LOGIN CONFIGURATION-->
> >
> > <login-config>
> >
> > <auth-method>BASIC</auth-method>
> >
> > <realm-name>application</realm-name>
> >
> > </login-config>
> >
> >
> >
> > I have also defined a role "application" and a user by name "user" for
> that
> > role in tomcat-users file. What could be the problem?
> >
>

Reply via email to