1,105,534 Community Members

Login form jsp

Member Avatar
hajjo
Junior Poster
104 posts since Mar 2008
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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.

Member Avatar
hajjo
Junior Poster
104 posts since Mar 2008
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

is there any place with examples on loginvalidation.jsp

Member Avatar
pandeyprashant
Newbie Poster
20 posts since Aug 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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.

Member Avatar
hajjo
Junior Poster
104 posts since Mar 2008
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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.

Member Avatar
javaAddict
Nearly a Senior Poster
3,274 posts since Dec 2007
Reputation Points: 900 [?]
Q&As Helped to Solve: 448 [?]
Skill Endorsements: 8 [?]
Team Colleague
Featured
 
1
 

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.

Member Avatar
osirion666
Light Poster
27 posts since Apr 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
naga lakshmi
Newbie Poster
1 post since Feb 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
javaAddict
Nearly a Senior Poster
3,274 posts since Dec 2007
Reputation Points: 900 [?]
Q&As Helped to Solve: 448 [?]
Skill Endorsements: 8 [?]
Team Colleague
Featured
 
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.

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article