JTable Pagination in Java JDBC and MySQL Database

Here we will see how to develop JTable Pagination in java. We will use JDBC prepared statement and MySQL Database. We used NetBeans IDE and Jdk 1.8 to develop this project. Our Project Structure is as below To develop this project we used Book Example. Project Development Steps are 1 Create Table in MySQL Database … Read more

html/jsp page response in ajax get method

We want to get an entire page as ajax response by using jquery get method. Steps: 1) First create pages(FirstJsp.jsp and SecondJsp.jsp) 2) call jquery get method to get ajax response in one page(here FirstJsp.jsp to get SecondJsp.jsp) 3)Configure struts.xml file Lets start with page creating FirstJsp.jsp

SecondJsp.jsp

Struts.xml

Output

how to return array, arraylist, object from a method in java

In Java we can create methods to do specific work and many times we have to return results from java method. A java method can return any datatypes or object type from method. 1 Return primitive datatypes from method A Returning int long float double values from a java method A. Return a integer value … Read more

HTML Table rowspan and colspan

HTML Table rowspan and colspan are useful to use multiple rows and columns. HTML ROW SPAN In HTML, the rowspan attribute is used to specify how many rows a table cell should span or cover vertically within an HTML table. It is an attribute that can be applied to <td> (table data) or <th> (table … Read more

Jtable in Java Swing Example defaulttablemodel cell color

JTable in Java is a swing component, that is used to show data in a two-dimensional Grid. Here we will discuss JTable Java Swing Example with various parameters It is used to display and edit data in cell format in table How to create login form in java swing Constructors of JTable in Java Swing … Read more

Increment and decrement operators in Python (+=, -=)

INCREMENT AND DECREMENT OPERATORS IN PYTHON If you’re acquainted with other programming languages like C, Java, or PHP, you’ll recognize that the ++ symbol represents two operators: the increment and decrement operators, respectively. The increment and decrement operators are not available in Python.  This may seem strange, but in Python you would write + = … Read more

How to get multiple parameters in ServletContext

index.html

web.xml

ServletContext.java

Results Read More How to access ServletContext parameters How to access ServletConfig initial parameter value

Gson parse json array with example

Gson parses JSON array meaning to Parsing JSON array with Google Gson library. Follow these steps to read JSON Array To read jsonString as an array we use the following syntax Gson gson=new Gson(); ElementType [] refVar=gson.fromJson(jsonString,ElementType[].class); To read jsonString as List TypeToken is used to find the type of class List eList=(List)gson.fromJson(reader, new TypeToken(){}.getType()); … Read more

How to insert data in MySql Using JSP Servlet & JDBC

Here we will insert data in MySQL using JSP Servlet and JDBC. Here We will fetch Data from the JSP page and pass it to Servlet then DAO which contains JDBC code to store data in the MySQL database. How To Get Data From Database To Servlet Jdbc JSP Technology used Steps for Data insertion … Read more

Employee Management System JSP Servlet Project

org. comp.model Employee Model – Employee.java

Employee Controller Servlet added org.comp.controller package is used for controller AddEmployee.Java

FetchEmployee.java

UpdateEmployee.java

showEmployee.java

DeleteEmployee.java

Data Access Object ConnectionFactory.java

EmployeeDAO.java

HTML Pages ListEmployees.jsp

AddEmployee.jsp

UpdateEmployee.jsp

menu.jsp

footer.jsp