Share on Google+Share on Google+

shivanand42
ma access reading values
0 Answer(s)      4 years and 5 months ago
Posted in : JDBC

hey ,thanks for my question i have one question: now from login page user needs to login , when he types his "username and password " he has to login . i already created ms access page and inserted values throught servlet and register.jsp now i need code for reading values from "username and password" from my ms access............and detail in register(table in my ms access) need to display values in jsp .............please help me dis is my login.jsp

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<html><head>

<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="script/jquery-1.3.1.min.js">
</script>
<script type="text/javascript" src="script/jquery.jclock.js">
</script>
<script type="text/javascript">
    $(function($) {
      var options = {
        format: '%I:%M %p', // 12-hour with am/pm
      }
      $('.clock').jclock(options);
      var options3 = {
        format: '%d-%m-%Y ' // 24-hour
      }
      $('.date').jclock(options3);
    });
  </script>
<style type="text/css">

input.groovybutton
{
   font-size:12px;
  font-family:Comic Sans MS,sans-serif;
   font-weight:bold;
   color:#FFCC00;
   height:32px;
   background-color:transparent;
   border-style:solid;
   border-color:#FFCC00;
   border-width:5px;
}

</style>

<script language="javascript">

function goLite(FRM,BTN)
{
   window.document.forms[FRM].elements[BTN].style.color = "#FFEE99";
   window.document.forms[FRM].elements[BTN].style.backgroundColor = "#1166AA";
   window.document.forms[FRM].elements[BTN].style.borderColor = "#FFEE99";
}

function goDim(FRM,BTN)
{
   window.document.forms[FRM].elements[BTN].style.color = "#FFCC00";
   window.document.forms[FRM].elements[BTN].style.backgroundColor = "transparent";
   window.document.forms[FRM].elements[BTN].style.borderColor = "#FFCC00";
}

</script>

<style type="text/css">

input.groovybutton1
{
   font-size:12px;
  font-family:Comic Sans MS,sans-serif;
   font-weight:bold;
   color:#FFCC00;
   height:32px;
   background-color:transparent;
   border-style:solid;
   border-color:#FFCC00;
   border-width:1px;
}

</style>


<style>

      a{

      font: bold 13px Verdana;

      padding: 2px;

      padding-left: 4px;

      display: block;

      width: 100px;

      color: black;

      text-decoration: underline;

      }

      a:hover{



    color: black;

        text-decoration: none;

      } 

      </style>





      <script>

      function validate()

      {

         if(document.frm.username.value=="")

        {

                 alert("Please enter username");

                 document.frm.username.focus();

                 return false;

        }

         if(document.frm.password.value=="")

        {

                 alert("Please enter username");

                 document.frm.password.focus();

                 return false;

        }

        return true;

      }

      function trim(stringToTrim) {

        return stringToTrim.replace(/^\s+|\s+$/g,"");

      }

      function login()

      { 

        if(validate())

        {



        xmlHttp=GetXmlHttpObject()

        if (xmlHttp==null)

        {

        alert ("Browser does not support HTTP Request")

        return

        }



        var username =document.getElementById("username").value;

        var password =document.getElementById("password").value;







        var url="userloginmid.jsp"

        url=url+"?username="+username+"&password="+password;

        //alert(url);



        xmlHttp.onreadystatechange=stateChanged 

        xmlHttp.open("GET",url,true)

        xmlHttp.send(null)

        }



      }



      function stateChanged() 

      { 



      if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

 { 



  var showdata = xmlHttp.responseText; 

  var str  = showdata.toString();
   if(trim(str)=="successLogin")

         {

                window.opener.location.reload();

                window.location.reload(); 

                window.close();

         }

         else

         {

                        window.location.href="Login.jsp?errmsg=error";

         }



 } 

      }



      function GetXmlHttpObject()

      {

      var xmlHttp=null;

      try

 {

 // Firefox, Opera 8.0+, Safari

 xmlHttp=new XMLHttpRequest();

 }

      catch (e)

 {

 //Internet Explorer

 try

  {

  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");

  }

 catch (e)

  {

  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");

  }

 }

      return xmlHttp;

      }



      </script>


</head>

<body background="images/nandu.bmp">

<div id="container" style="height:1000px;width:1300px">

<div id="header" style="background-color:#DEB887; height:100px;width:1300;">
<h1 style="margin-bottom:0;"><center>"Knowledge is Divine"<center></h1>
<div class="date">Date is :</div>
<table align="right" valign="bottom" border="0" width="70" height="70" cellpadding="15" cellspacing="10">
<td>
<form name="groovyform">
<input
   type="button"
   name="groovybtn1"
   class="groovybutton"
   value="SIGN IN" 
   onClick="self.location='sign.jsp'"
   title=""
   onMouseOver="goLite(this.form.name,this.name)"
   onMouseOut="goDim(this.form.name,this.name)">
