We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,408 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Login form jsp

Hello, How can I do a login form in jsp using oc4j server. (oracle jdeveloper).

Assume I have this page.

<HTML>
<HEAD>
<TITLE>Login into the Employee Records Center</TITLE>
</HEAD>
<BODY>
<H1><CENTER>Login into the Employee Records Center</CENTER></H1>

<FORM NAME="LoginForm" ACTION="index.jsp" 
METHOD="post" ENCODE="application/x-www-form-urlencoded">


<P>To login to the Employee Records Center, submit a valid
userid and password to access the Sample database installed under IBM DB2.</P>

<TABLE>
<TR VALIGN=TOP ALIGN=LEFT>
<TD><B><I>Userid:</I></B></TD>
<TD><INPUT TYPE="text" NAME="USERID" VALUE="userid"><BR></TD>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD><B><I>Password:</I></B></TD>
<TD><INPUT TYPE="password" NAME="PASSWD" VALUE="password"></TD>
</TR>
</TABLE>

<INPUT TYPE="submit" NAME="Submit" VALUE="LOGIN">
</FORM>
<HR>
</BODY>
</HTML>

How can I modify this code, to check if a password exists in a table i created. and how can i create that table.

6
Contributors
7
Replies
2 Years
Discussion Span
9 Months Ago
Last Updated
9
Views
hajjo
Junior Poster
103 posts since Mar 2008
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

is there any place with examples on loginvalidation.jsp

hajjo
Junior Poster
103 posts since Mar 2008
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

hi,
as for normal JSP login application, you need to make bean class and connection class. then you have to collect the data from databse and input from jsp page and compare these two value.
like i am working on MyEclipse so i know that one.

pandeyprashant
Newbie Poster
20 posts since Aug 2009
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

I need to see some examples on the following.

I have toad installed on my pc.

I will create a table with toad, username and password.
I need a sample code on writing jsp which access the database and brings all the values.
I need a sample on writing jsp which writes to the databse a new row (in case user registers a new username, password).

In my code, I know the logic. I need to connect the databse, and enter and get the values. I just need syntax examples. To see how the things are written.

If I get those things done. Whatever the client enters of username, password i will check them with the database.

hajjo
Junior Poster
103 posts since Mar 2008
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Then why don't you look at this link:
JSP database connectivity according to Model View Controller (MVC) Model 2

It is at the top of the Jsp forum.

javaAddict
Nearly a Senior Poster
Team Colleague
3,338 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 450
Skill Endorsements: 7

1) you need to store the username entered into a string(userenter)
2)Store entered password to string(passenter)
2) you need to use a select statement with a where clause = username that gets the password associated to the username
3) store the password to a string (actualpassword)

now compare passenter to actualpassword
if they are the same then save the login session

osirion666
Light Poster
27 posts since Apr 2009
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

attendance management system project in java or jsp please upload its urgent

naga lakshmi
Newbie Poster
1 post since Feb 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

attendance management system project in java or jsp please upload its urgent

Upload what? The code? If you want the code no one is going to do it for you. Where did you get the impression that we make others people homework.

If you want help, start by reading the tutorial you can find in a link posted in this thread. Then start a new thread with any questions that you might have.

javaAddict
Nearly a Senior Poster
Team Colleague
3,338 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 450
Skill Endorsements: 7

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0908 seconds using 2.72MB