Skip to content

Commit 0431be7

Browse files
committed
Merge pull request GoogleCloudPlatform#64 from GoogleCloudPlatform/fix-helloworld
Extra servlet in Helloworld
2 parents 621a07d + 14a5e93 commit 0431be7

File tree

2 files changed

+21
-44
lines changed

2 files changed

+21
-44
lines changed

managed_vms/helloworld/src/main/java/com/example/appengine/helloworld/HelloServlet.java

Lines changed: 0 additions & 36 deletions
This file was deleted.

managed_vms/helloworld/src/main/webapp/WEB-INF/web.xml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,25 @@
33
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
44
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
55
version="2.5">
6-
<servlet>
7-
<servlet-name>hello</servlet-name>
8-
<servlet-class>com.example.appengine.helloworld.HelloServlet</servlet-class>
9-
</servlet>
10-
<servlet-mapping>
11-
<servlet-name>hello</servlet-name>
12-
<url-pattern>/</url-pattern>
13-
</servlet-mapping>
6+
<!-- turn security on by default -->
7+
<security-constraint>
8+
<web-resource-collection>
9+
<web-resource-name>profile</web-resource-name>
10+
<url-pattern>/profile/*</url-pattern>
11+
</web-resource-collection>
12+
<auth-constraint>
13+
<role-name>*</role-name>
14+
</auth-constraint>
15+
</security-constraint>
16+
17+
<security-constraint>
18+
<web-resource-collection>
19+
<web-resource-name>admin</web-resource-name>
20+
<url-pattern>/admin/*</url-pattern>
21+
</web-resource-collection>
22+
<auth-constraint>
23+
<role-name>admin</role-name>
24+
</auth-constraint>
25+
</security-constraint>
26+
1427
</web-app>

0 commit comments

Comments
 (0)