First we need understand some concepts. Let’s go. What is a thread pool ? It is a manager thread type … More
Category: java
[Java] – How to check how many processors have available?
Below is the code for you check it : public class QtyProcessorsTest { public static void main(String[] args) { Runtime runtime = … More
[Java] – Spring and dateformatter
We will perform it in our application configuration class(AppWeb Configuration), so that we don’t need to keep repeating this date … More
[Java] – How to validate a form using validation of Spring?
Below is an example: First, look the method that we will use to save the object that the user filled … More
[Java] – Spring – How to configure a messages file ?
The file with messages will be : messages.properties Implement the method in AppWebConfiguration.class: @Bean public MessageSource messageSource() { ReloadableResourceBundleMessageSource messageSource = new … More
[Java] -How to use JAX-B to parse XMLfiles ?
What is it? JAX-B is the Java specification that allows us to directly associate a class to an XML file, … More
[Java] -How to use XSLT files ?
What is it? XSLT files are files that help us to transform XML files into other formats such as html … More
[Java] – How to use XPath to parse XML files?
What is it ? The xPath allows us to select only a part of our document using a very similar … More
[JAVA] – How to use a StAX to parse a XML file ? You can get a list with all data.
What is it ? The StAX, which has a very similar operation with SAX. It is also based on events, … More
[JAVA] – How to use SAX to parse a XML file?
First you need implement the class where you will specify the attributes of your file. Look the code below. public … More