Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JDBC ma access reading values
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


shivanand42
ma access reading values
0 Answer(s)      2 years 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


Advertisement
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
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
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
uploading and reading the excel daa
uploading and reading the excel daa  uploading the excel file not getting the data of the excel
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
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 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
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
 

 

 

DMCA.com