开发者

java ee - authenticate users using servlets

开发者 https://www.devze.com 2023-02-05 16:48 出处:网络
I just started learning java, and ha开发者_如何转开发ve not worked with java ee. I need to authenticate users using servlets. Advise, please, sample code and technical literature. Thank you!

I just started learning java, and ha开发者_如何转开发ve not worked with java ee. I need to authenticate users using servlets. Advise, please, sample code and technical literature. Thank you!


  1. create a html form that accept username / password.

  2. post these data to a servlet.

  3. in doPost() read these data from request check them against database.

  4. set some parameter in session that will show your system that this user is authenticated and logged in.

Also See

  • Document
  • A Simple step by step example + tutorial


Very simple Servlet/JSP related code to get you started. And here is a fine example of Form Based Authentication Using Servlet.

0

精彩评论

暂无评论...
验证码 换一张
取 消