需要知道这里有什么问题

时间:2012-06-15 05:43:33

标签: struts2 tomcat7

我正在尝试学习Struts2框架。 我从网站获得了HelloWorld示例:

`www.vaannila.com/struts/struts-tutorial/struts-tutorial-using-eclipse-1.html

突出显示的代码显示为警告:

<%@taglib uri="/struts-tags" prefix="s" %>
s:redirect forward =“helloWorld”/&gt;

警告如下:

此行找到多个注释:
       - 未知标签(bean:write)。
       - 未知标签(bean:write)。

我在index.jsp文件中得到了相同的警告代码:

当我运行tomcat时,我在控制台中得到以下内容。我知道我的tomcat正在运行,但我该怎么纠正呢?

Jun 13,2012 1:12:28 PM org.apache.catalina.core.AprLifecycleListener init

**INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32;**

**Jun 13, 2012 1:12:28 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:StrutsExample1' did not find a matching property.**

Jun 13, 2012 1:12:28 PM org.apache.coyote.AbstractProtocol init

INFO: Initializing ProtocolHandler ["http-bio-8080"]

Jun 13, 2012 1:12:28 PM org.apache.coyote.AbstractProtocol init

INFO: Initializing ProtocolHandler ["ajp-bio-8009"]

Jun 13, 2012 1:12:28 PM org.apache.catalina.startup.Catalina load

INFO: Initialization processed in 735 ms

Jun 13, 2012 1:12:28 PM org.apache.catalina.core.StandardService startInternal

INFO: Starting service Catalina

Jun 13, 2012 1:12:28 PM org.apache.catalina.core.StandardEngine startInternal

INFO: Starting Servlet Engine: Apache Tomcat/7.0.27

Jun 13, 2012 1:12:31 PM org.apache.coyote.AbstractProtocol start

INFO: Starting ProtocolHandler ["http-bio-8080"]

Jun 13, 2012 1:12:31 PM org.apache.coyote.AbstractProtocol start

INFO: Starting ProtocolHandler ["ajp-bio-8009"]

Jun 13, 2012 1:12:31 PM org.apache.catalina.startup.Catalina start

INFO: Server startup in 2586 ms

1 个答案:

答案 0 :(得分:1)

<bean:write>是struts 1.x你必须在struts 2.x中使用<s:property>

请参阅s:property documentation