Archive for ‘Java’

Monitor your file system using Java 7 Watcher Service

Monitor your file system using Java 7 Watcher Service

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...

Full Post

Learn JdbcRowSet, CachedRowSet and WebRowSet using Oracle

Learn JdbcRowSet, CachedRowSet and WebRowSet using Oracle

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...

Full Post

How to Detect Ajax Request using Java Servlet?

How to Detect Ajax Request using Java Servlet?

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...

Full Post

Let’s Implement J2EE Application Controller Design pattern today

Let’s Implement J2EE Application Controller Design pattern today

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...

Full Post

Consuming RESTful Web Service using jQuery Ajax Client

Consuming RESTful Web Service using jQuery Ajax Client

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...

Full Post

How Strategy Pattern help in reducing code duplication, avoid type casting and make design Better

How Strategy Pattern help in reducing code duplication, avoid type casting and make design Better

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...

Full Post

RESTful java web service with XML Response

RESTful java web service with XML Response

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...

Full Post

How to create simple REST web service using jersey

How to create simple REST web service using jersey

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...

Full Post

How to upload mp3 songs using Apache commons File Upload?

How to upload mp3 songs using Apache commons File Upload?

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...

Full Post

Declare Servlet 3.0 Initialization parameter using @WebInitParam

Declare Servlet 3.0 Initialization parameter using @WebInitParam

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...

Full Post

Copyright © 2017 TechZoo - Technology Blog. All rights reserved.
Proudly powered by WordPress. Developed by 7Tech Solutions