Blog Archives
1 … 21 22 23 24 25 26 27 28 29 30

Java logging beginner tutorial with slf4j and Apache commons logging

Slf4j is indeed just a logging facade so that one can you can plug in his/her own logging frameworks like java.util.logging, log4j, Apache commons logging, and logback. Native implementation of slf4j is logback. Step 1: Create a new Maven based Java project.

Step 2: Import this project into eclipse...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


Java OpenCSV tutorial to work with CSV files

BeanIO is an open source Java framework for marshaling and marshaling Java beans from a flat file, stream, or simple String object. It is very powerful with support for XML, CSV, delimited and fixed length stream formats, Object binding, filed validation, integration with spring-batch, etc. But there are scenarios where you need to simply read or write CSV data,

…

Read more ›



Java project with packages & jar file dependency without an IDE & build tool tutorial

Step 1: Create the following folders

1. c:\projects\learn-java is the “project folder“.

2. com\mycompany1\main & com\mycompany1\service are the “packages” under the project.

…

Read more ›



Java to marshal & unmarshal middle of an XML (i.e. a node inside XML) with JAXB

This means handle a middle of an XML document (i.e. a node in middle of an XML), and use JAXB to marshal & unmarshal. The two key words are “JAXBElement” and “javax.xml.stream.XMLStreamReader” to accomplish this as shown below. Marshal a Car object to XML fragment Assume that “Car” … Read...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


javap for debugging and better understanding some Java concepts with 3 practical examples

The javap is a class file dissembler. Here are 3 scenarios you can put javap to use with code examples.

#1 Finding the Java version of the class file within a jar

Extract a class file say “MyJobRunner.class” from a jar file and use javap to find out the version used

“major version: 51”

…

Read more ›



JAXB with Spring ORM for marshaling tutorial

This extends Basic JAXB tutorial with Maven & XSD – 1 to marshall with Spring OXM and Spring XML.

Right mouse click on target/generated-sources and select “Build Path –> Use as Source Folder”

Step 1: add spring-orm to use JAXB and spring-xml to use StringResult.

…

Read more ›



JAXB with Spring ORM for unmarshaling tutorial

This extends Basic JAXB tutorial with Maven & XSD – 1 to unmarshal with Spring OXM and Spring XML.

The Spring & JAXB marshaling tutorial used XML based config to inject the “jaxb2Marshaller”, but in this to make things a bit more interesting, let’s use “Java”

…

Read more ›



JDBC Tutorial with HSQLDB

This assumes that you have gone through the basic “SQL tutorial with HSQLDB”. This tutorial extends the SQL tutorial by using JDBC (Java Data Base Connectivity) to programmatically connect to the database,  write data to the database, and read data from the database.  This is also known as the CRUD operations,...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


JMeter beginner tutorial

This tutorial performance test the RESTFul web service we created ealier as part of the “RESTful Web Service Tutorial with Apache CXF, Maven, and Eclipse” with JMeter. JMeter is an opensource performance testing tool.

Step 1: Download latest release version of Apache JMeter from “http://jmeter.apache.org/download_jmeter.cgi“,

…

Read more ›



JMeter for performance testing REST services with BeanShell

This post extends 8 JMeter Performance testing Interview Q&As to cover JSON HTTP post. Now a days, a single page interactive web sites are very popular, and they post JSON based data back to the server to create a new record or to update an existing record. Step 1: Firstly,...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


JSF tutorial: JSF2.0, eclipse, and maven

This tutorial is an extension to the previous “simple web tutorial”. In this tutorial, JSF is used to create a simple greeting web application to run on the Tomcat server. It also demonstrates how Maven brings in the relevant dependent JAR files. Step 1: Firstly, … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


Learning to write functional programming with Java 8 with examples

Scenario 1:  The Operation interface with the annotation @FunctionalInterface. This annotation ensures that you can only have a single abstract method. You can have additional default and static method implementations. Step 1: Define the interface. … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


Logging and auditing in Java with Spring AOP

Auditing can be done in Servlet filters to log requests and responses, you can add interceptors in many frameworks, and AOP (Aspect Oriented Programming) allows you to add cross cutting concerns as described in this tutorial with Spring and AOP. Step 1: Create a new Maven based Java project. …...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


1 … 21 22 23 24 25 26 27 28 29 30

300+ Java Interview Questions - FAQs

Tutorials on Java & Big Data