|
||||||||
|
Google App Engine: Eclipse Plugin
1) Create Project (File->New Project->Google App Engine StandardProject OR File->New->Other->Google Cloud Platform->Google App Engine Standard Java Project)
The result will be the following pop-up window
|
The result will be a directory structure like the following
Note: we have created a project called "MyFirstGAEApplication"
|
|
web.xml file that was autogenerated- can edit in design or source
<?xml version="1.0" encoding="utf-8"?> Notice that the URL mappings have already been set up and instead of being in the web.xml file are associated with the Project under |
When create a new servlet it will ask you for mappings and set this in the project...for example:1) New Servlet
|
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<threadsafe>true</threadsafe>
<sessions-enabled>false</sessions-enabled>
<runtime>java8</runtime>
</appengine-web-app>
package grewe.ilab.vision;
import java.io.IOException; import javax.servlet.http.*;
@SuppressWarnings("serial")
public class OpenCVBackendJavaServlet extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
resp.setContentType("text/plain");
resp.getWriter().println("Hello, world");
}
}