</form>

</td>
</table>
<table align="right" valign="top" border="0" width="70" height="70" cellpadding="15" cellspacing="10">
<td>
<form name="groovyform1">
<input
   type="button"
   name="groovybtn1"
   class="groovybutton"
   value="SIGN UP"
   onClick="self.location='register.jsp'"
   title=""
   onMouseOver="goLite(this.form.name,this.name)"
   onMouseOut="goDim(this.form.name,this.name)">
</form>
</td>
</table>
</div>
 <br><br>



<form name="login" action="./SessionLogin" method="POST">
 <%
            if (request.getParameter("error")!=null) {
        %>
            Login failed. Please try again.
        <%
            }
        %>

      <table border="0" width="400px" align="left" bgcolor="#CDFFFF" cellpadding="02" cellspacing="02">



      <tr><td colspan=2 align="center"> </td></tr>

      <tr><td colspan=2 align="center"><b>User Login</b></td></tr>

      <tr><td><i>Username :</i> </td><td><input type="text" name="userName" id="username"></td></tr>

      <tr><td><i>Password :</i> </td><td><input type="password" name="passWord" id="password"></td></tr>



      <tr><td width="0"></td>
      <td align="right"><input type="submit" value="Login" name="login" /><input type="submit" value="Cancel" name="cancel" /></td> 
      </tr>

      <tr><td colspan=2 align="center"><a href="register.jsp">New User</a>
      </td></tr>

      </form>

</body>
</html>

now from login page user needs to login , when he types his "username and password " he has to login . i already created ms access page and inserted values throught servlet and register.jsp now i need code for reading values from "username and password" from my ms access............and detail in register(table in my ms access) need to display values in jsp .............please help me

Ads

View Answers









