submited by krishnas on Tue Sep 21st, 2010
java
I recorded a four-part podcast series with Kristina Halvorson, moderated by Mike Moran. We had a great time. We talked about the content strategy around created, curated and aggregated content. I wanted to expound on a point in this article, on which I didn’t have time to elaborate during the podcast series....
more »
submited by krishnas on Wed Sep 8th, 2010
struts
In this tutorial we will see how to create a simpe Struts 2 Hello World Application. The following files are needed to create a Hello World Application. ...
more »
submited by krishnas on Wed Sep 8th, 2010
struts
We will learn annotations in struts 2 using the hello user example. In this example we will get the user name and display a welcome message to the user. There are two versions of this example, in the first one we will see how to do this by using the intelligent defaults provided by the struts 2 framework. We will not do any configuration in this example except the deployment descriptor.
The example is created using ecilpse. The war file of this example is also provided at the end of this tutorial so that you can try it yourself.
So lets start, you need to have the following jar files in the WEB-INF/lib directory....
more »
submited by krishnas on Wed Sep 8th, 2010
struts
A framework tries to automate the common tasks and provides a platform for the users to build applications quickly.
Struts 2 is based on the OpenSymphony Web Works Framework.
Struts 2 framework implements the Model-View-Controller (MVC) design pattern....
more »
submited by krishnas on Thu May 22nd, 2008
spring
In the past, I posted a few examples of implementing Messaging using J2EE and Spring. This post will describe how to use the Spring MessageListenerAdapter to enable any Java class to act as a Message Driven POJO. This can be used to enable existing applications to use Asynchronous Messaging. Follow these steps to run the...
more »
submited by krishnas on Thu May 22nd, 2008
j2me soa
Previously, I wrote a post describing the use of Apache Axis to create and consume Web Services from Java. In this post, I will describe how to use JAX-WS to create and consume web services. I used Glassfish application server for this application. The Web service and the Web Service client are both web applications....
more »
submited by krishnas on Thu May 22nd, 2008
spring j2me soa
In the past, I wrote a post on how to implement Web Services using JAX-WS on Glassfish, and Apache Axis. In this post I will describe how to implement Web Services using the Spring framework and Apache Axis. The spring framework uses JAX-RPC API to help implement and access SOAP-WSDL based Web Services. The main components required for implementing and accessing Web Services in Spring are:...
more »
submited by krishnas on Thu May 22nd, 2008
spring struts
In the past, I posted an example on how to use Displaytag with Struts and Spring, using Spring JDBC for data access(1, 2). In this post, I will describe how to do the same using Struts 2.0. The only major step that needs to be done here is to override the default Struts 2.0 OjbectFactory. Changing the ObjectFactory to Spring give control to Spring framework to instantiate action instances etc. Most of the code is from the previous post, but I will list only the additional changes here....
more »
submited by krishnas on Thu May 22nd, 2008
j2ee
In a previous post, I described how to implement Messaging in Java EE 5 using annotation. This post is an extension of that post to describe how to implement Messaging in Java EE 5 using a deployment descriptor. To implement this, you can use the same client that was described in the other post. The only change needed is in the MDB part. Here's how to implement a Message Driven bean using the deployment descriptor....
more »
submited by krishnas on Thu May 22nd, 2008
google-guice
Google Guice is an open source Dependency Injection framework from Google. Guice is based on annotations and generics unlike Spring which depends on XML of Java for wiring dependencies. Guice injects constructors, fields and methods (any methods with any number of arguments, not just setters). Guice provides support for custom scopes, static member injection, Spring as well as Struts 2.x integration and AOP Alliance method interception. Guice is available at Google Code. You can find the User guide and Javadocs from there. This post describes how I implemented a simple Web application using Guice. For injecting dependencies into Servlets, I used a Listener (this idea was from Hani Suleiman in the Guice developer mailing list). Follow these steps to run the example....
more »