0

I want to Setup form authentication in my JSP website without creating any folder. Can someone Suggest how to do this. ? thanks....

waldyr.ar
  • 14,424
  • 6
  • 33
  • 64
codeofnode
  • 18,169
  • 29
  • 85
  • 142

2 Answers2

0

Add login-config section in your web.xml. This is sample usages,

    <login-config>
      <auth-method>FORM</auth-method>
      <form-login-config>
      <form-login-page>/login.jsp</form-login-page>
      <form-error-page>/fail_login.html</form-error-page>
      </form-login-config>
    </login-config>

If you want to know details of Form-Based Authentication, check this.

Sai Ye Yan Naing Aye
  • 6,622
  • 12
  • 47
  • 65
  • The example showing it needs a folder. My Question is can i set form based authentication without a folder. I means i do not want to create amy folder of resources. All resources are on the root location of web. How can i do that..? – codeofnode Jul 24 '12 at 13:33
0

Use Servlet Authentication Feature. It uses JAAS security, which is implemented by most of the Servlet containers like Tomcat, Websphere, Glassfish.

Look here for the example.

Community
  • 1
  • 1
Ramesh PVK
  • 15,200
  • 2
  • 46
  • 50
  • The example showing it needs a folder. My Question is can i set form based authentication without a folder. I means i do not want to create amy folder of resources. All resources are on the root location of web. How can i do that..? – codeofnode Jul 24 '12 at 13:32