Related Tutorials/Questions & Answers:
ma access reading values
ma access reading values  hey ,thanks for my question i have one... values throught servlet and register.jsp now i need code for reading values from...(table in my ms access) need to display values in jsp .............please help me
ma access reading values
ma access reading values  hey ,thanks for my question i have one... has to login . i already created ms access page and inserted values throught servlet and register.jsp now i need code for reading values from "username
Advertisements
**Connectivity is not getting done in this program plz check it out wat is the problem with that Although i've made tables in MA-ACCESS**
is the problem with that Although i've made tables in MA-ACCESS**  <p>... = c.prepareStatement("Insert into Book values(?,?,?,?)"); ps.setString... ps = c.prepareStatement("Insert into CD values
reading dropdown values from properties file in jsp
reading dropdown values from properties file in jsp  reading dropdown values from properties file in jsp
Reading the Date and time values from excel sheet
Reading the Date and time values from excel sheet  hi guys , iam... the date(dd/mm/yy) and time(hh:mm:ss) values concurrently from two different cells .when iam trying to do so iam getting the values in either time format or data
how to insert values from jsp into ms access
how to insert values from jsp into ms access   how to insert values using jsp into ms access database
How to access session values through Ajax?
How to access session values through Ajax?  Suppose in a servlet a variable userName is kept in session. How can I access this variable from JSP through AJAX? Is it possible
how to retreive values from MS Access Database based on the values entered in textbox values in jsp file
how to retreive values from MS Access Database based on the values entered in textbox values in jsp file  Hi am new to java. i need to create... in MS Access Database. the table structure is Sno JobName ProgramName Problem
access
access   This is Nitha Sriram i am having a problem that, i am having a combo box in the JSP page when i select an item from that i am calling the onchange function. In javascript i am getting the value now i want to pass
how to access radio buttons selected in a servlet??...iam unable to retrieve values...it is returning NULL
how to access radio buttons selected in a servlet??...iam unable to retrieve values...it is returning NULL  <html> <head> <title>online exam</title> </head> <body> <div
how to access radio buttons selected in a servlet??...iam unable to retrieve values...it is returning NULL
how to access radio buttons selected in a servlet??...iam unable to retrieve values...it is returning NULL  <html> <head> <title>online exam</title> </head> <body> <div
Access Specifiers and Access Modifiers
Access Specifiers and Access Modifiers  What are Access Specifiers and Access Modifiers
svg file reading and display
svg file reading and display  i want a sample program for reading and displaying the content of a svg file
Reading excel via JSP
Reading excel via JSP   The problem is while reading cells values...(means while reading the cell values space should be ignored between the words... the space between words and get full cell value? I am reading the value
Reading a text file in java
Reading a text file in java  What is the code for Reading a text file... in java.io.* package for reading and writing to a file in Java. To learn more about reading text file in Java see the tutorial Read File in Java. Thanks
access specifiers and access modifiers
access specifiers and access modifiers  I want a powerpoint presentation for access specifiers and access modifiers. Please send me the same and soon
Storing and Reading data
Storing and Reading data   Hello, I'm developing a GUI application... = new JFrame("Getting Cell Values in JTable"); JPanel panel = new JPanel(); String... frame = new JFrame("Getting Cell Values in JTable"); JPanel panel = new JPanel
Thread for reading txt file
Thread for reading txt file  how to use 3 thread to read 3 txt file? To create three threads for reading the file and three threads for getting the strings out of the queue and printing them. thanks
uploading and reading the excel daa
uploading and reading the excel daa  uploading the excel file not getting the data of the excel
connectivity with access
; Is this Access database or excel sheet. Do you want to display the values...;Is this Access database or excel sheet. Do you want to display the values in Textarea...connectivity with access  how to connect with data base with access
Reading multiple xml files
Reading multiple xml files  How can we read many xml files from a folder? The same procedure as that of "listfiles
Reading and writting multiple files
Reading and writting multiple files  how can i read and write say two different files at the same time using threads
Reading files in Java
Reading files in Java  I have to make a program in my project.... Please provide me the example code for reading big text file in Java. What do you suggest for Reading files in Java? Thanks
ms access
has to login . i already created ms access page and inserted values throught servlet and register.jsp now i need code for reading values from "username... access) need to display values in jsp .............please help me dis is my
ms access
has to login . i already created ms access page and inserted values throught servlet and register.jsp now i need code for reading values from "username... access) need to display values in jsp .............please help me dis is my
ms access
has to login . i already created ms access page and inserted values throught servlet and register.jsp now i need code for reading values from "username... access) need to display values in jsp .............please help me dis is my
ms access
has to login . i already created ms access page and inserted values throught servlet and register.jsp now i need code for reading values from "username... access) need to display values in jsp .............please help me dis is my
MS ACCESS
CONNECTION (MA ACCESS) LET ME KNOW IN MY PROGRAM WHERE I AM GOIN WRONG PLEASE...-> data sources. 2)Click Add button and select the driver Microsoft Access... = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb
MS ACCESS
CONNECTION (MA ACCESS) LET ME KNOW IN MY PROGRAM WHERE I AM GOIN WRONG PLEASE...-> data sources. 2)Click Add button and select the driver Microsoft Access... = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb
MS ACCESS
CONNECTION (MA ACCESS) LET ME KNOW IN MY PROGRAM WHERE I AM GOIN WRONG PLEASE...-> data sources. 2)Click Add button and select the driver Microsoft Access... = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb
Reading big file in Java
Reading big file in Java  How to read a big text file in Java program?   Hi, Read the complete tutorial at How to read big file line by line in java? Thanks
Tutorials   
Java Spring Hibernate Struts Training how to retrieve text and images from mysql database and show on html page using jsp servlet How to install Neo4j on Ubuntu 15.10? please help me in these prog MYSQL - mysql copy table to another table example by creating new table solution for mapping hibernate and pojos from net beans through database Connect GWT application with Oracle inventory System of Medical Store inventory System of Medical Store inventory System of Medical Store inventory System of Medical Store This code have created jTable that connected with a database.every cell of last column have a button.But this button doesn't work properly.Where is the error java program Java Database Program jdbc Database connection class in a live project ..?? What is JDBC architecture? Unable to Create DSN for excel to ms access importing data and edit that data Database Scrolling Buttons how to use foreign key in java How to delete content of a log file from linux terminal? JSP-Oracle connectivity Student Management System Java code for Saving Marathi (Indian local language ) in Mysql and retrieving the same crud operations with foreign key constraint. I really need help with this assignment question Please help me out Please Backup Failed Mysqldump Got Errno 28 On Write Upgrade MySQL 5.1 to 5.5 in cpanel mysqldump all databases com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'jpa.sequence' doesn't exist persistence xml class element persistence.xml for MySQL MySQL JDBC Driver pom dependency code Blob column jdk6 and oracle 8i connexion oracle 8i et jdk6 java [ cannot retrive date from sql ] why?? Order Entry System How to threow timeout exception when DB is not responding How to threow timeout exception when DB is not responding This is the employee form to add data to mysql database but I got error of NullPointerException, Is this write code please give me feedback as soon as possible make a method which takes user name & pwd as parameter & validate them against the database. If the corresponding user exist return true otherwise false. prabhakar validating credentials and displaying error message in login .jsp if not valid JDBC jdbc jdbc code register servlet vibhu connectiondetails from vibhu

Ads

 
Advertisement null

Ads