Thanks for the reply .
here all the details are listed
In my WebContent folder there is a folder named secure and inside it I have
put one html named securepage.html
I also have created three htmls which are in the root (in same directory as WebContent).They are index.html,LoginError.html,and LoginForm.html
Now in index.html I have a link to secure/securepage.html as follows
<p>Request a secure page <a href="secure/securepage.html">here!</a></p>
So it should go to securepage.html when I click on the link(The
word here) .
What I am expecting now as I am requesting a page from folder secure which is secure as setup in the web.xml as follows it should open the loginForm.
<security-constraint>
<web-resource-collection>
<web-resource-name>SecurePages</web-resource-name>
<description>Security constraint for resources in the secure directory</description>
<url-pattern>/secure/*</url-pattern>
<http-method>POST</http-method>
<http-method>GET</http-method>
</web-resource-collection>
<auth-constraint>
<description>only let the system user login </description>
<role-name>admin</role-name>
</auth-constraint>
<user-data-constraint>
<description>SSL not required</description>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
My loginForm is not opening instead it opens the securepage.html what I don't want .