Hi,HELP ME WITH LOGIN JSP CODE?

Hello ,
To get to know the concept can anyone answer my questions in detail along with an example.

first step: Have to create a Loginpage.jsp in JSP with LOGIN id and Password.
second step: I am using MS Access as my present database which stores name and password.
Third step: Please explain to me how connection is made between Access and My Loginpage.jsp and what needs to be done in control panel(i donno that too).

Fourth step: This loginpage.jsp shld validate user id and password and if they are correct shld , send it to the next page through session.

Comments

  • : Hello ,
    : To get to know the concept can anyone answer my questions in
    : detail along with an example.
    :
    : first step: Have to create a Loginpage.jsp in JSP with LOGIN id
    : and Password.
    : second step: I am using MS Access as my present database which
    : stores name and password.
    : Third step: Please explain to me how connection is made between
    : Access and My Loginpage.jsp and what needs to be done in control
    : panel(i donno that too).
    :
    : Fourth step: This loginpage.jsp shld validate user id and password
    : and if they are correct shld , send it to the next page through
    : session.
    :

    quickly to say,
    You need to create a datasource for MSAccess in the datasources<-controlPanel window.

    just to paste....sick of typing it

    @tony
    Two questions:

    1. How do you connect to a Microsoft Access-based database (in a Windows system) using JDBC?
    2. In Class.forName(....) and DriverManager.getConnection(....), what driver and URL should you use?



    AThere are two techniques available for connecting to a data source using JDBC. First, if your program will talk to an ODBC data source, you can use the JDBC-ODBC bridge included with your JDK. In the case of Sun, you would use sun.jdbc.odbc.JbdcOdbcDriver.

    Specifically, using Class.forName:

    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");



    or the command line:

    java -Djdbc.drivers=sun.jdbc.odbc.JdbcOdbcDriver <program name>



    Second, you can connect to your data source through a third-party, vendor-specific bridge. In the case of a third party driver, you simply substitute that driver for the JDBC-ODBC bridge driver.

    See the Resources section below for a link to Sun's database of available drivers.

    Once you have a driver loaded and your data source set up, getting a connection is a simple matter of feeding the correct URL, name, and password to the getConnection() method.

    A JDBC URL takes the following form:

    jdbc::



    In the case of Microsoft Access and the ODBC bridge, it would take the form:

    jdbc:odbc:



    where is the name that you gave the data source when you set it up.

    As an aside for those using other drivers, is the name of the connectivity mechanism used by the driver.

    In my answer, I've assumed quite a bit of JDBC knowledge. If you're completely new to JDBC, or even if you just need to brush up your skills a bit, head on over to the JDBC Short Course (see Resources), an excellent training course that will get you up to speed quickly.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion