Struts BaseTag Sample

wty814022051 wty814022051 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
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.
...全文

相关推荐

29Linux基础命令详解——用户管理.docx

29Linux基础命令详解——用户管理

云计算练习生

科技服务机构如何通过数据分析增强服务竞争力?.docx

科易网基于40亿+科创知识图谱数据库,深度探索AI技术在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,研究科技创新领域的AI+数智化解决方案,推动科技创新与产业创新智能化发展。

BIZKEEN

车辆缺陷分割数据集4000张json格式.zip

数据集格式:labelme格式(不包含mask文件,仅仅包含jpg图片和对应的json文件) 图片数量(jpg文件个数):4000 标注数量(json文件个数):4000 标注类别数:1 标注类别名称:["defect"] 每个类别标注的框数: defect count = 8740 总框数:8740 使用标注工具:labelme=5.5.0 所在仓库:firc-dataset 图片分辨率:640x640 标注规则:对类别进行画多边形框polygon 重要说明:可以将数据集用labelme打开编辑,json数据集需自己转成mask或者yolo格式或者coco格式作语义分割或者实例分割 特别声明:本数据集不对训练的模型或者权重文件精度作任何保证

不会仰游的河马君

高校如何利用技术转移服务转化科研成果并提升影响力?.docx

高校如何利用技术转移服务转化科研成果并提升影响力?

BIZKEEN

【工业无线通信】AI FastRoaming+TDMA技术在钢厂无人天车4K视频与PLC控制高可靠组网中的应用

内容概要:本文以华北最大湿法锌冶炼基地3跨厂房9台无人天车无线改造项目为例,详细介绍AI电信工业级无线方案如何解决钢厂无人天车在复杂工况下的通信难题。通过部署6台WFS7000BIAC大功率基站与18台WFS7000IAC18车载网桥,构建高可靠无线网络,采用自研AI FastRoaming技术实现≤30ms的快速漫游切换,保障业务零中断;结合TDMA私有协议有效抗强电磁干扰,稳定承载72路4K高清视频回传与PLC控制链路,实现视频流畅、控制精准的无人化作业,项目一次性验收通过,成为冶金行业可复制的标杆案例。; 适合人群:从事工业自动化、智能制造、无线通信技术研发的工程师及项目管理人员,尤其是聚焦钢铁、重工等行业智能化升级的技术人员。; 使用场景及目标:①解决钢厂无人天车在高速移动、跨厂房运行中的漫游断连问题;②在强电磁干扰、高温高粉尘环境下实现多路4K视频与控制信号的高可靠传输;③为工业级无线网络建设提供高可用、易复制的组网方案。; 阅读建议:本文结合实际工程案例,配有网络拓扑与设备部署说明,建议读者重点关注AI FastRoaming与TDMA技术在工业场景中的协同机制,以及VLAN隔离、冗余备份等可靠性设计的实际应用。

WFS16889
评论 2
收藏 已收藏
分享
返回顶部