gpt4 book ai didi

java - Struts 1 到 Struts2 JSP 标签库转换

转载 作者:太空宇宙 更新时间:2023-11-04 11:24:02 26 4
gpt4 key购买 nike

因此,将应用程序从 Struts 1 转换为 Struts 2,到目前为止进展顺利...

我对此做了很多谷歌搜索,但似乎找不到明确的答案。我们有用 JSTL 编写的 JSP 和一些导致问题的 struts 标签库。所以...

<%@ taglib uri="http://struts.apache.org/tags-html-el" prefix="html" %>

<html:form action="struts2action">

JSP 抛出错误,指出虽然在 struts.xml 中正确定义了映射“struts2action”,但找不到该映射

我猜测tags-html-el是旧的S1标签库,我需要将它们迁移到新的S2标签库

<%@ taglib uri="/struts-tags" prefix="s" %>

谁能确认一下吗?

我们有用于 c、fmt 的常用 JSTL 标记库,我认为不需要转换?

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

最佳答案

答案是肯定的,标签需要替换为新的 S2 标签...JSTL 工作得很好,花花公子:)

关于java - Struts 1 到 Struts2 JSP 标签库转换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44565962/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com