webwork jsp

xml 代码
 
  1. //============ the file name: D:\workspace\dweb\WebContent\index.jsp\index.jsp  
  2. <%@ page language="java" contentType="text/html; charset=ISO-8859-1"  
  3.     pageEncoding="ISO-8859-1"%>  
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
  5. <html>  
  6. <head>  
  7. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">  
  8. <title>Insert title here</title>  
  9. </head>  
  10. <body>  
  11. <font size=20> this is the index page..</font>  
  12.   
  13. welcome to the page.  
  14. </body>  
  15. </html>  
  16. //============ the file name: D:\workspace\dweb\WebContent\input.jsp\input.jsp  
  17. <%@ taglib uri="webwork" prefix="ww"%>  
  18. <%@page import="java.util.List"%>  
  19. <%@page import="java.util.ArrayList"%>  
  20. <html>  
  21. <head>  
  22. <title>Register Example</title>  
  23. </head>  
  24. <body>  
  25. <ww:i18n name="'messages'">  
  26.     <ww:text name="'xname'" />  
  27. </ww:i18n>  
  28. <%=request.getSession().getAttribute("user")%>  
  29.   
  30. <table border="0" cellspacing="0" cellpadding="1">  
  31.     <tr>  
  32.         <th>Days of the week</th>  
  33.     </tr>  
  34.     <p />  
  35.     <%  
  36.         List list = new ArrayList();  
  37.         list.add("111111111111");  
  38.         list.add("222222222222");  
  39.         list.add("444444444444");  
  40.     %> <ww:iterator value="list">  
  41.         <tr>  
  42.   
  43.   
  44.             <td><ww:property /></td>  
  45.   
  46.         </tr>  
  47.     </ww:iterator>  
  48. </table>  
  49.   
  50. <hr>  
  51.   
  52. <table border=0 width=97%>  
  53.     <tr>  
  54.         <td align="left"><ww:form action="helloWebWorld.action"  
  55.             method="POST" enctype="multipart/form-data" validate="true">  
  56.   
  57.             <ww:textarea name="name" label="'Name'" />  
  58.             <ww:file label="'File'" name="file" />  
  59.   
  60.             <ww:textfield label="%{getText('xname')}" name="user.username"  
  61.                 required="true" />  
  62.             <ww:textfield label="Password" name="user.password" required="true" />  
  63.             <ww:textfield label="VerifyPassword" name="verifyPassword"  
  64.                 required="true" />  
  65.             <ww:textfield label="Email" name="user.email" required="true" />  
  66.             <ww:textfield label="Age" name="user.age" required="true" />  
  67.             <ww:submit value="Submit" />  
  68.         </ww:form></td>  
  69.     </tr>  
  70. </table>  
  71. </body>  
  72. </html>  
  73.   
  74. helloWebWorld.action  
  75.   
  76. //============ the file name: D:\workspace\dweb\WebContent\META-INF\MANIFEST.MF\MANIFEST.MF  
  77. Manifest-Version: 1.0  
  78. Class-Path:   
  79.   
  80.   
  81. //============ the file name: D:\workspace\dweb\WebContent\test-success.jsp\test-success.jsp  
  82. <%@ taglib uri="webwork" prefix="ww" %>   
  83. <html>   
  84. <head>   
  85. <title>WebWork Tutorial - Lesson 3 - Example 1</title>   
  86. </head>   
  87. <body>   
  88. the webwork action>>>>>>>><br>  
  89. <ww:property value="hello" />  
  90. <ww:if test=""></ww:if>  
  91. <ww:url></ww:url>  
  92. </body>   
  93. </html>  
  94. //============ the file name: D:\workspace\dweb\WebContent\wait.jsp\wait.jsp  
  95.   
  96. <%@ page language="java" contentType="text/html; charset=ISO-8859-1"  
  97.     pageEncoding="ISO-8859-1"%>  
  98. <%@ taglib prefix="ww" uri="/webwork"%>  
  99. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
  100. <html>  
  101. <head>  
  102. <meta http-equiv="refresh"  
  103.     content="3;url=<ww:url includeParams="all" />" />  
  104. <title>Please wait</title>  
  105. </head>  
  106. <body>  
  107. the processing please wait..  
  108. </body>  
  109. </html>  
  110.   
  111. //============ the file name: D:\workspace\dweb\WebContent\WEB-INF\web.xml\web.xml  
  112. <?xml version="1.0"?>  
  113. <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"  
  114. "http://java.sun.com/dtd/web-app_2_3.dtd">  
  115.   
  116. <web-app>  
  117.     <display-name>My WebWork Application</display-name>  
  118. <!--    <filter>-->  
  119. <!--        <filter-name>container</filter-name>-->  
  120. <!--        <filter-class>-->  
  121. <!--            com.opensymphony.webwork.lifecycle.RequestLifecycleFilter-->  
  122. <!--        </filter-class>-->  
  123. <!--    </filter>-->  
  124. <!--    <filter-mapping>-->  
  125. <!--        <filter-name>container</filter-name>-->  
  126. <!--        <url-pattern>*.action</url-pattern>-->  
  127. <!--    </filter-mapping>-->  
  128.         <listener>  
  129.             <listener-class>  
  130.                 com.opensymphony.webwork.lifecycle.SessionLifecycleListener  
  131.             </listener-class>  
  132.         </listener>  
  133.         <listener>  
  134.             <listener-class>  
  135.                 com.opensymphony.webwork.lifecycle.ApplicationLifecycleListener  
  136.             </listener-class>  
  137.         </listener>  
  138.     <!-- ================================================================= -->  
  139.     <servlet>  
  140.         <servlet-name>webwork</servlet-name>  
  141.         <servlet-class>  
  142.             com.opensymphony.webwork.dispatcher.ServletDispatcher  
  143.         </servlet-class>  
  144.         <load-on-startup>1</load-on-startup>  
  145.     </servlet>  
  146.     <servlet-mapping>  
  147.         <servlet-name>webwork</servlet-name>  
  148.         <url-pattern>*.action</url-pattern>  
  149.     </servlet-mapping>  
  150.     <taglib>  
  151.         <taglib-uri>webwork</taglib-uri>  
  152.         <taglib-location>/WEB-INF/lib/webwork-2.2.jar</taglib-location>  
  153.     </taglib>  
  154.   
  155. </web-app>  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值