<%@ page import="javax.servlet.http.HttpSession" %> <%@ page import="java.util.*,java.sql.*" %> <%@ page import="javax.servlet.http.HttpSession" %> <%@page import="com.dbutil.CrudOperation"%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" href="css/bootstrap.min.css"> <link rel="stylesheet" href="css/fullview.css"> <script src="jquery.js"></script> <script src="bootstrap.min.js"></script> <title>Job Details</title> </head> <body> <% Connection con = null; ResultSet rs = null; PreparedStatement ps = null; HttpSession hs = null; con = CrudOperation.createConnection(); hs = request.getSession(); String value=request.getParameter("idJob"); String id = (String) hs.getAttribute("userinfo"); %> <div class="container"> <%String strsql = "select name from register where uname=?"; try { ps=con.prepareStatement(strsql); ps.setString(1, id); int rw1=ps.executeUpdate(); if(rw1>0) { con.commit(); String tryname=rs.getString("name"); String strsql1 = "insert into postjob1(applicants) values(?) where id=?"; try { ps=con.prepareStatement(strsql1); ps.setString(1, tryname); ps.setString(2,value); rs=ps.executeQuery(); if(rs.next()) { con.commit(); response.sendRedirect("confirm.jsp"); } else{ response.sendRedirect("Oops.jsp");} } catch(SQLException se) { System.out.println(se); } } else{ response.sendRedirect("Oops1.jsp");} } catch(SQLException se) { System.out.println(se); } %> %> </div> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)