||Struts 1.x 2.x | Spring | Strips | Wicket | Tapestry | Seam | JSF | RIFE | DWR | DOJO | EXT | Jquery | Json | Prototype | Hibernate | iBatis | web 2.0 | www.siva2baba.com & shivababa@gmail.com
  FrameWorks Theater


   -->what is Webwork
  --->Key Principles    
  --->Developer point of View
  ---> step by step Develpement
  --->Example program --http://siva2baba.diinoweb.com

WebWork is a Java web-application development framework. It is built specifically with developer productivity and code simplicity in mind, providing robust support for building reusable UI templates, such as form controls, UI themes, internationalization, dynamic form parameter mapping to JavaBeans, robust client and server side validation, and much more.

WebWork is a Model-View-Controlled type of framework. This means it separates logic from view and simplifies Web development by using a powerful "action" concept on the server side.

Developer point of View:

       -> "webwork framework littlebit closer to struts 1.x"
        -> "compare struts 1.x and webwork my choice is
             web work"
        -->" strus 1.x + webwork =struts 2.0"

Step by step Development:


 jars required to set up a WebWork web application


xwork.jar- XWork library on which WebWork is built

 commons-logging.jar- Commons logging, which WebWork uses to support transparently logging to
either Log4J or JDK 1.4+

oscore- OSCore, a general-utility library from OpenSymphony

velocity-dep.jar- Velocity library with dependencies

ognl.jar- Object Graph Navigation Language (OGNL), the expression language used

throughout WebWork


xml congiguraton Files required to set up a WebWork web application



xwork.xml-- WebWork configuration file that defines the actions, results, and interceptors

for your application




J2EE web application configuration file that defines the servlets, JSP tag libraries, and so on for your web application






| |---xwork.xml

  |-- ch2.example1.HelloWorld.java

  |--- webwork.properties


| |---webwork-2.1.7.jar, xwork.jar, oscore.jar, ognl.jar, ...



You must first add the following entry to web.xml:







The next step is to map the servlet to a URL pattern. The pattern you choose can

be anything you want, but the most typical pattern is *.action. You can configure

the pattern the servlet will match by adding the following to web.xml:





Finally, in order to use WebWork’s tag library, you must add an entry to web.xml

indicating where the tag library definition can be found:1










webwork.objectFactory = spring

webwork.devMode = true


Creating the xwork.xml configuration file



<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.0//EN"



<include file="webwork-default.xml"/>

<package name="default" extends="webwork-default">

<default-interceptor-ref name="completeStack"/>

<action name="helloWorld"


<result name="success">JspFolde/hello.jsp</result>






<%@ taglib prefix="ww" uri="webwork" %>



<title>Hello Page</title>



The message generated by my first action is:

<ww:property value="message"/>





package ch2.example1;

import com.opensymphony.xwork.Action;

public class HelloWorld implements Action {

private String message;

public String execute() {

message = "Hello, World!n";

message += "The time is:n";

message += System.currentTimeMillis();

return SUCCESS;


public String getMessage() {

return message;









java org.apache.axis.wsdl.WSDL2Java <URLofWSDL> -p <package_name> -o <DIR>

import java.sql.*;

import java.io.*;


class LoadDriver


            public static void main(String[] args)


                        try {

                        // The newInstance() call is a work around for some

                        // broken Java implementations



                                    Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/first","gunjan","gunjan");

                                    // Do something with the Connection



                                    Statement sel = conn.createStatement();

                                    ResultSet rs = sel.executeQuery("select * from people");




                                                System.out.println(rs.getString(1) + " " + rs.getString(2));                       



                        catch (Exception ex)


                        ex.printStackTrace();// handle the error





  Today, there have been 2 visitors (10 hits) on this page! www.siva2baba.com & shivababa@gmail.com  
=> Do you also want a homepage for free? Then click here! <=
||Struts 1.x 2.x | Spring | Strips | Wicket | Tapestry | Seam | JSF | RIFE | DWR | DOJO | EXT | Jquery | Json | Prototype | Hibernate | iBatis | web 2.0 | http://siva2baba.diinoweb.com/files/ and www.siva2baba.com