Reputation: 9
GAE: Java: Windows 7 CONFIG :
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
I want to make this a SOLUTION THREAD for many Google App Engine- Java coders
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: [email protected]
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>
LOG
> 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 [email protected]: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
Upvotes: 0
Views: 3243
Reputation: 276
A misplaced file here will also sometimes throw a 403.
Make sure that your HTML
page is in the war
folder and not WEB-INF
, otherwise it might not be found. You might expect this to result in a 404, but in this case, expect also a 403.
You could also make it easier for the application to find it by mapping its location as the welcome file
in your web.xml
. You can do this by including the following code within the web-app
tags:
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
Upvotes: 1