Skip to main content


Showing posts from October, 2015

Getting started with Restful web service in java using jersey

Creating Restful web services in java is not a difficult task. You just use some annotation to expose you methods as web service end points. All annotations those turn your method into web services are in package. To host you web service, you can use tomcat or any web server. One thing you need to do is, configure the jersey ServletContainer servlet in web.xml for the particular url pattern. See the following example depicting the calculator service. package  pack; import URI ; import URISyntaxException ; import; import; import; import; import; import; @ Path ( "/cal" ) public   class  CalculatorResource  {     @GET     @ Produces ( "text/plain" )      public   String   getDate ()   {          return   "Server date:"   +   new  java.util. Date () ;      }     @GET     @ Path

Overview of Spring Framework

Spring framework is the platform which supports for developing java applications using its infrastructure (Physical and organizational structures). Spring allows you to develop application with simple plan old java objects (POJO). Spring takes care of managing objects and their lifecycle. This framework provides the stage for your objects to play their role and all dependencies the objects depend on are provided at that time whenever required. Spring framework integrates your objects to create an application and make them independent from each other. Spring connects all objects being maintained by it by injecting their reference in each other as per requirements. Spring able to manage various common requirements for your application like database connection, transactions, emailing, orm, aop etc. For example, if you imagine a calculator application which has the following objects to accomplish its functionality: Keyboards Display Adder Subs tractor Divider Mult