Ken*_*ent 6 jsp struts2 apache-tiles maven
这是我在web.xml文件中的配置
<listener>
<listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
</listener>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Run Code Online (Sandbox Code Playgroud)
这是配置 pom.xml
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-jsp</artifactId>
<version>2.2.2</version>
<type>pom</type>
<scope>compile</scope>
</dependency>
Run Code Online (Sandbox Code Playgroud)
它一直这样说:Can not find the tag library descriptor for "http://struts.apache.org/tags-tiles"当我将taglib添加到布局中时:
<%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"%>
Run Code Online (Sandbox Code Playgroud)
当我在服务器上运行时:
SEVERE: Error configuring application listener of class org.apache.struts2.tiles.StrutsTilesListener
Run Code Online (Sandbox Code Playgroud)
我在这里错过了什么吗?
感谢Kenny Lee,我在几周后找到了这个问题的解决方案:((\nYou\xe2\x80\x99ll 需要通过以下方式配置你的 Eclipse 项目设置:
\n对于 Eclipse 3.6,请单击此处了解更多信息
\n有时配置后你必须刷新项目或使用mvn clean它mvn install会起作用
| 归档时间: |
|
| 查看次数: |
15471 次 |
| 最近记录: |