【发布时间】:2019-09-26 20:29:31
【问题描述】:
我最近在 GAE 本地应用上从默认缩放更改为手动缩放。
我可以从/api/* 路径获得响应,但我的欢迎文件不再起作用。
我明白了
访问 / 时出现问题。原因:
禁止
在启动服务器时它说:
com.google.appengine.tools.development.jetty9.LocalResourceFileServlet doGet
警告:找不到文件:/_ah/start
在此之前一切正常,这是我的appengine-web.xml
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<version>1.0</version>
<manual-scaling>
<instances>1</instances>
</manual-scaling>
<instance-class>B1</instance-class>
<threadsafe>true</threadsafe>
<sessions-enabled>true</sessions-enabled>
<runtime>java8</runtime>
<static-files>
<include path="/**.html"></include>
</static-files>
<resource-files>
<include path="/**.json" />
</resource-files>
</appengine-web-app>
还有我的web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">
<filter>
<filter-name>connexionFilter</filter-name>
<filter-class>slFilters.connexionFilter</filter-class>
</filter>
<filter>
<filter-name>restrictFilter</filter-name>
<filter-class>slFilters.restrictFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>connexionFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>restrictFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<session-config>
<cookie-config>
<http-only>true</http-only>
</cookie-config>
</session-config>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
index.html是一个简单的hello world html文件,访问localhost:8080时应该会显示
非常感谢任何帮助
【问题讨论】:
标签: java google-app-engine jetty http-status-code-403