xml 代码
- //============ the file name: D:\workspace\dweb\WebContent\index.jsp\index.jsp
- <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Insert title here</title>
- </head>
- <body>
- <font size=20> this is the index page..</font>
- welcome to the page.
- </body>
- </html>
- //============ the file name: D:\workspace\dweb\WebContent\input.jsp\input.jsp
- <%@ taglib uri="webwork" prefix="ww"%>
- <%@page import="java.util.List"%>
- <%@page import="java.util.ArrayList"%>
- <html>
- <head>
- <title>Register Example</title>
- </head>
- <body>
- <ww:i18n name="'messages'">
- <ww:text name="'xname'" />
- </ww:i18n>
- <%=request.getSession().getAttribute("user")%>
- <table border="0" cellspacing="0" cellpadding="1">
- <tr>
- <th>Days of the week</th>
- </tr>
- <p />
- <%
- List list = new ArrayList();
- list.add("111111111111");
- list.add("222222222222");
- list.add("444444444444");
- %> <ww:iterator value="list">
- <tr>
- <td><ww:property /></td>
- </tr>
- </ww:iterator>
- </table>
- <hr>
- <table border=0 width=97%>
- <tr>
- <td align="left"><ww:form action="helloWebWorld.action"
- method="POST" enctype="multipart/form-data" validate="true">
- <ww:textarea name="name" label="'Name'" />
- <ww:file label="'File'" name="file" />
- <ww:textfield label="%{getText('xname')}" name="user.username"
- required="true" />
- <ww:textfield label="Password" name="user.password" required="true" />
- <ww:textfield label="VerifyPassword" name="verifyPassword"
- required="true" />
- <ww:textfield label="Email" name="user.email" required="true" />
- <ww:textfield label="Age" name="user.age" required="true" />
- <ww:submit value="Submit" />
- </ww:form></td>
- </tr>
- </table>
- </body>
- </html>
- helloWebWorld.action
- //============ the file name: D:\workspace\dweb\WebContent\META-INF\MANIFEST.MF\MANIFEST.MF
- Manifest-Version: 1.0
- Class-Path:
- //============ the file name: D:\workspace\dweb\WebContent\test-success.jsp\test-success.jsp
- <%@ taglib uri="webwork" prefix="ww" %>
- <html>
- <head>
- <title>WebWork Tutorial - Lesson 3 - Example 1</title>
- </head>
- <body>
- the webwork action>>>>>>>><br>
- <ww:property value="hello" />
- <ww:if test=""></ww:if>
- <ww:url></ww:url>
- </body>
- </html>
- //============ the file name: D:\workspace\dweb\WebContent\wait.jsp\wait.jsp
- <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
- <%@ taglib prefix="ww" uri="/webwork"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="refresh"
- content="3;url=<ww:url includeParams="all" />" />
- <title>Please wait</title>
- </head>
- <body>
- the processing please wait..
- </body>
- </html>
- //============ the file name: D:\workspace\dweb\WebContent\WEB-INF\web.xml\web.xml
- <?xml version="1.0"?>
- <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd">
- <web-app>
- <display-name>My WebWork Application</display-name>
- <!-- <filter>-->
- <!-- <filter-name>container</filter-name>-->
- <!-- <filter-class>-->
- <!-- com.opensymphony.webwork.lifecycle.RequestLifecycleFilter-->
- <!-- </filter-class>-->
- <!-- </filter>-->
- <!-- <filter-mapping>-->
- <!-- <filter-name>container</filter-name>-->
- <!-- <url-pattern>*.action</url-pattern>-->
- <!-- </filter-mapping>-->
- <listener>
- <listener-class>
- com.opensymphony.webwork.lifecycle.SessionLifecycleListener
- </listener-class>
- </listener>
- <listener>
- <listener-class>
- com.opensymphony.webwork.lifecycle.ApplicationLifecycleListener
- </listener-class>
- </listener>
- <!-- ================================================================= -->
- <servlet>
- <servlet-name>webwork</servlet-name>
- <servlet-class>
- com.opensymphony.webwork.dispatcher.ServletDispatcher
- </servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>webwork</servlet-name>
- <url-pattern>*.action</url-pattern>
- </servlet-mapping>
- <taglib>
- <taglib-uri>webwork</taglib-uri>
- <taglib-location>/WEB-INF/lib/webwork-2.2.jar</taglib-location>
- </taglib>
- </web-app>