Category: Java
How to properly declare a field as deprecated in Java
Deprecated? Deprecated means that a class or method is no longer important, and will be suspended from the API. A class or method can evolve during its lifetime, methods signature change, new ones are...
Generic Object toString method using reflections in Java
Here is an example of a generic object toString method using reflections in java. I recently was working on a project where we had to log every transaction to act as an audit. We...
How to Calculate File Checksum MD5, SHA in Java
A checksum is used to ensure the integrity of a file after it has been transmitted from one storage device to another. It is a way to ensure that the transmitted file is exactly...
JSF Validate Length Input Field Example
This tutorial shows how to use f:validateLenght JSF Validate Length Input Field validate. This validator validates if an input field has the specified length. This element takes two attributes minimum and maximum to configure...
JSF Validate Required Field Example
In this example we will show how to validate required field in JSF. When a user submits a form and you want to make sure a field has a value you can put some...
Deploy JAXWS application on Tomcat Example
In this tutorials we will show you how to deploy a JAXWS application on tomcat. You need to package your JAXWS Web Services as a war project. You can achieve this in maven by...
JAXWS Handler Chain Intercept incoming outgoing messages
In this tutorial we create a basic JAX-WS web service with a handler chain. SOAP Handlers are similar to Servlet Filters or EJB/CDI Interceptor. They can intercept and alter incomming and outgoing SOAP messages....
Selenium Record Video with JUnit in Java
In this example we show you how you can record a video of selenium test cases in java. This way you can watch how your selenium tests are performing. If you sun your selenium...
Taking a Selenium ScreenShot with JUnit in Java
In this example we will show you how you can take a selenium screenshot whenever you desire. Selenium has a built in ScreenShot function. This allows the developer to take screenshots of the selenium...