NEED HELP, Login Screen

Hey all. Apparently hy hosting service doesn surport asp so i need to use jsp to create a log in page consisting of a login name and password! i would like the source code, to let people login, check that there details match a database and then continue to a signedin page, but if no mactch go to a different page. Needs to be in jsp files.
 Thanks
cldmAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
fargoConnect With a Mentor Commented:
hello cldm,

U can do the following:

in the login.jsp

<form name="login_form" action="target.jsp" method="post">
<input type="text" name="user_name">Login
<input type="password" name="user_pwd"> Password
<input type="submit">
</form>

And in target.jsp

take the parameters

String user = request.getParameter("user_name");
String pwd = request.getParameter("user_pwd");

then use ur queries to check against database

select user_name, user_pwd from user_table where user_name='"+user+"';

get the user pwd and check against the pwd u got from request...

if(pwd.equals(user_pwd)){
do the required things
}else{
login failed
}

Well, this is the very simple way and is as per ur points "20". If you need any detailed code..increase the points.

Moreover, above code doesn't check anything for null values and so..do the needful.

Happy working
regards
fargo



0
 
antonsigurCommented:
Yes, so I think you should rent a coder... This is not a expert-exchange, this is a software development. Ask specific questions only
0
 
fargoCommented:
hello cldm,

Why "C"...you didn't ask anything more???

well...this is not the way to get more answers to ur queries. Best of luck

happy working
fargo
0
 
cldmAuthor Commented:
cause u make me trying to give u more points when i have none, for information im trying to get!
0
 
BanathCommented:
Grade changed to A.

cldm, the grade you give does not affect the number of question points. Please visit the helpdesk to learn about the question/answer process.

Banath
EE Moderator
0
All Courses

From novice to tech pro — start learning today.