【问题标题】:Struts 1 to Struts2 JSP taglib conversionStruts 1 到 Struts2 JSP taglib 转换
【发布时间】:2017-06-15 11:08:18
【问题描述】:

因此,将应用程序从 Struts 1 转换为 Struts 2,到目前为止一切正常...

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

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

<html:form action="struts2action">

尽管在 struts.xml 中正确定义了映射“struts2action”,但 JSP 抛出错误提示

我猜 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 和 S1 除了 S 之外没有任何共同之处。
  • 谢谢!很难在任何文档中明确找到!

标签: java struts2 struts taglib struts1


【解决方案1】:

答案是肯定的标签需要用新的 S2 标签替换... JSTL 工作正常,花花公子 :)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-11-10
    • 1970-01-01
    • 1970-01-01
    • 2013-06-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多