how to check the login in jsp -


This is the first time I use jsp, and I have some problems.

I want to know how to check the login if I have two types of login. For example, I have a student and a professor when anyone is entering, should check if She is a student or professor to forward it to the right page, i.e.: the student should go to the take_quiz.jsp page and the professor should go to the add_quiz.jsp page.

Can anyone tell me how to do this?

You can use two methods

1-

Use of (IF Else) for your example

If (password = "Student" in this table for the password), then forward it to Take_Quze.pjs else (if ( Password in the "Professor" table) then forward it to proffesor.jsp else put error message // end else

but this is not removable.

-

2- Another method is to use different forms in JSP for student and professor, you can use two directories, for example Professor and For the student /professor/logi.jsp/login.jsp for the student ..

This is all .. :)


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -