You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Preface

This site is geared towards developers that have an understanding towards certain technologies. Before diving into how Webwork works and running demos, it is recommended that you review the concepts below:

  • Java
  • Servlets, JSP, and Tag Libraries
  • JavaBeans
  • HTML and HTTP
  • Web Containers (ex. Tomcat)
  • XML

Distribution Download and Information Resources

Download Webwork Distribution

You can download the full WebWork distribution here. It contains the webwork.jar file as well as full documentation, sources, all required and optional dependent libraries and examples. For more information on how to build WebWork from source or even checkout from CVS, please refer to Building Webwork.

Information and Project Resources

This site is set up with many features. Here are links to help you around:

Distribution Quickstart

Overview

The distribution contains the following directory layout:

docs/
lib/
src/
src/java/template/
webapps/
README.txt
build.properties
build.xml
webwork-(VERSION)-src.jar
webwork-(VERSION).jar
webwork.jar

The docs directory contains the current Javadocs, the full user documentation including the document you are reading, taglib documentation, as well as Clover, JUnit and dependency reports for the build.

The lib directory contains the required as well as the optional dependencies for Webwork, organized in subdirectories to represent different optional configurations and thereby induced Dependencies:

lib/
      ajax/
      build/
      default/
      fileupload/
      fileupload-cos/
      fileupload-pell/
      freemarker/
      jasperreports/
      jfree/
      portlet/
      quickstart/
      sitemesh/
      spring/
      velocity/
      xslt/

Note that none of the optional packages are required to use Webwork. If you wish to use certain features such as JasperReports and FreeMarker results, you must include the optional packages.

Webwork also comes packaged with all the source files and the templates for the JSP tags.

Running demos with QuickStart

WebWork provides a quick way to get started called QuickStart. QuickStart is essentially a combination of a few technologies, including the possibility to run web applications such as the provided examples out of the box with a stripped Jetty container.

With that, running the demos is as easy as can be. You just need to call

java -jar webwork.jar quickstart:<application-name>

from the distribution's top directory, whereby <application-name> is to be replaced by one of the subdirectory names under webapps/, representing the various supplied demo applications. So if you want to start the shopping cart example, just type on your commandline

java -jar webwork.jar quickstart:shopping-cart

The packaged examples are:

ajax

Demonstration of the AJAX Features of WebWork

portlet

Demonstration of WebWork porlet integration (to be deployed in a Portal Server)

shopping-cart

Nice example application demostrating various aspects of WebWork

showcase

Demonstration of tag features and some best practices

starter

Web application template, meant as an easy starting point for developing applications with WebWork

wwia

The Ceveat Emptor example from "WebWork in Action" book

Read Quickstart documentation to learn more about how it works and how you can utilize it for your own applications.

Running Demos with Your Favorite Webcontainer

TODO: Review / comment lastest changes

In order to run webwork applications and demos, you need to have a servlet/jsp engine. If you don't, we suggest you learn about Apache Tomcat, which is a free Servlet container from the Apache Jakarta Project, or Resin, from Caucho Technology, which is free for non-comercial use. Once you a Servlet container setup, you can install the webwork example applications (*.war) and any other demos by placing the .war file inside the containers webapp directory. Example of location with tomcat:

<TOMCAT_HOME>/webapps/webwork-example.war

After the war file is in the correct location, start your web container and access your application through a web browser with the following url.

*http://*??HOST:PORT??*/webwork-example*

Your first WebWork Application

Using the Starter Template

TODO: Document

Setting up from Scratch

TODO: Review

The following illustrates how your web application should be set up. Copy the webwork-(VERSION).jar, all the *.jar files in /lib/core and any necessary optional *.jar files in /lib/optional to your webapp/lib directory. If you need to customize your own templates (how HTML is rendered from webwork UI tags), copy the /src/java/template directory into your webapp/ directory. Your webapp should look similar to this:

/mywebapp/
/mywebapp/template/
/mywebapp/META-INF/
/mywebapp/WEB-INF/
/mywebapp/WEB-INF/classes/
/mywebapp/WEB-INF/lib/
/mywebapp/WEB-INF/lib/CORE&OPTIONAL *.jar
/mywebapp/WEB-INF/web.xml

Onward to Configuration or the Webwork Tutorial

  • No labels