开发者

java ee - authenticate users using servlets

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