Blog Archives

♥ Creating a simple Java Web project with Maven – part 1

Java beginners to create a simple web application (i.e. a Web ARchive file — i.e. a war file). Prerequisite is that you have set up Java, Maven, and Eclipse.  Step 1: Execute the Maven maven-archetype-webapp command to create the Maven web structure with the following command on a DOS command prompt.

Read more ›

Posted in JEE Web & Web Services Tutorial
Tags:

01: JAXB Tutorial for XML processing in Java step by step – unmarshall & marshall

Step 1: Create a Java Maven project. Import the “simple-jaxb” folder that has the pom.xml it into eclipse as an “existing maven project”. Step 2: Modify the “pom.xml” file to look like as shown below. The “maven-jaxb2-plugin” generates JAXB annotated Java objects from the XML schema “books.xsd”. These objects JAXB

Read more ›

Posted in JAXB Tutorial

01: JDBC with MySQL Beginner Tutorial Step by Step

This assumes that MySQL database is setup as per the tutorial Getting started with MySQL database beginner tutorial and ⏯ MySQL database beginner video tutorial. Step 1: Create a maven based Java project from a command-line. Step 2: Import the project into Eclipse as “File” –> “Import” –> “Existing Maven

Read more ›

Posted in JDBC Tutorial

01a: ♥⏯ JDBC with MySQL Beginner Video Tutorial

Related Links 1. JDBC with MySQL Beginner Tutorial Step by Step. Extends ⏯ MySQL database beginner video tutorial JDBC Interview Q&As 1. 12 FAQ JDBC interview questions and answers. 2. JDBC Overview Interview Questions and Answers.

Posted in ► Videos on persistence (JDBC, JPA, Hibernate, MySQL DB), JDBC Tutorial
Tags:

02: JAXB with StAX Tutorial step by step for unmarshalling

This tutorial extends JAXB Tutorial for XML processing in Java step by step – unmarshall & marshall When to use JAXB with StAX? When you want to process large XML files, reading the whole file into memory can cause “OutOfMemoryError” as discussed in Java String & Array limitations and OutOfMemoryError

Read more ›

Posted in JAXB Tutorial

02: JDBC with MySQL, Datasource, and connection pool Tutorial

Step 1: pom.xml file with commons-dbcp2 for the connection pooling and abstraction layer for the datasource. db.properties for connection details Step 2: Create a new source folder “src/main/resources”. Step 3: Define the MySQL database “learnjavadb” connection properties in a new file named “db.properties” under “src/main/resources”. Using the “MysqlDataSource” Step 4:

Read more ›

Posted in JDBC, JDBC Tutorial

02a: ⏯ JDBC with MySQL, Datasource, Connection Pool, and Prepared Statements Video Tutorial

Related Links 1. JDBC with MySQL, Datasource, and connection pool Tutorial. 2. JDBC with MySQL and PreparedStatements Tutorial. Extends ⏯ MySQL database beginner video tutorial ▶ JDBC with MySQL Beginner Video Tutorial JDBC Interview Q&As 1. 12 FAQ JDBC interview questions and answers. 2. JDBC Overview Interview Questions and Answers....

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home
Posted in ► Videos on persistence (JDBC, JPA, Hibernate, MySQL DB), JDBC Tutorial, member-paid

03: JAXB with StAX Tutorial step by step for marshalling

This tutorial extends JAXB Tutorial for XML processing in Java step by step – unmarshall & marshall When to use JAXB with StAX? When you want to process large XML files, reading the whole file into memory can cause “OutOfMemoryError” as discussed in Java String & Array limitations and OutOfMemoryError…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home
Posted in JAXB Tutorial, member-paid

03: JDBC with MySQL and PreparedStatements Tutorial

Step 1: Add an additional method to save data. Step 2: Implementation making use of a “PreparedStatement”. Step 3: Finally, the JdbcExample.

Posted in JDBC Tutorial

04: JAXB tutorial with XSD & binding.xjb

Step 1: Create a “simple-jaxb” project using Maven Step 2: Import the project into eclipse with File –> Import –> Existing Maven Projects and choose your folder you just created with pom.xml file “simple-jaxb”. Step 3: select “src/main/resources” right click and select Build Path –> Source Folder to create schema…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home
Posted in JAXB Tutorial, member-paid

Apache HTTPClient POST request sample code

This extends the Apache HTTPClient Tutorial to invoke RESTFul service with a POST request. The pom.xml The client using HttpClient & JAXBContext The “JAXBContext” is from the Java 6 onwards. The sample code includes 1) Exception handling. 2) “BasicCredentialsProvider” is used for the basic authentication. 3) “JAXBContext” is used for

Read more ›

Posted in JEE Web & Web Services Tutorial

Apache HTTPClient Tutorial to invoke RESTFul service

Apache HttpClient to invoke a RESTful Web Service. This is a GET request, and in the next post will extend this to use an HTTP POST with basic authentication. Step 1: Create a Maven project say “httpRestClient”. Just press enter for all the prompts. Step 2: Import the above “httpRestClient”

Read more ›

Posted in REST Client Tutorial

Creating a simple Java Web project with Maven – part 2 (Understanding war and pom.xml )

“Creating a simple Java Web project with Maven – part 1” covered developing a simple Java web application using Maven. This part is all about understanding the war and pom files. 1. The lib directory Q. How did the servlet-api-2.5.jar get into the WEB-INF/lib folder? A. You need to understand…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home
Posted in JEE Web & Web Services Tutorial, member-paid

Creating a simple Java Web project with Maven – part 3 (with eclipse & m2e plugin)

“Creating a simple Java Web project with Maven – part 1” covered developing a simple Java web application using Maven. “Creating a simple Java Web project with Maven – part 2 (Understanding war and pom.xml)” elaborated on war and pom.xml. In this post, let’s cover how eclipse interacts with Maven.…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home
Posted in JEE Web & Web Services Tutorial, member-paid

Exposing a Java class as a MXBean (or MBean) tutorial with jconsole

You can take a Java POJO (i.e. Plain Old Java Object) and expose it as an MBean, and view or modify values via JMX. In this tutorial, we will use jconsole, which is a JMX client. Step 1: Create a new Maven based Java project. Step 2: Import it into…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home
Posted in JMX Tutorial, member-paid
Page 1 of 212

800+ Java Q&As – ♥Free | ♦FAQs

open all | close all

100+ Java Tutorials – Step by step

open all | close all

How good are your

open all | close all