Login types | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Login types

friends I am making my project in Java I.e police management and this project has different different login types ...when they login I want to fetch them to specific different page how can I do it... please reply

2nd Mar 2017, 4:18 PM
Avadhut Dalavi
7 Answers
- 1
id use jsp pages for the front end. java for back end. look up jsp java netbeans online. make a drop down box with a hidden action submit button then have that go to the servlet and set a session attribute depending on what they selected. then redirect them accordingly
3rd Mar 2017, 8:57 AM
Michael Szczepanski
Michael Szczepanski - avatar
- 1
cand I get the code of it
3rd Mar 2017, 9:04 AM
Avadhut Dalavi
- 1
lol you have to make it. thats what a programmer does. im sure its online. hahahaha
3rd Mar 2017, 9:05 AM
Michael Szczepanski
Michael Szczepanski - avatar
- 1
I tried it
3rd Mar 2017, 9:06 AM
Avadhut Dalavi
- 1
it really depends on how you have everything set up. like what exactly are you using, what do you have, what do you need etc
3rd Mar 2017, 9:09 AM
Michael Szczepanski
Michael Szczepanski - avatar
- 1
I have 4 column in table ie username password type and uniqueid... and when the want to login if the login is successful then redirect them to particular page..plz reply
3rd Mar 2017, 10:26 AM
Avadhut Dalavi
- 1
all of that information will be stored on the request object within the webpage. inside the servlet have a special variable assign the type. assuming this is what will determine what login they need to go into. then run this variable through a switch statement of possible values. when it finds a match, set it in the session so it can be referred to later, then dispatch to whichever page you want that type to go to. hope this makes sense
3rd Mar 2017, 3:13 PM
Michael Szczepanski
Michael Szczepanski - avatar