How To Convert Properties File Into XML File Using Java?

xml

In my previous tutorials I have explained about how to use DOM Parser and SAX Parser. This tutorial explain with very simple utility method available in the Java package used for converting your existing properties file to a XML file. Sometimes this may be the requirement for Java developers, instead of manually converting properties file […]

How to Parse XML file using SAX Parser?

xml

In my previous article I had written the example program for parsing a simple XML file using the DOM parser. As I have mentioned in the earlier posts, DOM and SAX are the two popular parser used for reading and manipulating the XML files. If you use any of the XML utility like JAXB for […]

How to Parse XML file using DOM Parser?

xml

In this tutorial I will write a simple example program for parsing a XML file using the DOM parser. DOM parser reads the entire XML file and loads into the memory. It forms a tree structure in the memory and returns the element details when queried. It is the faster when comparing to the SAX […]

Difference Between @Resource, @Autowired and @Inject in Spring Injection

spring

It is very common confusion among the spring developers that what is the real difference between these three (@Resource, @Autowired and @Inject) annotations used for injecting the objects. I have come across this question from our readers so dedicated this post for explaining the main difference between these three annotations. Infact, these three work very […]

Configure Multiple View Resolvers in Spring MVC

spring

In my previous tutorial I have explined about content negotiation startegy introduced in Spring MVC 3.2. This tutorial focuses on how to configure multiple view resolvers for your spring web application. We have different view resolvers for different purposes : XmlViewResolver, ResourceBundleViewResolver, and InternalResourceViewResolver. XmlViewResolver: An implementation of ViewResolver that accepts a configuration file written […]

How to use Spring HATEOAS LinkBuilder API with Spring REST?

springhateoas_thumbnail

Hypermedia as the Engine of Application State (HATEOAS) is a constraint for the REST architecture. If you are not familiar with the REST web services, REST is services exposed using an URI that is shared to the clients. A client can directly access that given URI to get the response which is mostly a JSON […]

Parsing a vCard file to generate a CSV file with the required data

mobile_thumbnail

Off late I have been juggling between a Nokia Symbian phone and an Android phone. The issue which I was facing while I juggled between the phones is the availability of contacts across both the devices. My Android phone had all the contacts which I wanted to be transferred to the Symbian phone as well. […]

Flash Attributes in Spring MVC 3.1

spring

Spring 3.1 has added new feature called flash attributes. This is one of the most wanted feature from the spring developers. This solves the problem occured when POST/Redirect/Get pattern in the request. When user makes a request to the server via POST method, once the process is completed, the requested resourced will be served through […]

A Simple Factory For Collections Using Varargs

java

Suppose you want to create a list object in Java and populate it with some default elements, how would you go about coding it? One will pursue one of the following approaches: (If you have any other approach feel free to share them via the comments and we will update the post accordingly). In the […]

Content Negotiation in Spring MVC 3.2

spring

In this tutorial I will explain about the Content Negotiation in Spring MVC 3.2. This concept is already in the spring framework, but it is enhanced with easy and efficient resolution of views. Prior to Spring 3.2, @ResponseBody used “AcceptHeader” for identifying the response type. This tutorial will helps you to understand the concept behind the […]