From a53b557d5cdfb59ca5506b05fa90b1b92ab8b04b Mon Sep 17 00:00:00 2001 From: Les Vogel Date: Wed, 27 Jan 2016 16:15:43 -0800 Subject: [PATCH 1/2] Extra servlet in Helloworld 1. remove it. --- .../appengine/helloworld/HelloServlet.java | 36 ------------------- 1 file changed, 36 deletions(-) delete mode 100644 managed_vms/helloworld/src/main/java/com/example/appengine/helloworld/HelloServlet.java diff --git a/managed_vms/helloworld/src/main/java/com/example/appengine/helloworld/HelloServlet.java b/managed_vms/helloworld/src/main/java/com/example/appengine/helloworld/HelloServlet.java deleted file mode 100644 index d9135a0ce63..00000000000 --- a/managed_vms/helloworld/src/main/java/com/example/appengine/helloworld/HelloServlet.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright 2015 Google Inc. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.example.appengine.helloworld; - -import java.io.IOException; -import java.io.PrintWriter; - -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -// [START example] -@SuppressWarnings("serial") -public class HelloServlet extends HttpServlet { - - @Override - public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { - PrintWriter out = resp.getWriter(); - out.println("Hello, world"); - } -} -// [END example] From 14a5e9354033dbabb7204e1f59a47853bfaebd74 Mon Sep 17 00:00:00 2001 From: Les Vogel Date: Wed, 27 Jan 2016 17:40:20 -0800 Subject: [PATCH 2/2] get rid of gave mapping add security. --- .../src/main/webapp/WEB-INF/web.xml | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/managed_vms/helloworld/src/main/webapp/WEB-INF/web.xml b/managed_vms/helloworld/src/main/webapp/WEB-INF/web.xml index 1a1704104a2..d8ab62f95b9 100644 --- a/managed_vms/helloworld/src/main/webapp/WEB-INF/web.xml +++ b/managed_vms/helloworld/src/main/webapp/WEB-INF/web.xml @@ -3,12 +3,25 @@ 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"> - - hello - com.example.appengine.helloworld.HelloServlet - - - hello - / - + + + + profile + /profile/* + + + * + + + + + + admin + /admin/* + + + admin + + +