GAE:Java:Windows 7 配置:
I am trying to test a basic HTML "Hello World" on GAE under Windows7/Java before getting into something more interesting. however, when pasting
http://localhost:8888
into Chrome or IE =>throws ERROR 403`. I have searched through the posted workable solutions for a couple days
我想将此作为许多 Google App Engine-Java 编码人员的解决方案主题
<小时/>Here are some of the recommended Solutions from other threads: tried, but not resolving my error 403.
(1) Disabled my firewall/ virus protection/ reduced security to nothing
(2) ping "localhost" via cmd running as administrator (3) modified c:\windows\system32\drivers\etc\hosts file to remove "::1" (4) proxy settings modified (IE Options->connections->lan settings->{checked} "use proxy > server for LAN && {checked}bypass proxy server for local addresses && (under ADVANCED-EXCEPTIONS} added "localhost" in the section 'do not use proxy server for addresses beginning with:'localhost'
(5) tried flushing dns via cmd * Ipconfig /flushdns *nbstat –R *nbstat –RR *netsh int reset all * nets int ip reset * netsh winsock resetI like to understand the inner-workings- so this code is a skeletal to test the GAE configuration is dialed-in & working before I upload more. It seemed pretty easy according to the tutorial.
As I am new to working with the GAE, I would greatly appreciate detail about why/how it's > not working/how your recommendation corrects the issue. Thanks a lot GAE technical team. You Rock!
Signed: Tree@iTreeware.com
INDEX.HTML
> <!DOCTYPE html>
> <html>
> <body> <p> Hello World from TREEware! </br> 403 Error B Gone!</p>
> </body>
> </html>
>
<小时/>
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">
>
> </web-app>
<小时/>
APPENGINE-WEB.XML
> <?xml version="1.0" encoding="utf-8"?>
> <appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
> <application>itreeware1</application>
> <version>1</version>
>
> <!--
> Allows App Engine to send multiple requests to one instance in parallel:
> -->
> <threadsafe>true</threadsafe>
>
> <!-- Configure java.util.logging -->
> <system-properties>
> <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
> </system-properties>
>
> <!--
> HTTP Sessions are disabled by default. To enable HTTP sessions specify:
>
> <sessions-enabled>true</sessions-enabled>
>
> It's possible to reduce request latency by configuring your application to
> asynchronously write HTTP session data to the datastore:
>
> <async-session-persistence enabled="true" />
>
> With this feature enabled, there is a very small chance your app will see
> stale session data. For details, see
> http://code.google.com/appengine/docs/java/config/appconfig.html#Enabling_Sessions
> -->
>
> </appengine-web-app>
>
日志
> Jun 12, 2013 8:26:39 PM com.google.apphosting.utils.config.AppEngineWebXmlReader
> readAppEngineWebXml
> INFO: Successfully processed C:\Users\Organize4Joy\workspace\TreeApp1\war\WEB-\
> INF/appengine-web.xml
> Jun 12, 2013 8:26:39 PM com.google.apphosting.utils.config.AbstractConfigXmlReader
> readConfigXml
> INFO: Successfully processed C:\Users\Organize4Joy\workspace\TreeApp1\war\WEB-INF/web.xml
> Jun 12, 2013 8:26:39 PM com.google.appengine.tools.development.SystemPropertiesManager
> setSystemProperties
> INFO: Overwriting system property key 'java.util.logging.config.file', value 'C:\Program > Files\Google\appengine-java-sdk-1.8.1\config\sdk\logging.properties' with value 'WEB-
> INF/logging.properties' from 'C:\Users\Organize4Joy\workspace\TreeApp1\war\WEB-
> INF\appengine-web.xml'
> Jun 12, 2013 8:26:39 PM com.google.apphosting.utils.jetty.JettyLogger info
> INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
> Jun 13, 2013 1:26:40 AM com.google.apphosting.utils.jetty.JettyLogger info
> INFO: jetty-6.1.x
> Jun 13, 2013 1:26:42 AM com.google.apphosting.utils.jetty.JettyLogger info
> INFO: Started SelectChannelConnector@127.0.0.1:8888
> Jun 13, 2013 1:26:42 AM com.google.appengine.tools.development.AbstractServer startup
> INFO: Server default is running at http://localhost:8888/
> Jun 13, 2013 1:26:42 AM com.google.appengine.tools.development.AbstractServer startup
> INFO: The admin console is running at http://localhost:8888/_ah/admin
> Jun 12, 2013 8:26:42 PM com.google.appengine.tools.development.DevAppServerImpl start
> INFO: Dev App Server is now running
> Jun 12, 2013 8:27:02 PM com.google.appengine.tools.development.LocalResourceFileServlet
> doGet
> WARNING: No file found for: /favicon.ico
> Jun 12, 2013 8:27:02 PM com.google.appengine.tools.development.LocalResourceFileServlet
> doGet
> WARNING: No file found for: /favicon.ico
<小时/>
最佳答案
此处放错位置的文件有时也会抛出 403。
确保您的 HTML
页面位于 war
文件夹中,而不是 WEB-INF
中,否则可能找不到。您可能期望这会导致 404,但在本例中,也期望得到 403。
您还可以通过将其位置映射为 web.xml
中的欢迎文件
,让应用程序更轻松地找到它。您可以通过在 web-app
标记中包含以下代码来实现此目的:
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
关于java - 谷歌应用程序引擎-Java : HTML Error 403: Configuration Solution Thread,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17078863/