Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Static files configured in appengine-web.xml give 404 in the development server #72

Closed
wmwong opened this issue Jan 6, 2016 · 2 comments

Comments

@wmwong
Copy link

wmwong commented Jan 6, 2016

Google Cloud SDK 91.0.1
app-engine-java 1.9.30

I have configured appengine-web.xml to serve static files:

<static-files>
  <include path="/css/*.css" />
</static-files>

I run the following commands:
$ mvn clean
$ mvn gcloud:run

However, when trying to visit http://localhost:8080/css/index.css, it gives me a 404 with an error message specifying that no handlers could be found.

"mvn gcloud:run" uses dev_appserver.py to start the development server. The app.yaml given is from target/simple-service-webapp/WEB-INF/app.yaml. Looking into this file, I see that the static root is being set to static. However, this directory does not exist in target/simple-service-webapp. However, it does exist in target/appengine-staging. In fact, if I copy the dev_appserver.py command and replace simple-service-webapp with appengine-staging, I can reach /css/index.css.

This seems like a bug and that target/simple-service-webapp should have a static directory.

simple-service-webapp.zip

@ludoch
Copy link
Contributor

ludoch commented Jan 6, 2016

I guess you would see the same bug without the maven plugin.
So no fix can be done in this github project.
You can track an internal bug 25198225

On Wed, Jan 6, 2016 at 1:26 PM, Wesley Wong notifications@github.com
wrote:

Google Cloud SDK 91.0.1
app-engine-java 1.9.30

I have configured appengine-web.xml to serve static files:

I run the following commands:
$ mvn clean
$ mvn gcloud:run

However, when trying to visit http://localhost:8080/css/index.css, it
gives me a 404 with an error message specifying that no handlers could be
found.

"mvn gcloud:run" uses dev_appserver.py to start the development server.
The app.yaml given is from target/simple-service-webapp/WEB-INF/app.yaml.
Looking into this file, I see that the static root is being set to
static. However, this directory does not exist in
target/simple-service-webapp. However, it does exist in
target/appengine-staging. In fact, if I copy the dev_appserver.py command
and replace simple-service-webapp with appengine-staging, I can reach
/css/index.css.

This seems like a bug and that target/simple-service-webapp should have a
static directory.

simple-service-webapp.zip
https://github.com/GoogleCloudPlatform/gcloud-maven-plugin/files/80383/simple-service-webapp.zip


Reply to this email directly or view it on GitHub
#72.

@wmwong
Copy link
Author

wmwong commented Jan 6, 2016

Thanks for the internal bug. Closing this.

@wmwong wmwong closed this as completed Jan 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants