I have 2 servlets, SetValue (which stores a value in the session object) and
GetValue (which returns the value). I want the user to log in to access
them. My web.xml file looks like this:
<web-app>
<security-constraint>
<web-resource-collection>
<web-resource-name>Protected
Area</web-resource-name>
<url-pattern>/servlet/GetValue</url-pattern>
<url-pattern>/servlet/SetValue</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>tomcat</role-name>
<role-name>role1</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Example Basic Authentication Area</realm-name>
</login-config>
</web-app>
When my SetValue servlet is called the parameter that I send (value) does
not appear. If I remove the security constraint everything works fine. Does
anybody know why this might be happening?
Sean Batten
********
TSI Software is now Mercator - find out more at http://www.mercator.com
The information in this email is confidential and is intended solely for the
addressee(s). Access to this email by anyone else is unauthorised. If you are not an
intended recipient, you must not read, use or disseminate the information contained in
the email.
Any views expressed in this message are those of the individual sender, except where
the sender specifically states them to be the views of Mercator Software Ltd.
********