0
votes

I usually use Eclipse and Google Cloud Tools plugin for Eclipse so I'm not really familiar with the command line tools. Now I have some deployment issues and I'd like to try to deploy using "gcloud app deploy".

I installed Google Cloud SDK and managed to run this:

cd D:\path-to-eclipse-workspace\my-project
C:\path-to-google-cloud\gcloud app deploy src\main\webapp\WEB-INF\appengine-web.xml -v v1

The deployment seems to work, but when I check on appspot.com my servlets are not there - I get: Error: Not Found. The requested URL /hello was not found on this server.

Thanks!

Update:

It looks like Eclipse is not putting .class files in WEB-INF/classes folder, but it creates a build/classes folder in the root of the project.

So, should I just copy the classes folder to WEB-INF before deployment or is there a better way to do it?

1
Please show us your appengine-web.xml file and the Java class where you defined the servlet for the /hello endpoint.LundinCast

1 Answers

1
votes

I ended up doing this:

  1. Configure Eclipse to put .class files in WEB_INF/classes folder:

Project Properties -> Java Build Path -> Source -> configure Default output folder to be WEB_INF/classes

  1. Deploy to App Engine:

cd D:\path-to-eclipse-workspace\my-project gcloud app deploy src\main\webapp\WEB-INF\appengine-web.xml -v v1