Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet pagination problem

Have Programming Question? Ask it here!
 
 
 


harini
pagination problem
0 Answer(s)      4 years and 4 months ago
Posted in : JSP-Servlet


Thanks sir for posting the answer.But i have 2 problems

1.i have created one employee class in that i use getter and setter methods,i created another class in that i wrote the methods like modify(),delete(),insert() methods using or importing employee class.finally i created a class using servlets in that i called a these methods,to call this servlet i created a html file i wrote one form to call this servlet.
In this servlet i used doget()method in that i created a 2 forms to call a methods like insert() and modify(),my problem is that where i have to put & how to do pagination?
my code as follows.

//EmployeeCheckServlet.java

package com.antares.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Iterator;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.antares.To.Employee;
import com.antares.service.EmployeeDataBase;

@SuppressWarnings("serial")

public class EmployeeCheckServlet extends HttpServlet {

Employee employeeDTO = null;

ServletContext context;

@Override
public void init() throws ServletException {
System.out.println(" Inside EmployeeCheckServlet.init()");
}

Connection connection = null;
Statement statement = null;
ResultSet resultSet = null;

@Override
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {

System.out.println(" Inside EmployeeCheckServlet.doGet()");

String strServletPath = request.getServletPath();
response.setContentType("text/html");
PrintWriter out = response.getWriter();
System.out.println("************ Path is " + strServletPath);

try {

String className = "oracle.jdbc.driver.OracleDriver";
String url = "jdbc:oracle:thin:@twtesting:1550:orcl1";
String user = "supplyco";
String pwd = "supplyco";
try {
Class.forName(className);

connection = DriverManager.getConnection(url, user, pwd);

statement = connection.createStatement();

System.out.println("Connection established");
} catch (ClassNotFoundException e1) {
e1.printStackTrace();
}

if (strServletPath.equalsIgnoreCase("/new.do")) {
out.println("<html>");
out
.println("<body bgcolor='pink'><h3>Hello User Enter The Following.....</h3>");
out.println("<form action='./newuser.do' method='get'>");
out.println("<table>");
out
.println("<tr><td>Enter Your First Name</td><td><input type='text' name='fstname'></td></tr>");
out
.println("<tr><td>Enter Your Last Name</td><td><input type='text' name='lstname'></td></tr>");
out
.println("<tr><td>Enter Your Address</td><td><input type='text' name='add'></td></tr>");
out
.println("<tr><td>Enter Your Phone Number</td><td><input type='text' name='phno'></td></tr>");
out
.println("<tr><td>Enter Your Email ID</td><td><input type='text' name='emailid'></td></tr>");
out
.println("<tr><td>Enter Your Status</td><td><input type='text' name='status'></td></tr>");
out
.println("<tr><td colspan='1' align='center'><input type='submit' value='Click Here To Submit'></td></tr>");

out.println("</table></form></body>");

out.println("</html>");

} else if (strServletPath.equalsIgnoreCase("/newuser.do")) {

String strFirstName = request.getParameter("fstname");

String strLastName = request.getParameter("lstname");

String strAddress = request.getParameter("add");

String strPhoneNumber = request.getParameter("phno");

String strEmailId = request.getParameter("emailid");

String strStatus = request.getParameter("status");

int intPhoneNumber = Integer.parseInt(strPhoneNumber);

System.out.println("**** FIRST NAME IS ****"+strFirstName);

employeeDTO = new Employee();

EmployeeDataBase empDB = new EmployeeDataBase();

employeeDTO = empDB.insertEmployeeDetails(strFirstName,
strLastName, strAddress, intPhoneNumber, strEmailId,
strStatus);

ResultSet resultSet = null;
boolean blnIsValid = false;
try {
resultSet = statement
.executeQuery("SELECT * FROM EMPLOYEE");
while (resultSet.next()) {
if ((strFirstName.equalsIgnoreCase(resultSet.getString("EMP_FIRSTNAME")))
&& (strLastName.equalsIgnoreCase(resultSet.getString("EMP_LASTNAME")))
&& (strAddress.equalsIgnoreCase(resultSet.getString("EMP_ADDRESS")))
&& (strPhoneNumber.equalsIgnoreCase(resultSet.getString("EMP_PHONENO")))
&& (strEmailId.equalsIgnoreCase(resultSet.getString("EMP_EMAILID")))
&& (strStatus.equalsIgnoreCase(resultSet.getString("EMP_STATUS")))) {
blnIsValid = true;
break;
}

}
if (blnIsValid) {
out.println("<html>");
out.println("<body bgcolor='pink'>");
out.println("<h3>Your Personal Details As Follows :</h3>");
out.println("<br>Your Emp_id :"+ resultSet.getInt("EMP_ID"));
out.print("<br>Your First Name :" + strFirstName);
out.print("<br>Your Last Name :" + strLastName);
out.print("<br>Your Address :" + strAddress);
out.print("<br>Your Phone Number :" + strPhoneNumber);
out.print("<br>Your Email ID :" + strEmailId);
out.print("<br>Your Status :" + strStatus);
out.print("<br><br><br> <a href='./empsumm.do'>Click Here To Go Employee Summery </a>");
out.println("</body></html>");
}
else {
out.println("<html>");
out.println("<body bgcolor='babypink'>");
out.println("<h3>Sorry User Your Details Arenot Correct Please Enter Once Again!!!!!!!!</h3>");
out.println("</body></html>");
}
} catch (SQLException e) {
e.printStackTrace();
}
}

else if (strServletPath.equalsIgnoreCase("/empsumm.do")) {


out.println("<html>");
out.println("<body bgcolor='wheat'><center><h3>Following Are List Of Employees.....</h3></center>");
out.println("<form action='./modify.do' method='get'>");
out.println("<center><table border='2'cellpadding='7' cellspacing='1'>");
out.println("<tr><td>Select</td><td>EmpId</td><td>First Name</td><td>Last Name</td><td>Address</td><td>Phone Number</td><td>EmailID</td><td>Status</td>");

EmployeeDataBase empDB = new EmployeeDataBase();
ArrayList<Employee> arlEmp = empDB.findAllEmployees();
Iterator<Employee> iter = arlEmp.iterator();

int intEmpId = 0, intEmpPhoneNo = 0;
String strFstName = null, strLstName = null, strEmpAdd = null, strEmailId = null, strStatus = null;
while (iter.hasNext()) {

Employee empDTO = (Employee) iter.next();
intEmpId = empDTO.getIntEmpid();
strFstName =empDTO.getEmp_fristName();
strLstName=empDTO.getEmp_lastName();
strEmpAdd = empDTO.getEmp_address();
intEmpPhoneNo = empDTO.getEmp_phone();
strEmailId = empDTO.getEmp_email();
strStatus = empDTO.getEmp_status();
System.out.println();

out.println("<tr>");
out.println("<td><input type='radio' value='"+intEmpId+"' name='empid'></td>");
out.println("<td>" + intEmpId + "</td>");
out.println(" <td>" + strFstName + "</td>");
out.println(" <td>" + strLstName + "</td>");
out.println(" <td>" + strEmpAdd + "</td>");
out.println(" <td> " + intEmpPhoneNo + "</td>");
out.println(" <td>" + strEmailId + "</td>");
out.println("<td>" + strStatus + "</td>");
out.println("</tr>");

}

out.println("</table><br><br><input align='right' type='submit' value='To Modify'></form></center><form action='./new.do' method='get'><center><input type='submit' value='New User'></center></form>");

out.println("<form action='./delete.do' method='get'><center><input type='hidden' value="+intEmpId+" name='empid'>");

out.println("<input align='right' type='submit' value='To Delete'></center></form>");

out.println("</body>");

out.println("</html>");

} else if (strServletPath.equalsIgnoreCase("/modify.do")) {

String strEmpId = request.getParameter("empid");
System.out.println("******* empid Is ******" + strEmpId);

int intempid=Integer.parseInt(strEmpId);

String strFstName = null;
String strLstName = null ;
String strEmpAdd = null ;
int intEmpPhoneNo = 0 ;
String strEmailId = null ;
String strStatus = null ;

ResultSet resultSet=null;
resultSet=statement.executeQuery("SELECT * FROM EMPLOYEE WHERE EMP_ID="+strEmpId);
while(resultSet.next())
{
//intEmpId1 = resultSet.getInt("EMP_ID");
strFstName = resultSet.getString("EMP_FIRSTNAME");
strLstName = resultSet.getString("EMP_LASTNAME");
strEmpAdd = resultSet.getString("EMP_ADDRESS");
intEmpPhoneNo = resultSet.getInt("EMP_PHONENO");
strEmailId = resultSet.getString("EMP_EMAILID");
strStatus = resultSet.getString("EMP_STATUS");
}

out.println("<html>");
out.println("<body bgcolor='orange'><h3>To Modify Anything Enter The Following</h3>");
out.println("<form action='./modifytable.do' method='get'>");
out.println("<table>");
out.println("<tr><td>EmpId</td> <td><input type='text' value="+strEmpId+" name='empid'></td> </tr>");
out.println("<tr><td>Enter First Name</td> <td><input type='text' value="+strFstName+" name='fstname'></td> </tr>");
out.println("<tr><td>Enter Last Name</td> <td><input type='text' value="+strLstName+" name='lstname'></td> </tr>");
out.println("<tr><td>Enter Address</td> <td><input type='text' value="+strEmpAdd+" name='address'></td> </tr>");
out.println("<tr><td>Enter PhoneNumber</td> <td><input type='text' value="+intEmpPhoneNo+" name='phone'></td> </tr>");
out.println("<tr><td>Enter EmailId</td> <td><input type='te"+ "xt' value="+strEmailId+" name" + "='emailid'></td> </tr>");
out.println("<tr><td>Enter Status</td> <td><input type='text' value="+strStatus+" name='status'></td> </tr>");
out.println("<tr><td colspan='1' align='center'><input type='submit' value='Click Here To Submit'></td></tr></table></form>");
out.print("<br><br> <a href='./empsumm.do'>Click Here To Go Employee Summery </a>");
out.println("<br><br><h3>DO You Want To Delete A Record.</h3><form action='./delete.do' method='get'><center><input type='hidden' value='"+intempid+"' name='empid'><input align='right' type='submit' value='To Delete'></center></form>");
out.println("</body><html>");

} else if (strServletPath.equalsIgnoreCase("/modifytable.do")) {

String strEmpId=request.getParameter("empid");
System.out.println("******VALUE OF EMPID IS*****" + strEmpId);

String strFirstName = request.getParameter("fstname");
String strLastName = request.getParameter("lstname");
String strAddress = request.getParameter("address");
String strPhoneNumber = request.getParameter("phone");
String strEmailId = request.getParameter("emailid");
String strStatus = request.getParameter("status");
int intPhoneNumber = Integer.parseInt(strPhoneNumber);

employeeDTO = new Employee();
EmployeeDataBase empDB = new EmployeeDataBase();
int intEmpId = Integer.parseInt(strEmpId);

System.out.println("******VALUE OF EMPID IS*****" + intEmpId);
employeeDTO = empDB.modifyEmployee(intEmpId, strFirstName,
strLastName, strAddress, intPhoneNumber, strEmailId,
strStatus);


boolean blnIsValid = false;
resultSet = statement.executeQuery("SELECT * FROM EMPLOYEE");
while (resultSet.next()) {
if ((strFirstName.equalsIgnoreCase(resultSet
.getString("EMP_FIRSTNAME")))
&& (strLastName.equalsIgnoreCase(resultSet
.getString("EMP_LASTNAME")))) {
blnIsValid = true;
break;
}

}
if (blnIsValid) {
out.println("<html>");
out.println("<body bgcolor='pink'>");
out.println("<h3>After Modification Your Personal Details As Follows :</h3>");
out.println("<br>Your Emp_id :"+ resultSet.getInt("EMP_ID"));
out.print("<br>Your First Name :" + strFirstName);
out.print("<br>Your Last Name :" + strLastName);
out.print("<br>Your Address :" + strAddress);
out.print("<br>Your Phone Number :" + strPhoneNumber);
out.print("<br>Your Email ID :" + strEmailId);
out.print("<br>Your Status :" + strStatus);
out.println("<br><br> <a href='./html/login.html'> Click Here To Go Home Page </a>");
out.println("<br><br> <a href='./empsumm.do'>Click Here To Go Employee Summery </a>");
out.println("</body></html>");
}
}

else if (strServletPath.equalsIgnoreCase("/delete.do")) {


String strEmpId = request.getParameter("empid");
System.out.println("******* empid in delete method Is ******" + strEmpId);

out.println("<html>");
out.println("<body bgcolor='skyblue'><form action='./rowdelete.do' method='get'>");
out.println("<h3>Are You Sure Want To Delete The Record....Where Emp_Id="+strEmpId+"</h3><input type='hidden' value='"+strEmpId+"' name='empid'><input type='submit' value='Yes'>");
out.println("<br><br> <a href='./empsumm.do'>Are Else Click Here To Go Employee Summery </a>");
out.println("</body></html>");

}
else if (strServletPath.equalsIgnoreCase("/rowdelete.do")) {
String strEmpId=request.getParameter("empid");

int intEmpId = Integer.parseInt(strEmpId);
EmployeeDataBase empDB = new EmployeeDataBase();
empDB.deleteRow(intEmpId);

out.println("<html>");
out.println("<body bgcolor='+9999-999123blue'><form action='rowdelete.do' method='get'>");
out.println("<h3>The Employee Details Completely Deleted!!!!!!!!</h3>");
out.println("<br><br> <a href='./html/login.html'> Click Here To Go Home Page </a>");
out.println("</body></html>");

}

} catch (SQLException e1) {
e1.printStackTrace();
} finally
{
if(resultSet!=null)
{
try {
resultSet.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
if(statement!=null){
try {
statement.close();
} catch (SQLException e) {
e.printStackTrace();
}

}
}

}

@Override
public void finalize() throws Throwable {

if(connection!=null)
{
try {
connection.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
}

//EmployeeDataBase.java

package com.antares.service;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;

import com.antares.To.Employee;
import com.antares.Util.DBUtil;


public class EmployeeDataBase {


Connection connection = null;
Statement statement = null;

public EmployeeDataBase() {
try {
connection = DBUtil.getOracleConnection();
statement = connection.createStatement();
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}

}

public Employee findEmployeeDetails(int pEmp_id) {
Employee dto1=null;
ResultSet resultSet = null;
try {
resultSet = statement.executeQuery("SELECT * FROM EMPLOYEE WHERE EMP_ID="+ pEmp_id);
while (resultSet.next())
{
dto1 = new Employee();
dto1.setIntEmpid(resultSet.getInt(1));
dto1.setEmp_fristName(resultSet.getString(2));
dto1.setEmp_lastName(resultSet.getString(3));
dto1.setEmp_address(resultSet.getString(4));
dto1.setEmp_phone(resultSet.getInt(5));
dto1.setEmp_email(resultSet.getString(6));
dto1.setEmp_status(resultSet.getString(7));
}

} catch (SQLException e) {
e.printStackTrace();
}

return dto1;

}

public ArrayList<Employee> findAllEmployees() {
ArrayList<Employee> arlEmployee=new ArrayList<Employee>();
ResultSet resultSet = null;
Employee dto=null;

try {
String strSql = "select * from employee";
resultSet = statement.executeQuery(strSql);
while(resultSet.next())
{
dto=new Employee();
dto.setIntEmpid(resultSet.getInt("EMP_ID"));
dto.setEmp_fristName(resultSet.getString("EMP_FIRSTNAME"));
dto.setEmp_lastName(resultSet.getString("EMP_LASTNAME"));
dto.setEmp_address(resultSet.getString("EMP_ADDRESS"));
dto.setEmp_phone(resultSet.getInt("EMP_PHONENO"));
dto.setEmp_email(resultSet.getString("EMP_EMAILID"));
dto.setEmp_status(resultSet.getString("EMP_STATUS"));
arlEmployee.add(dto);
}
} catch (SQLException e) {
e.printStackTrace();
}
return arlEmployee;

}

public Employee insertEmployeeDetails( String pstrFstname,
String pstrLstname, String pstrAddress, int pintPhoneno,
String pstrEmailid, String pstrStatus) {

ResultSet resultSet = null;
Employee employeeDTo=null;

try {

statement.executeUpdate("insert into employee values(employee_seq.nextval,'" + pstrFstname + "','" + pstrLstname
+ "','" + pstrAddress + "'," + pintPhoneno + ",'"
+ pstrEmailid + "','" + pstrStatus + "')");
resultSet =statement.executeQuery("SELECT * FROM EMPLOYEE");

while(resultSet.next())
{
employeeDTo=new Employee();
employeeDTo.setIntEmpid(resultSet.getInt("EMP_ID"));
employeeDTo.setEmp_fristName(resultSet.getString("EMP_FIRSTNAME"));
employeeDTo.setEmp_lastName(resultSet.getString("EMP_LASTNAME"));
employeeDTo.setEmp_address(resultSet.getString("EMP_ADDRESS"));
employeeDTo.setEmp_phone(resultSet.getInt("EMP_PHONENO"));
employeeDTo.setEmp_email(resultSet.getString("EMP_EMAILID"));
employeeDTo.setEmp_status(resultSet.getString("EMP_STATUS"));
}
} catch (SQLException e) {
e.printStackTrace();
}
return employeeDTo;
}

public Employee modifyEmployeePhoneNumber(int pintEmpid,int pintPhoneno) {
Employee employeeDTo = null;
ResultSet resultSet=null;
try {
statement.executeUpdate("update employee set emp_phoneno="+pintPhoneno+"where emp_id="+pintEmpid);
resultSet =statement.executeQuery("SELECT * FROM EMPLOYEE");

while(resultSet.next())
{
employeeDTo=new Employee();
employeeDTo.setIntEmpid(resultSet.getInt("EMP_ID"));
employeeDTo.setEmp_fristName(resultSet.getString("EMP_FIRSTNAME"));
employeeDTo.setEmp_lastName(resultSet.getString("EMP_LASTNAME"));
employeeDTo.setEmp_address(resultSet.getString("EMP_ADDRESS"));
employeeDTo.setEmp_phone(resultSet.getInt("EMP_PHONENO"));
employeeDTo.setEmp_email(resultSet.getString("EMP_EMAILID"));
employeeDTo.setEmp_status(resultSet.getString("EMP_STATUS"));
}
} catch (SQLException e) {
e.printStackTrace();
}
return employeeDTo;
}

public Employee modifyEmployeeAddress(int pintEmpid,String strAddress) {
Employee employeeDTo = null;
ResultSet resultSet=null;
try {
statement.executeUpdate("update employee set EMP_ADDRESS='"+strAddress+"' where emp_id="+pintEmpid);
resultSet =statement.executeQuery("SELECT * FROM EMPLOYEE");

while(resultSet.next())
{
employeeDTo=new Employee();
employeeDTo.setIntEmpid(resultSet.getInt("EMP_ID"));
employeeDTo.setEmp_fristName(resultSet.getString("EMP_FIRSTNAME"));
employeeDTo.setEmp_lastName(resultSet.getString("EMP_LASTNAME"));
employeeDTo.setEmp_address(resultSet.getString("EMP_ADDRESS"));
employeeDTo.setEmp_phone(resultSet.getInt("EMP_PHONENO"));
employeeDTo.setEmp_email(resultSet.getString("EMP_EMAILID"));
employeeDTo.setEmp_status(resultSet.getString("EMP_STATUS"));
}
} catch (SQLException e) {
e.printStackTrace();
}
return employeeDTo;
}

public Employee modifyEmployeeStatus(int pintEmpid,String pstrStatus) {
Employee employeeDTo = null;
ResultSet resultSet=null;
try {
statement.executeUpdate("update employee set EMP_STATUS='"+pstrStatus+"' where emp_id="+pintEmpid);
resultSet =statement.executeQuery("SELECT * FROM EMPLOYEE");

while(resultSet.next())
{
employeeDTo=new Employee();
employeeDTo.setIntEmpid(resultSet.getInt("EMP_ID"));
employeeDTo.setEmp_fristName(resultSet.getString("EMP_FIRSTNAME"));
employeeDTo.setEmp_lastName(resultSet.getString("EMP_LASTNAME"));
employeeDTo.setEmp_address(resultSet.getString("EMP_ADDRESS"));
employeeDTo.setEmp_phone(resultSet.getInt("EMP_PHONENO"));
employeeDTo.setEmp_email(resultSet.getString("EMP_EMAILID"));
employeeDTo.setEmp_status(resultSet.getString("EMP_STATUS"));
}
} catch (SQLException e) {
e.printStackTrace();
}
return employeeDTo;
}

public Employee modifyEmployee(int pintEmpid,String pstrFstName,String pstrLstName,String pstrAddress,int pintPhone,String pstrEmailid,String pstrStatus) {
Employee employeeDTo = null;
ResultSet resultSet=null;
try {
statement.executeUpdate("update employee set EMP_FIRSTNAME='"+pstrFstName+"',EMP_LASTNAME='"+pstrLstName+"',EMP_ADDRESS='"+pstrAddress+"',EMP_PHONENO="+pintPhone+",EMP_EMAILID='"+pstrEmailid+"',EMP_STATUS='"+pstrStatus+"' where emp_id="+pintEmpid);
resultSet =statement.executeQuery("SELECT * FROM EMPLOYEE");


while(resultSet.next())
{
employeeDTo=new Employee();
employeeDTo.setIntEmpid(resultSet.getInt("EMP_ID"));
employeeDTo.setEmp_fristName(resultSet.getString("EMP_FIRSTNAME"));
employeeDTo.setEmp_lastName(resultSet.getString("EMP_LASTNAME"));
employeeDTo.setEmp_address(resultSet.getString("EMP_ADDRESS"));
employeeDTo.setEmp_phone(resultSet.getInt("EMP_PHONENO"));
employeeDTo.setEmp_email(resultSet.getString("EMP_EMAILID"));
employeeDTo.setEmp_status(resultSet.getString("EMP_STATUS"));
}
} catch (SQLException e) {
e.printStackTrace();
}
return employeeDTo;
}

public void deleteRow(int pintEmpid)
{
@SuppressWarnings("unused")
ResultSet resultSet=null;
try {
statement.executeUpdate("delete employee where emp_id="+pintEmpid);
resultSet =statement.executeQuery("SELECT * FROM EMPLOYEE");
} catch (SQLException e) {
e.printStackTrace();
}

}
}


//login.html

<html>
<body bgcolor="blue">
<marquee bgcolor="violet">
<h2 dir="rtl">** Hello Welcome To **</h2>
</marquee>
<br>
<br>
<h1 align="center">Antares Systems Limited</h1>
<br>
<br>
<form action="../empsumm.do" method="get">
<center >
<input type="submit"value="Click To See Employee Summary ">
</center>
</form>
</body>
</html>


//Employee.java

package com.antares.To;

public class Employee {

int intEmpid;
String emp_fristName;
String emp_lastName;
String emp_address;
int emp_phone;
String emp_email;
String emp_status;



public int getIntEmpid() {
return intEmpid;
}
public void setIntEmpid(int intEmpid) {
this.intEmpid = intEmpid;
}
public String getEmp_fristName() {
return emp_fristName;
}
public void setEmp_fristName(String emp_fristName) {
this.emp_fristName = emp_fristName;
}
public String getEmp_lastName() {
return emp_lastName;
}
public void setEmp_lastName(String emp_lastName) {
this.emp_lastName = emp_lastName;
}
public String getEmp_address() {
return emp_address;
}
public void setEmp_address(String emp_address) {
this.emp_address = emp_address;
}
public int getEmp_phone() {
return emp_phone;
}
public void setEmp_phone(int emp_phone) {
this.emp_phone = emp_phone;
}
public String getEmp_email() {
return emp_email;
}
public void setEmp_email(String emp_email) {
this.emp_email = emp_email;
}
public String getEmp_status() {
return emp_status;
}
public void setEmp_status(String emp_status) {
this.emp_status = emp_status;
}


}

2.please tell me the how to do the delete().i done but it is accessing the last row employeeid ,so how to get the empid of which we are clicking to delete.

I m sending my full code ,please replay me.......

Advertisement
View Answers

Related Tutorials/Questions & Answers:
pagination problem - JSP-Servlet
(),my problem is that where i have to put & how to do pagination? my code...pagination problem  Thanks sir for posting the answer.But i have 2 problems 1.i have created one employee class in that i use getter and setter
pagination problem - JSP-Servlet
(),my problem is that where i have to put & how to do pagination? my code...pagination problem   Thanks sir for posting the answer.But i have 2 problems 1.i have created one employee class in that i use getter and setter
Advertisements
Checkbox pagination problem
Checkbox pagination problem  HI ., Following is my code test.jsp <%@page import="java.sql.*"%> <%@taglib prefix="c" uri="/WEB-INF/c-rt.tld" %> <%@page import="java.util.HashMap"%> <%@page import
Pagination
Pagination  How to apply pagination in JSP. Please help
Pagination
Pagination  How to implement pagination in struts using hibernate
pagination
pagination  How to set pagination using java script to display data
Pagination
Pagination  How to create pagination in jsp with EJB using MS SQL
Pagination
Pagination  I want to write one where condition in sql query in pagination concept
Pagination
Pagination  Is their plug n play approach for creating pagination? 1) Server side as well as client side
pagination
pagination   Simple way for pagination in jsp using java script to display data without send database
Pagination
Pagination  I want to know how to use pagination in jsp. I have a list object from that i want to display 3 questions per page can u help me
pagination
pagination  I need to give pagination with where condition (query="select * from qtn where qid='"+replyQuesionId+"'limit "+iPageNo+","+showRows+"" ) like this I want, without where condition it is working but with condition
pagination
code of pagination. In the given code,we have taken the database table student...;Pagination of JSP page</h3> <body> <form> <input type="hidden... for you.   here problem is that : suppose i have 10 questions and i
pagination
pagination  I need to give pagination with where condition (query.......   Here is a simple jsp pagination code where we have used mysql database...()) { totalRows=rs2.getInt("cnt"); } %> <html> <h3>Pagination of JSP
Pagination
=rs2.getInt("cnt"); } %> Pagination of JSP page Terr_Code Terr_Name
Pagination
Pagination  pagination in jsp   Hi Friend, Try the following code: <%@ page language="java" %> <%@ page import="java.sql.*" %>...()) { totalRows=rs2.getInt("cnt"); } %> <html> <h3>Pagination of JSP
pagination
pagination  how can i start pagination in jsp?   Hi Friend, Try the following code: <%@ page language="java" %> <%@ page import...;Pagination of JSP page</h3> <body> <form> <input type="hidden
Pagination in java
Pagination in java  How to handle pagination when there are records like say in millions in java? Or do we handle this using SQL? I as asked... far good performance then Java pagination. Thanks
jsp pagination
jsp pagination  I want to implement pagination on jsp page Each jsp page having some radio buttons, on click of next previous page selected radio buttons are reset. I want to maintain state of selected radio buttons on previous
pagination in jsf
pagination in jsf  Hi , i am implemeting an online exam system , i have placed my questions as an arraylist in my jsp file within tag , but now i want to paginate these questions based on respective questions by clicking
pagination in php - Ajax
pagination in php  i want to fetch my data base in view page...i hav done pagination... i don't want the order....like... 1 2 3 4... the problem in ordering please give me a solution..  Hi Friend, You
JSP Pagination
to be shown, I want to implement Pagination.. Can someone show me a sample code which I could possibly use??   JSP Pagination pagination.jsp: <%@ page..."); } %> <html><h3>Pagination of JSP page</h3> <body><
Hibernate Pagination
In this tutorial we will discuss concept of pagination in hibernate
jsf pagination
of pagination. In the given code,we have taken the database table student(rollNo,name,marks...()) { totalRows=rs2.getInt("cnt"); } %> <html> <h3>Pagination of JSP
Pagination in jsp - JSP-Servlet
Pagination in jsp  I need an example of pagination in JSP using display tag
Two Pagination in one page
Two Pagination in one page  hai friends any one help me. how do u make two pagination script in same page i'm used some ajax coding one pagination script is working but another pagination is not working please help me urgent
Pagination example with html code
Pagination example with html code  Hi, could u please provide pagination code with clear cut explanation. Thanks in advance
pagination in hibernate with jsp
pagination in hibernate with jsp  Hi, plz give me example on pagination .   Hi Friend, Visit Here Thanks
pagination - JSP-Servlet
pagination  Hi, could u tell me how i will handle pagination... friend, Simple pagination in jsp Simple pagination in JSP... Simple pagination in jsp Displaying Records
pagination in jsp - JDBC
pagination in jsp  Hi, I have millions of records in my oracle d... in advance...   Hi friend, This is simple code of pagination. Simple pagination in jsp
Pagination with condition using servlet or jsp
Pagination with condition using servlet or jsp  Hi, Thanks...")", Then I want perform the pagination based on the string value(I mean pagination with condition). My problem is first time five records will come(I mean 5 records
Pagination without using database in php
Pagination without using database in php  How can I show multiple images in multiple rows with pagination in php
pagination+dynamic pagesize+hibernate - Struts
pagination+dynamic pagesize+hibernate  pagination using hibernate with dynamic page size plzz heilp me
Pagination in PHP code - PHP
Pagination in PHP code  3.Pagination in PHP codeIs it possible to get the paging in PHP without database call? How will I show the image instead of numbering? any code that can help
Pagination Using Displaytag Lib
Pagination Using Displaytag Lib  I am using Struts 1.2 for my web based project. While using display tag lib in jsp for pagination, is there any substitute of using As I dont want to be dependent on any site(s). Please
Pagination - JSP-Servlet
Pagination  I want to display only 10 records but my arraylist contains for example about 100 records... My jsp page should contain 10 records along with the pagination below.... like prev 1 2 3 4 5 next I am using
Jsp pagination - JSP-Servlet
tell me the solution  Hi friend, For Jsp pagination application
Pagination Example
; In this section, you will learn how to create pagination in struts 2. For creating pagination in your application follows the certain steps: Download...;a href="roseindia/pagination.action">Pagination Example</a></li>
Paging or pagination - Development process
Paging or pagination  1.how to do paging or pagination in jsp using servlets? I have a 20 records ,i have to show them in 2 pages like pages 1 2...("Starting index is "+startIndex); %> Pagination The Following
pagination in hibernate with jsp
pagination in hibernate with jsp  Hi, plz give me example on pagination .   Hi Friend, We have used MySql database with JSP...>Pagination of JSP page</h3> <body> <form> <input type
dynamic pagination in jsp - JSP-Servlet
dynamic pagination in jsp  i am unable to display the data in multiple pages. I am gettting data from the database from the javaBeans to jsp by vectors... but i am unable to displaying them in jsp 15 records per page
store pagination form fields - Struts
store pagination form fields   hi,iam working online exams project . my intention is to save data that has been asnwered by client/student into db table. here iam using pagination for questions to be displayed to client
Hibernate Criteria Pagination
Hibernate Criteria Pagination You can easily make a pagination based application in Hibernate Criteria. You need to do the things that set first result...(end); An example of hibernate criteria pagination is given below
Pagination in jsp using oracle and not sql
Pagination in jsp using oracle and not sql  I need the code for pagination in jsp using oracle. I already tried it with rownum between instead... Pagination using Mysql database <%@ page language="java" %> <%@ page
pagination in JSP - JSP-Interview Questions
pagination in JSP  Hi! Everybody.. I am new to JSP. I am doing project using JSP. Everything is OK. When i am displaying the data from ResultSet. I am getting bulk data in the same page. Ex:ExecuteQuery("select * from
In pagination how to hilight the links - JSP-Servlet
In pagination how to hilight the links  Dear Sir, Thanks for posting the answer,its working fine.Now i want google or others like pagination ,in that if i click on a number only that number color will be changed like
write a java program for pagination which will be configured by end user
write a java program for pagination which will be configured by end user  write a java program for pagination which will be configured by end user... Pagination
 

 

 

DMCA.com