Search This Blog

Friday, January 29, 2010

Jasper iReport

>> Download iReport
>> Set Data Source Connection
>> Take table and select report style
>> Execute The report
>> Save that ".jrxml" file in any location.
>> use related jar file to compile

Java Program

package com.abi;

import javax.swing.*;

import java.sql.Connection;
import java.sql.DriverManager;

import net.sf.jasperreports.engine.*;

public class MyiReportViewer extends JFrame

public MyiReportViewer ( )


public static void main ( String args[] )

MyiReportViewer viewer = new MyiReportViewer ();

Class.forName ( "com.mysql.jdbc.Driver" );
Connection con = DriverManager.getConnection ( "jdbc:mysql://localhost/test", "root", "root" );

JasperDesign jasperDesign = JasperManager.loadXmlDesign("E:/drvijay/IReport/First.jrxml");
JasperReport jasperReport = JasperManager.compileReport(jasperDesign);
JasperPrint jasperPrint = JasperManager.fillReport(jasperReport, null, con);
JasperExportManager.exportReportToHtmlFile(jasperPrint, "E:/drvijay/IReport/First.html" );
//JasperExportManager.exportReportToPdfStream(jasperPrint, outputStream );
System.out.println ( "success" );

catch ( Exception sqle )
sqle.printStackTrace ();


Wednesday, January 27, 2010

RIA [ Rich Internet Applications ]

Rich Internet Applications (RIAs) are web applications that have most of the characteristics of desktop applications, typically delivered either by way of a standards based web browser, via a browser plug-in, or independently via sandboxes or virtual machines.[1] Examples of RIA frameworks include Ajax, Curl, GWT, Adobe Flash/Adobe Flex/AIR, Java/JavaFX,[2] Mozilla's XUL, OpenLaszlo and Microsoft Silverlight.[3]

These are web application that have characteristics of desktop applications.Rich Internet applications (RIAs) offer a rich, engaging experience that improves user satisfaction and increases productivity. Using the broad reach of the Internet, RIAs can be deployed across browsers and desktops.The key difference between RIAs and other Internet applications is the amount of interaction in the interface. In a traditional page-based Internet application, interaction is limited to a small set of standard controls such as checkboxes, radio buttons, form fields and buttons. This severely limits our ability to create usable and engaging applications, and most Internet applications have been clumsier and more difficult to use than their desktop counterparts.


Flex 2
Windows Presentation Foundation (WPF)


JavaFX is a rich client platform for building cross-device applications and content. Designed to enable easy creation and deployment of rich Internet applications (RIAs) with immersive media and content, the JavaFX platform ensures that RIAs look and behave consistently across diverse form factors and devices.

Download and install the current release of JavaFX 1.2.1 SDK :

IDE Plugin :

Eclipse :

Further Details :

Tuesday, January 26, 2010

Web Service with Tomcat

//with tomcat



1. axis2.war from [ ] deploy into tomcat

2. extract into d:\axis2-1.5.1-bin

3. set environment






1. service program


d:\temp\aaxis\com\abi> edit

package com.abi;

