我按照http://www.mkyong.com/google-app-engine/google-app-engine-struts-2-example中的示例在Google App Engine中尝试了Struts2
它工作得很好,但我无法访问开发控制台,该控制台应该在http://localhost:8888/_ah/admin中访问
是关于过滤器的吗?如何修复?
下面是web.xml的内容
<?xml version="1.0" encoding="utf-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<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>
<listener>
<listener-class>com.mkyong.listener.Struts2ListenerOnGAE</listener-class>
</listener>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>发布于 2012-05-02 17:03:29
我通过将以下代码添加到struts.xml中解决了这个问题
<constant name="struts.action.excludePattern" value="/_ah/admin"/>发布于 2012-05-02 08:58:43
是的,<url-pattern>/*</url-pattern>将所有内容都映射到Struts filter。
https://stackoverflow.com/questions/10406283
复制相似问题