简体   繁体   English

Struts 1到Struts2 JSP taglib转换

[英]Struts 1 to Struts2 JSP taglib conversion

So converting an application from Struts 1 to Struts 2 which so far has been going ok... 因此,将应用程序从Struts 1转换为Struts 2,到目前为止一切正常。

I've done much Googling on this but I can't seem to find a definitive answer. 我在Google上做了很多工作,但似乎找不到确切的答案。 We have JSPs that are written in JSTL and some struts taglibs which is causing the issues. 我们有用JSTL编写的JSP和一些导致问题的struts taglib。 So... 所以...

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

<html:form action="struts2action">

The JSP throws errors saying the mapping 'struts2action' cannot be found although is defined in struts.xml correctly JSP抛出错误,尽管正确在struts.xml中定义了映射'struts2action',但找不到该映射

I'm guessing that the tags-html-el is the old S1 taglibs and that I need to migrate these to the new S2 taglib 我猜想tags-html-el是旧的S1标签库,我需要将它们迁移到新的S2标签库

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

Can anyone confirm ? 谁能确认?

We have the usual JSTL taglibs for c, fmt which I don't believe need converting ? 我们有用于c,fmt的常用JSTL taglib,我认为不需要转换?

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

答案是肯定的,标记需要替换为新的S2标记。。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM