JEE : Login Form HTML - JS - MySQL



=======MYSQL=======
--Login---
C:\Program Files (x86)\MySQL\MySQL Server 5.6>mysql -u root -p
Enter password: ****     //root

mysql> CREATE DATABASE db;
Query OK, 1 row affected (0.00 sec)

mysql> USE db;
Database changed
mysql> CREATE TABLE user_table(username varchar(25),password varchar(25),secureno int);


//check table ----------
--Login---
C:\Program Files (x86)\MySQL\MySQL Server 5.6>mysql -u root -p
Enter password: ****     //root


//pointing db
mysql> USE db;

desc user_table;
///---Result-------
 +----------+-------------+------+-----+---------+-------+
| Field    | Type        | Null | Key | Default | Extra |
+----------+-------------+------+-----+---------+-------+
| username | varchar(25) | YES  |     | NULL    |       |
| password | varchar(25) | YES  |     | NULL    |       |
| secureno | int(11)     | YES  |     | NULL    |       |
+----------+-------------+------+-----+---------+-------+
3 rows in set (0.01 sec)

//to know prot no


mysql> show variables;   //3306



//---------Imp--------- not used this resource to new forum site ,collected from
http://bigknol.com/open-blog/2013/07/eclipse-jee-development-tutorial/
,add mysql env variable screen shot also--------------------imp-------//


  • Prerequisite for JSP/MySQL Application with Eclipse JEE Kepler.

    JSP MySQL Eclipse JEE Development Kepler Tutorial

    Creating a database and Table using MySQL : Open cmd prompt (Windows+R and Type ‘cmd’) or use MySQL 5.5 Command line client. Change directory to MySQL Server 5.5 installed Path. (In this example path looks like : C:\mysql\MySQL Server 5.5\bin>)
    Create a new user in MYSQL Sever
    You can use root if you have super user privilege, or create a new user in MySQL, to create a new user:
     Login as a new user
    mysql –u nikisurf -p
    Create a new Database db and Selecting Database
     Create a new Table in MySQL called ‘info’
    eclipse jee development tutorial




    Open Eclipse
    Click eclipse.exe file from unzipped folder and set a workspace(location of projects)
    Create a new Dynamic Web Project
    File => New => Dynamic Web Project, and give Project name as ‘Info’ click Next
    again Next Finish.
    create kepler jee application








    Connect MySQL to JSP with Eclipse Kepler
    Add Library : MySQL Connector/j
    Unzip mysql-connector-java-5.1 and select mysql-connector-java-5.1.23-bin.jar file and drag and drop into the Project explorer of the Eclipse(info => WebContent => WEB-INF => lib).
    add mysql connection jee eclipse







    Start Coding
    Right Click on Info from Project Explorer => New => HTML File (Give Name as index.html)
    index.html
    Create a new JSP file : Right Click on Info from Project Explorer => New => JSP File (Give Name as add.jsp) Insert the codes between body tag of the document
    add.jsp
     Create delete.html
    delete.jsp
    show.html
    show.jsp
    Run JEE Eclipse Info Project
    To run tomcat server with Eclipse : Right Click on Info from Project Explorer =>Run as => Run on Server