Thank you for your replies. Here is the relevant code in the
java file and then the JSP page. Please help:
public class Student implements java.io.Serializable{
private String[] jobType;
public Student(){
jobType=new String[] { "1" };
}
public void setJobType(String[] jobType){
this.jobType=jobType;
}
public String[] getJobType(){
return jobType;
}
}
The relevant JSP code is :
<%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.io.*" %>
<jsp:useBean id="s" class="Student" scope="request"/>
<%String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
String url = "jdbc
dbc:Resume";
String SSN;
Class.forName(driver);
Connection con=null;
try{
con=DriverManager.getConnection(url);
Statement stmt=con.createStatement();
String st= "insert into Profile values("+s.getSsn()+",'"+s.getLastName()+"','"+s.getFirstName()+"','"+s.getEmail()+"','"+s.getGender()+"','"+s.getDegree()+"','"+s.getMajor1()+"','"+s.getMajor2()+"','"+s.getGradua tionDate()+"','"+s.getAuthorization()+"','"+s.getJobType()+"','"+s.getGpa()+"','"+s.getSkills()+"')";
String st1= "insert into resume(Ssn) values("+s.getSsn()+")";
stmt.executeUpdate(st);
stmt.executeUpdate(st1);
SSN= s.getSsn();
stmt.close();
stmt=null;
}finally {
if(con!=null) {
con.close();
}
}
%>
<jsp:forward page="welcome.jsp"/>
Thank y'all!
CHARAN