customer name and lastname prints NULL , phone works fine. HTML form field names are matching with beans attributes. I dont understand why name and lastname prints null.
--------------------------------------------------------------------------
<%@page import="java.sql.* "%>
<%@page import="bean.DatabaseBean" %>
<jsp:useBean id="dbId" class="bean.DatabaseBean" scope="session"></jsp:useBean>
<jsp:setProperty name="dbId" property="*"/>

customer name : <%=dbId.getFirstname()%>
customer lastname<%=dbId.getLastname()%>
customer phone:<%=dbId.getPhone()%>

-------------------------------------------------------------------------

package bean;
import java.sql.*;
public class DatabaseBean {
private Connection con = null;
// fields from registration.html
private String fname;
private String lname;
private String mail;
private String pass;
private String phone;
private String address;
// fields from adminInsertMovie.html
private String title;
private String asin;
private String format;
//----------------------------------------------
public void DatabaseBean () {}
//---------------------------------------------- end constructor
public void initializeDB () {
try {
// Load the JDBC driver
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
System.out.println("Driver Loaded !");
// Establish a connection
con = DriverManager.getConnection("jdbc:odbc:evdeizleDat abase");
}
catch (Exception ex) { ex.printStackTrace(); }
}
//---------------------------------------------- end initializeDB()
// Return connection property
public Connection getConnection() { return con; }
//----------------------------------------------
// setter methods of registration.html
public void setFirstname (String fname) { this.fname = fname; }
public void setLastname (String lname) { this.lname = lname; }
public void setMail (String mail) { this.mail = mail; }
public void setPassword (String pass) { this.pass = pass; }
public void setPhone (String phone) { this.phone = phone; }
public void setAddress (String address) { this.address = address; }
//----------------------------------------------
// setter methods of adminInsertMovie.html
public void setTitle(String title) { this.title = title; }
public void setAsin(String asin) { this.asin = asin; }
public void setFormat(String format) { this.format = format; }
//----------------------------------------------
// getter methods of registration.html
public String getFirstname() { return this.fname; }
public String getLastname() { return this.lname; }
public String getMail() { return this.mail; }
public String getPassword() { return this.pass; }
public String getPhone() { return this.phone; }
public String getAddress() { return this.address; }
//----------------------------------------------
// getter methods of adminInsertMovie.html
//----------------------------------------------
public String getTitle() { return this.title; }
public String getAsin() { return this.asin; }
public String getFormat() { return this.format; }
} // end class DatabaseBean