Yermek
Yermek

Reputation: 11

AppEngine, how to use static html files

Please, help me, how I can use html files in my appengine application for Java environment (Java SDK)? When I open it in my browser I got error: HTTP ERROR 404 Problem accessing /myapp/. Reason: NOT_FOUND

Upvotes: 1

Views: 1253

Answers (3)

neocotic
neocotic

Reputation: 2131

Have you had a look through the Getting Started documentation?

Upvotes: 1

Kohistan
Kohistan

Reputation: 321

I think it depends on what you intend to do :

If you want to serve a static page inside your app : import (or create) the html page in the folder : YourProject/war Then you can call it with a relative link in your application:

<a href = 'MyPage.html'> My link </a>


If you want to start the app with a static page, then you must declare it in : YourPRoject/war/WEB-INF/web.xml file, by adding somthing like this this :

<welcome-file-list>
   <welcome-file>sign.html</welcome-file>
</welcome-file-list>

I hope it helps !

Upvotes: 1

Philar
Philar

Reputation: 3897

I added the following to the app.yaml file and it worked for me. This declaration needs to be made right after app_version. Please note that I have placed my html files in the main directory itself.

handlers:
-   url: /(.*\.html)
    static_files: \1
    upload: (.*html)

Upvotes: 0

Related Questions