JSP User login
Posted on 2003-03-04
Hi all. I come from PHP where this matter was very easy. Now i am working on the web application, where clients are html files with applets, dont ask why. So web app wont let user access any html page without logging before. This can't be done in html, but i think i could use jsp instead of html. In PHP it was easy - just add line include("login.php") on the top of every page. Another problem is that i need to check if user exists in db via servlet. So, user is accessing jsp page, jsp needs to check if user is logged, if not print html form, get the login data and send login info to the servlet (how - by FORM ACTION or...). Servlet puts the user in the session, and REDIRECTS user to the jsp page where he wanted to enter. How could i do this without much pain. I think 20 points is enough for people who have done this before.