Google App Engine Localhost后端错误 [英] Google App Engine Localhost Backend Error
本文介绍了Google App Engine Localhost后端错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在本地主机上运行测试GAE后端,但出现以下错误:
I am trying to run a test GAE backend on my localhost and I am getting the following error:
com.google.appengine.tools.development.InstanceHelper sendStartRequest
WARNING: Start request to /_ah/start on server 0.export failed (HTTP status code=405). Retrying...
我的代码如下:
backends.xml
backends.xml
<backends>
<backend name="example">
<class>B1</class>
<options>
<instances>1</instances>
<public>false</public>
<dynamic>true</dynamic>
</options>
</backend>
</backends>
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">
<servlet>
<servlet-name>backend_test</servlet-name>
<servlet-class>com.test.backend.BackendTest</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>backend_test</servlet-name>
<url-pattern>/_ah/start</url-pattern>
</servlet-mapping>
</web-app>
谢谢您的帮助.
推荐答案
您已连接 com.test.backend.BackendTest
来处理启动请求.它需要处理GET请求并以200(实际上是200-299可以)或400进行响应.
You've hooked up com.test.backend.BackendTest
to handle start requests. It needs to handle a GET request and respond with 200 (actually 200-299 will do) or a 400.
此处的详细信息: https://developers.google.com/appengine/docs/java/backends/#Java_Startup
405响应听起来像您没有提供覆盖 get()
的处理程序.
A 405 response sounds like you didn't supply a handler that overrides get()
.
这篇关于Google App Engine Localhost后端错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文