Struts BaseTag Sample

wty814022051 2010-04-24 12:16:42
In this example you will learn how to use Struts HTML Tags. In order to use the Struts HTML Tags you need to include the following taglib directive in the jsp page.

1.<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
All the Struts HTML tags should be nested within the body of the <html:form /> tag. We will create a simple feedback form to see how the different Struts HTML Tags can be used. The feedback.jsp contains the following code.

01.<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
02.<html>
03.<head>
04.<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
05.<title>Feedback Form</title>
06.</head>
07.<body>
08.<b>Feedback Form</b>
09.<hr>
10.<html:form action="https://youtubeproxy.org/default.aspx">
11.<table>
12. <tr>
13. <td>
14. Name :
15. </td>
16. <td>
17. <html:text name="feedbackForm" property="name" />
18. </td>
19. </tr>
20. <tr>
21. <td>
22. Sex :
23. </td>
24. <td>
25. <html:radio name="feedbackForm" property="sex" value="M" >
26. M </html:radio>
27. <html:radio name="feedbackForm" property="sex" value="F" >
28. F </html:radio>
29. </td>
30. </tr>
31. <tr>
32. <td>
33. Comments :
34. </td>
35. <td>
36. <html:textarea cols="20" rows="5" name="feedbackForm"
37. property="comments" />
38. </td>
39. </tr>
40. <tr>
41. <td>
42. <html:submit />
43. </td>
44. <td>
45. <html:reset />
46. </td>
47. </tr>
48.</table>
49.</html:form>
50.</body>
51.</html>
The name attribute of the HTML tag contains the Form Bean name. The property attribute of the HTML Tag contains the corresponding Form property.

Once the feedback is submitted by the user, the user will be forwarded to the success page. Here the feedback submitted by the user will be displayed. We use Struts Bean Tag do to this. We use Struts Logic Equal Tag to display Male if the user has selected M for sex and Female if the user has selected F for sex. In order to use the Struts Bean and Logic Tag you need to include the following taglib directives in the jsp page.

1.<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
2.<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
The success.jsp page contains the following code.

01.<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
02.<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
03.<html>
04.<head>
05.<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
06.<title>Feedback Form</title>
07.</head>
08.<body>
09.<b>Feedback Successfully Submitted.</b><br>
10.You have submitted the following feedback.
11.<table>
12. <tr>
13. <td>
14. Name :
15. </td>
16. <td>
17. <bean:write name="feedbackForm" property="name" />
18. </td>
19. </tr>
20. <tr>
21. <td>
22. Sex :
23. </td>
24. <td>
25. <logic:equal name="feedbackForm" property="sex" value="M"> Male </logic:equal>
26. <logic:equal name="feedbackForm" property="sex" value="F"> Female </logic:equal>
27. </td>
28. </tr>
29. <tr>
30. <td>
31. Comments :
32. </td>
33. <td>
34. <bean:write name="feedbackForm" property="comments" />
35. </td>
36. </tr>
37.</table>
38.</body>
39.</html>
On executing the example the following page will be dispalyed to the user.
...全文
115 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
WinDirStat - Directory Statistics
Copyright (c) 2003-2005 Bernhard Seifert. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

Shows where all your disk space has gone, and helps you clean it up.

You know the problem: The hard disk is almost full, and you don't know, where the big files actually are lying, which occupy all the space. They may well be hidden in sub-sub-directories. To find out this by means of the Windows Explorer, is tiring: you would have to expand and collapse directories over and over or view the "Properties" of the directories, which always count just the size of a single subtree. It's hard to form a mental image of the hard disk usage in this way. This is where WinDirStat helps.

On start up WinDirStat opens the Select Drives Dialog. Press the OK button.

Then WinDirStat reads in the whole directory tree once (this can last some minutes depending on the hard disk size) and then presents it in three useful views:

WinDirStat
Directory List Extension List
Treemap

The views are coupled with each other.

You can clean up the hard disks with several Cleanups.

The views and the User Defined Cleanups can be configured according to your personal needs.

Sorting

Legend

Frequently Asked Questions

Limits

Deinstallation

GNU Free Documentation License
  • 打赏
  • 举报
回复
你搞啥?
内容概要:本文聚焦于高维多阶段随机规划问题,深入研究了正则化分解方法与马尔可夫过程在刻画不确定性动态演化中的应用,并提供了完整的Python代码实现。通过引入正则化技术有效降低了高维随机优化问题的计算复杂度,结合马尔可夫链建模多阶段决策过程中的不确定性传播机制,提升了模型在复杂动态环境下的求解效率与鲁棒性。研究涵盖了问题建模、算法设计、数值求解及结果分析全过程,具有较强的理论深度与工程实践价值; 适合人群:具备一定运筹学、优化理论基础及Python编程能力,从事智能决策、人工智能、能源系统优化、金融工程等相关领域的科研人员、高校研究生以及工业界研发工程师; 使用场景及目标:①应用于电力系统调度、供应链管理、金融资产配置等存在多阶段不确定性的复杂决策场景;②掌握高维随机规划的建模思路与高效求解技术,深入理解正则化方法与马尔可夫过程在实际优化算法中的融合机制与实现路径; 阅读建议:建议结合提供的Python代码进行动手实践,重点关注算法实现细节、参数敏感性分析与收敛性验证,鼓励在不同应用场景中迁移和改进该方法,进一步探索其在分布鲁棒优化、动态规划等前沿方向的扩展潜力。
内容概要:本文系统研究了离散时间线性系统中基于共识的分布式滤波器的稳定性与最优性问题,深入探讨了KF(卡尔曼滤波)、DKF(分布式卡尔曼滤波)、SMDKF(基于平方根的最大熵分布式卡尔曼滤波)、CI(协方差交叉)、ICF(信息共识滤波)和HCMCI(基于高阶交叉协方差的信息融合)等多种滤波算法的理论基础、数学推导与实现机制。通过Matlab平台构建多传感器网络仿真环境,实现了各类算法在不同噪声统计特性和通信拓扑结构下的状态估计仿真,重点分析了各算法在估计精度、收敛速度、鲁棒性及一致性方面的性能差异,并对融合策略中的协方差传播、信息权重分配与共识迭代过程进行了细致对比,旨在为复杂环境下多智能体系统的分布式状态估计提供可复现的技术方案与理论支撑。; 适合人群:具备控制理论、信号处理、线性系统理论及Matlab编程基础的研究生、科研人员,以及从事多传感器融合、分布式估计算法开发、无人系统导航与智能电网监控等领域的工程技术人员。; 使用场景及目标:① 掌握主流分布式滤波算法的核心思想与数学建模方法;② 在多节点传感网络中实现高效可靠的状态估计;③ 对比分析不同共识融合策略在非理想通信条件下的性能表现;④ 支持学术论文复现、算法改进与工程化验证,服务于科研创新与系统优化设计。; 阅读建议:建议结合Matlab代码逐模块解析算法实现流程,重点关注状态预测、局部更新、信息融合与一致性达成的关键步骤;可通过调整系统噪声、观测噪声、网络连接拓扑等参数开展扩展性仿真实验,深入理解算法的稳定边界与最优性条件,进一步探索其在实际应用场景中的适应性与改进空间。

5,657

社区成员

发帖
与我相关
我的任务
社区描述
Web开发应用服务器相关讨论专区
社区管理员
  • 应用服务器社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