Java version 7 added feature to watch File System or Moniter Folder and give an alert if any changes made into folders like the creation of file , modification of file and deletion of files. The watch service API introduced in java 7 NIO.2 JSR 203 as thread safe service ,which is capable of...
Just as DataSource objects provide an alternative to DriverManager, RowSet objects provide an alternative to ResultSet objects. The RowSet interface extends the ResultSet interface, giving you the same functionality for viewing and manipulating data plus extra functionality that makes it a flexible and powerful object to use in your applications. A RowSet object enables...
Nowadays Developers across the world uses JavaScript frameworks like jQuery UI, ExtJs, Dojo to develop Rich Internet Applications (RIA). This JavaScript framework uses Asynchronous calls (Ajax Request) to get data from server in Json format. On server side we have plenty of frameworks like spring, Struts which can handle Asynchronous and synchronous request. In...
I was reading Santosh Sir’s article on application controller pattern last night. Those who have some understanding on J2EE design pattern know the different between Front Controller and Application controller pattern. Struts 1.x is a best example of both. You can read the Santosh Sir’s article on Front Controller and Application controller pattern. So...
In my lost post on RESTful web service I demonstrate how we can send XML response using RESTful web service. I also teach who to create web service client using java. Now let’s see how to create jQuery Ajax Client to consume web service XML response. Before proceeding I recommend you to go through...
Yesterday I was trying to refactor some code which has lots of code duplication, static type casting between sub types and cohesive. After some refactoring I decided to use java’s strategy design pattern to remove code duplication and make it extendable. The motive behind using strategy pattern was to move behavior out of the...
In my previous post I discuss about how to write a simple REST web service using jersey, today we discuss more on it and demonstrate how you can create custom java class with JAXB and deal with XML response using jersey. Let’s first create eclipse Java EE project and add all depending jersey jar...
In this tutorial I will demonstrate you what Rest is and how to develop a simple rest web service in java using jersey. Before moving forward let see what rest is. REST stands for Representational State Transfer. (It is sometimes spelled “ReST”.) It relies on a stateless, client-server, cacheable communications protocol which uses HTTP...
In many java based web based applications developer need to implements file upload. Before Servlet 3.0 specification, servlet doesn’t support file upload and developer need to use third party library like apache common’s file upload. To know more about how to use servlet 3 for file upload, please visit my servlet 3 file upload...
Servlet initialization parameters are used to process the data when servlet initializing. Before servlet 3, this data need to put on deployment descriptor and servlet will read the data in init() method using ServletConfig Object. For every servlet, the data is unique and not been shared in between of two servlets. Before Servlet 3...