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

Assume I have this page.

<TITLE>Login into the Employee Records Center</TITLE>
<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>

<TD><INPUT TYPE="text" NAME="USERID" VALUE="userid"><BR></TD>
<TD><INPUT TYPE="password" NAME="PASSWD" VALUE="password"></TD>

<INPUT TYPE="submit" NAME="Submit" VALUE="LOGIN">

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

7 Years
Discussion Span
Last Post by javaAddict
Featured Replies
  • Then why don't you look at this link: [URL="http://www.daniweb.com/forums/thread141776.html"]JSP database connectivity according to Model View Controller (MVC) Model 2[/URL] It is at the top of the Jsp forum. Read More


is there any place with examples on loginvalidation.jsp


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.


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.


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


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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.