public class HelloWorld {

public String sayHello(String name) {

return "Hello " + name;



2. services.xml


d:\temp\aaxis\META-INF> edit services.xml

      This is my first service, which says hello
   <parameter name="ServiceClass">com.abi.HelloWorld</parameter>
   <operation name="sayHello">

3. D:\temp\aaxis> jar cvf HelloWorld.aar *

4. copy that HelloWorld.aar into tomcat/webapps/axis2/WEB-INF/services

5. restart tomcat

6. http://localhost:8080/axis2/

7. http://localhost:8080/axis2/services/listServices

8. http://localhost:8080/axis2/services/HelloWorld?wsdl //copy this url

9. D:\temp\aaxis>wsdl2java -uri http://localhost:8080/axis2/services/HelloWorld?wsdl -o client

10. write client program

d:\temp\aaxis\client\src\com\abi> edit

package com.abi;
import com.abi.*;
import com.abi.HelloWorldStub.SayHello;
public class Test {
public static void main(String[] args) throws Exception {
HelloWorldStub stub = new HelloWorldStub();
//Create the request

com.abi.HelloWorldStub.SayHello request = new com.abi.HelloWorldStub.SayHello();

request.setArgs0("vijay Kumar");
//Invoke the service
com.abi.HelloWorldStub.SayHelloResponse response = stub.sayHello(request);
System.out.println("Response : " + response.get_return());

11. compile with auto generate ant via wsdl2java tool

D:\temp\aaxis\client> ant
(manual) D:\temp\aaxis>edit build.xml

<?xml version="1.0" encoding="UTF-8"?>
<project name="antwsdl2java" default="gen" basedir=".">
<path id="axis2.classpath">
<fileset dir="D:/temp/axis2">
  <include name="**/*.jar" />
<target name="gen">
  <taskdef name="axis2-wsdl2java" classname="org.apache.axis2.tool.ant.AntCodegenTask" classpathref="axis2.classpath" />
  <axis2-wsdl2java wsdlfilename="http://localhost:8080/axis2/services/HelloWorld?wsdl" output="d:/temp/aaxis" />

// RUN Manual Script and write the client program and then do steps for execute
D:\temp\aaxis> ant

12. //Execute the client

D:\temp\aaxis\build\classes>java -Djava.ext.dirs=D:/axis2-1.5.1/lib/ com.abi.Test

Friday, January 22, 2010

List of Java Framework

Echo Cocoon Millstone OXF
Struts SOFIA Tapestry WebWork
RIFE Spring MVC Canyamo Maverick
JPublish JATO Folium Jucas
Verge Niggle Bishop Barracuda
Shocks TeaServlet wingS Action Framework
Expresso Bento jStatemachine jZonic
OpenEmcee Turbine Scope Warfare
JWAA Jaffa Jacquard Macaw
Smile MyFaces Chiba JBanana
Jeenius JWarp Genie Melati
Dovetail Cameleon JFormular Xoplon
Japple Helma Dinamica WebOnSwing
Nacho Cassandra Baritus Stripes
Click GWT

Thursday, January 7, 2010

Open Source Web Frameworks in Java

Tapestry is a powerful, open-source, all-Java framework for creating leading edge web applications in Java.

Apache Cocoon is a web development framework built around the concepts of separation of concerns and component-based web development.

MyFaces is an implementation of JavaServer(tm) Faces (JSR 127), a new and upcoming web application framework that accomplishes the MVC paradigm


Spring is a layered Java/J2EE application framework, based on code published in Expert One-on-One J2EE Design and Development.

Google Web Toolkit
Google Web Toolkit (GWT) is a Java software development framework that makes writing AJAX applications like Google Maps and Gmail easy for developers who don't speak browser quirks as a second language.

Turbine is a servlet based framework that allows experienced Java developers to quickly build secure web applications.


WebOnSwing is a revolutionary multiple environment application framework that allows you to create web applications in the same way you develope a desktop one. You dont need to use JSP files, special tags, XML files, requests, posts, etc.

ThinWire is a development framework that allows you to easily build applications for the web that look and feel like the desktop applications you're familiar with.

Induction is a powerful, high performance, Java MVC web application framework. Induction supports dynamic application reloading, type-based dependency injection and dependency analysis between models, views and controllers.


jZeno is an open source java development framework that offers the ability to develop rich web applications.

Aurora is an open-source MVC framework that is aimed at writing configurable, fully object-oriented form controllers using the Spring Framework.

Vroom is a framework for HTML/JSP and Java code binding. It's extremely simple to use and very powerful. It can control your HTML widgets on the fly. It can be applied independently as JSP/Servlet Model or can be integrated with Struts, JSF, YUI etc. No custom tags, no complex configurations, just simple binding configuration file and backing beans.

The core of the Struts framework is a flexible control layer based on standard technologies like Java Servlets, JavaBeans, ResourceBundles, and XML, as well as various Jakarta Commons packages. Struts encourages application architectures based on the Model 2 approach, a variation of the classic Model-View-Controller (MVC) design paradigm.

a nice alternative to struts like framework you do not need to write a single HTML line

Wicket is a Java web application framework that takes simplicity, separation of concerns and ease of development to a whole new level. Wicket pages can be mocked up, previewed and later revised using standard WYSIWYG HTML design tools. Dynamic content processing and form handling is all handled in Java code using a Swing-like component model backed by POJO data beans that can easily be persisted with Hibernate.


Swingweb is an implementation of AWT toolkit that enables AWT/Swing application to be operating inside a web container and presented as a web application to the web browser, purely in HTML/CSS/javascript.

JSPWidget is a JSP Framework that provides event-driven,view state retained,server-side GUI controls to make JSP development as intuitive as in traditional client forms or in client-based Web applications.

XML / Java Framework to develop J2EE business applications rapidly and easily. It is based in business components defined with XML. Feature rich and flexible since is used for years to create real business applications.

ZK is an AJAX-based, event-driven, XUL-compliant, all Java framework for enabling Web applications to have the rich user experiences. With intuitive event-driven model, you represent your application in feature-rich XUL components, and manipulate these components by listening to events triggered by users, as simple as you did for years in desktop applications. No JavaScript. No replication of business logic at the clients. No proprietary components. No compilation. ZK works with existent frameworks and technologies, such as JSF and Portals, so the pace of adapting it is all under your control.

ztemplates is a framework for creating web-applications based on Java 1.5. Features:

* new and unique action processing module
* clean, technology agnostic urls
* fully JSP, Velocity and AJAX compatible

Aranea Web Framework

Aranea is an Open Source (APL 2.0) Java Hierarchical Model-View-Controller Web Framework that provides a common simple approach to building the web application components, reusing custom or general GUI logic and extending the framework.


RSF is an open source web programming framework, with roughly the scope of Sun's JSF. RSF is written in Java, and is built on the Spring framework. RSF features a pure-HTML templating engine named IKAT,

Flower framework

A minimalistic framework that helps you in converting your Spring beans into HTTP-accessible controllers using one servlet and a few additional lines in your XML application context. This framework uses Extensible XML authoring feature available in Spring and allows you to expose the bean using just one additional XML attribute on your bean.


Spring focuses around providing a way to manage your business objects.

Spring is an ideal framework for test driven projects

Applications built using Spring are very easy to unit tes

Spring can make the use of EJB an implementation choice, rather than the determinant of

application architecture. You can choose to implement business interfaces as POJOs or local

EJBs without affecting calling code

Spring provides a consistent framework for data access

this consistency in the Spring approach to JDBC, JMS, JavaMail, JNDI and many other important


Spring's main aim is to make J2EE easier to use and promote good programming practice

no logging packages in Spring, no connection pools, no distributed transaction coordinator

Spring container manages relationships between objects

Dependency Injection is a form of IoC that removes explicit dependence on container API, two

major flavors of Dependency Injection are Setter Injection (injection via JavaBean setters);

and Constructor Injection (injection via constructor arguments)

highly configurable MVC web framework

Spring's MVC model is most similar to that of Struts, although it is not derived from Struts

Spring Controller is similar to a Struts Action in that it is a multithreaded service object

Spring provides a very clean division between controllers, JavaBean models, and views

Spring MVC is truly view-agnostic. You don't get pushed to use JSP if you don't want to; you

can use Velocity, XLST or other view technologies

custom view mechanism - for example, your own templating language - you can easily implement

the Spring View interface to integrate it

Hit Counter

View My Stats