diff --git a/appengine-java8/analytics/src/main/java/com/example/appengine/analytics/AnalyticsServlet.java b/appengine-java8/analytics/src/main/java/com/example/appengine/analytics/AnalyticsServlet.java index 702580ba3b0..a8085a2b611 100644 --- a/appengine-java8/analytics/src/main/java/com/example/appengine/analytics/AnalyticsServlet.java +++ b/appengine-java8/analytics/src/main/java/com/example/appengine/analytics/AnalyticsServlet.java @@ -34,6 +34,7 @@ // [START example] @SuppressWarnings("serial") +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "analytics", description = "Analytics: Send Analytics Event to Google Analytics", urlPatterns = "/analytics") public class AnalyticsServlet extends HttpServlet { diff --git a/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/IdentityServlet.java b/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/IdentityServlet.java index 64016262140..51668f2d4d9 100644 --- a/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/IdentityServlet.java +++ b/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/IdentityServlet.java @@ -26,6 +26,7 @@ import javax.servlet.http.HttpServletResponse; @SuppressWarnings("serial") +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "appidentity", description = "AppIdentity: Get the Host Name", urlPatterns = "/appidentity/identity") public class IdentityServlet extends HttpServlet { diff --git a/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/SignForAppServlet.java b/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/SignForAppServlet.java index fabbcd0fa02..328684349c7 100644 --- a/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/SignForAppServlet.java +++ b/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/SignForAppServlet.java @@ -42,6 +42,7 @@ import javax.servlet.http.HttpServletResponse; @SuppressWarnings("serial") +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "signforapp", description = "AppIdentity: Sign 'abcdefg'", urlPatterns = "/appidentity/sign") public class SignForAppServlet extends HttpServlet { diff --git a/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/UrlShortenerServlet.java b/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/UrlShortenerServlet.java index 7c8b1e66d89..319c73ebc37 100644 --- a/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/UrlShortenerServlet.java +++ b/appengine-java8/appidentity/src/main/java/com/example/appengine/appidentity/UrlShortenerServlet.java @@ -25,6 +25,7 @@ import javax.servlet.http.HttpServletResponse; @SuppressWarnings("serial") +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "UrlShortener", description = "AppIdentity: Url Shortener", urlPatterns = "/appidentity/shorten") public class UrlShortenerServlet extends HttpServlet { diff --git a/appengine-java8/cloudsql/src/main/java/com/example/appengine/cloudsql/CloudSqlServlet.java b/appengine-java8/cloudsql/src/main/java/com/example/appengine/cloudsql/CloudSqlServlet.java index 97c5e60c7f3..11513cb801a 100644 --- a/appengine-java8/cloudsql/src/main/java/com/example/appengine/cloudsql/CloudSqlServlet.java +++ b/appengine-java8/cloudsql/src/main/java/com/example/appengine/cloudsql/CloudSqlServlet.java @@ -37,6 +37,7 @@ // [START example] @SuppressWarnings("serial") +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "CloudSQL", description = "CloudSQL: Write low order IP address to Cloud SQL", urlPatterns = "/cloudsql") public class CloudSqlServlet extends HttpServlet { diff --git a/appengine-java8/gaeinfo/src/main/java/com/example/appengine/standard/GAEInfoServlet.java b/appengine-java8/gaeinfo/src/main/java/com/example/appengine/standard/GAEInfoServlet.java index cd5fff0f4de..7ebf994989e 100644 --- a/appengine-java8/gaeinfo/src/main/java/com/example/appengine/standard/GAEInfoServlet.java +++ b/appengine-java8/gaeinfo/src/main/java/com/example/appengine/standard/GAEInfoServlet.java @@ -35,6 +35,7 @@ // [START example] @SuppressWarnings({"serial"}) +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "GAEInfo", description = "GAEInfo: Write info about GAE Standard", urlPatterns = "/gaeinfo") //CHECKSTYLE:OFF diff --git a/appengine-java8/images/src/main/java/com/example/appengine/images/ImagesServlet.java b/appengine-java8/images/src/main/java/com/example/appengine/images/ImagesServlet.java index 5b929c86ada..114254a9c92 100644 --- a/appengine-java8/images/src/main/java/com/example/appengine/images/ImagesServlet.java +++ b/appengine-java8/images/src/main/java/com/example/appengine/images/ImagesServlet.java @@ -43,6 +43,7 @@ // [START example] @SuppressWarnings("serial") +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "images", description = "Images: Write an image to a bucket and display it in various sizes", urlPatterns = "/images") diff --git a/appengine-java8/logs/src/main/java/com/example/appengine/logs/LogsServlet.java b/appengine-java8/logs/src/main/java/com/example/appengine/logs/LogsServlet.java index 57ce0283464..30aa00e2176 100644 --- a/appengine-java8/logs/src/main/java/com/example/appengine/logs/LogsServlet.java +++ b/appengine-java8/logs/src/main/java/com/example/appengine/logs/LogsServlet.java @@ -33,6 +33,7 @@ // Get request logs along with their app log lines and display them 5 at // a time, using a Next link to cycle through to the next 5. +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "logs", description = "Logs: Display 5 lines of the request log", urlPatterns = "/logs") public class LogsServlet extends HttpServlet { diff --git a/appengine-java8/memcache/src/main/java/com/example/appengine/memcache/MemcacheAsyncCacheServlet.java b/appengine-java8/memcache/src/main/java/com/example/appengine/memcache/MemcacheAsyncCacheServlet.java index 3307dfce37f..2a90cc0cb18 100644 --- a/appengine-java8/memcache/src/main/java/com/example/appengine/memcache/MemcacheAsyncCacheServlet.java +++ b/appengine-java8/memcache/src/main/java/com/example/appengine/memcache/MemcacheAsyncCacheServlet.java @@ -33,6 +33,7 @@ import javax.servlet.http.HttpServletResponse; @SuppressWarnings("serial") +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "MemcacheAsync", description = "Memcache: Async Access", urlPatterns = "/memcache/async") public class MemcacheAsyncCacheServlet extends HttpServlet { diff --git a/appengine-java8/memcache/src/main/java/com/example/appengine/memcache/MemcacheBestPracticeServlet.java b/appengine-java8/memcache/src/main/java/com/example/appengine/memcache/MemcacheBestPracticeServlet.java index dd102386664..119c84a1c06 100644 --- a/appengine-java8/memcache/src/main/java/com/example/appengine/memcache/MemcacheBestPracticeServlet.java +++ b/appengine-java8/memcache/src/main/java/com/example/appengine/memcache/MemcacheBestPracticeServlet.java @@ -31,6 +31,7 @@ // [START example] @SuppressWarnings("serial") +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "memcache", description = "Memcache: Best Practices", urlPatterns = "/memcache") public class MemcacheBestPracticeServlet extends HttpServlet { diff --git a/appengine-java8/memcache/src/main/java/com/example/appengine/memcache/MemcacheConcurrentServlet.java b/appengine-java8/memcache/src/main/java/com/example/appengine/memcache/MemcacheConcurrentServlet.java index 8a7c88041e5..379114d2e1b 100644 --- a/appengine-java8/memcache/src/main/java/com/example/appengine/memcache/MemcacheConcurrentServlet.java +++ b/appengine-java8/memcache/src/main/java/com/example/appengine/memcache/MemcacheConcurrentServlet.java @@ -31,6 +31,7 @@ // [START example] @SuppressWarnings("serial") +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "MemcacheConcurrent", description = "Memcache: Concurrent", urlPatterns = "/memcache/concurrent") public class MemcacheConcurrentServlet extends HttpServlet { diff --git a/appengine-java8/memcache/src/main/java/com/example/appengine/memcache/MemcacheSyncCacheServlet.java b/appengine-java8/memcache/src/main/java/com/example/appengine/memcache/MemcacheSyncCacheServlet.java index dfec0a349f8..f146effb400 100644 --- a/appengine-java8/memcache/src/main/java/com/example/appengine/memcache/MemcacheSyncCacheServlet.java +++ b/appengine-java8/memcache/src/main/java/com/example/appengine/memcache/MemcacheSyncCacheServlet.java @@ -32,6 +32,7 @@ // [START example] @SuppressWarnings("serial") +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "MemcacheSync", description = "Memcache: Synchronous", urlPatterns = "/memcache/sync") public class MemcacheSyncCacheServlet extends HttpServlet { diff --git a/appengine-java8/oauth2/src/main/java/com/example/appengine/HelloServlet.java b/appengine-java8/oauth2/src/main/java/com/example/appengine/HelloServlet.java index f51864864e0..9139840ce9b 100644 --- a/appengine-java8/oauth2/src/main/java/com/example/appengine/HelloServlet.java +++ b/appengine-java8/oauth2/src/main/java/com/example/appengine/HelloServlet.java @@ -31,6 +31,7 @@ // [START example] @SuppressWarnings("serial") +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "oauth2", description = "Oauth2: restricted helloWorld", urlPatterns = "/oauth2hello") public class HelloServlet extends HttpServlet { diff --git a/appengine-java8/oauth2/src/main/java/com/example/appengine/Oauth2Filter.java b/appengine-java8/oauth2/src/main/java/com/example/appengine/Oauth2Filter.java index f857bd43ecc..38d60a43c71 100644 --- a/appengine-java8/oauth2/src/main/java/com/example/appengine/Oauth2Filter.java +++ b/appengine-java8/oauth2/src/main/java/com/example/appengine/Oauth2Filter.java @@ -39,6 +39,7 @@ *

Note - this is to demonstrate the OAuth2 APIs, as it is possible to lockdown some * of your app's URL's using cloud console by adding service accounts to the project.

*/ +// With @WebFilter annotation the webapp/WEB-INF/web.xml is no longer required. @WebFilter(urlPatterns = "/oauth2hello") public class Oauth2Filter implements Filter { diff --git a/appengine-java8/remote-server/src/main/java/com/example/appengine/remote/RemoteServlet.java b/appengine-java8/remote-server/src/main/java/com/example/appengine/remote/RemoteServlet.java index f7077035dec..8f95fd8b90d 100644 --- a/appengine-java8/remote-server/src/main/java/com/example/appengine/remote/RemoteServlet.java +++ b/appengine-java8/remote-server/src/main/java/com/example/appengine/remote/RemoteServlet.java @@ -26,6 +26,7 @@ // [START example] @SuppressWarnings("serial") +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "remote", description = "Remote: yet another HelloWorld.", urlPatterns = "/remote") public class RemoteServlet extends HttpServlet { diff --git a/appengine-java8/requests/src/main/java/com/example/appengine/requests/LoggingServlet.java b/appengine-java8/requests/src/main/java/com/example/appengine/requests/LoggingServlet.java index e41f2242360..10013344656 100644 --- a/appengine-java8/requests/src/main/java/com/example/appengine/requests/LoggingServlet.java +++ b/appengine-java8/requests/src/main/java/com/example/appengine/requests/LoggingServlet.java @@ -23,6 +23,7 @@ import javax.servlet.http.HttpServletResponse; // [START simple_logging_example] +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "RequestLogging", description = "Requests: Logging example", urlPatterns = "/requests/log") public class LoggingServlet extends HttpServlet { @@ -39,6 +40,6 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) resp.getWriter().println("Check logs for results"); // [END_EXCLUDE] } -} +} // [END simple_logging_example] diff --git a/appengine-java8/requests/src/main/java/com/example/appengine/requests/RequestsServlet.java b/appengine-java8/requests/src/main/java/com/example/appengine/requests/RequestsServlet.java index b4e64b88388..878aeaeb70f 100644 --- a/appengine-java8/requests/src/main/java/com/example/appengine/requests/RequestsServlet.java +++ b/appengine-java8/requests/src/main/java/com/example/appengine/requests/RequestsServlet.java @@ -22,6 +22,7 @@ import javax.servlet.http.HttpServletResponse; // [START simple_request_example] +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "requests", description = "Requests: Trivial request", urlPatterns = "/requests") public class RequestsServlet extends HttpServlet { diff --git a/appengine-java8/taskqueues-deferred/src/main/java/com/google/cloud/taskqueue/samples/DeferSampleServlet.java b/appengine-java8/taskqueues-deferred/src/main/java/com/google/cloud/taskqueue/samples/DeferSampleServlet.java index 23e0bae27d4..6e30e2c82eb 100644 --- a/appengine-java8/taskqueues-deferred/src/main/java/com/google/cloud/taskqueue/samples/DeferSampleServlet.java +++ b/appengine-java8/taskqueues-deferred/src/main/java/com/google/cloud/taskqueue/samples/DeferSampleServlet.java @@ -36,6 +36,7 @@ * interface to background a task on the AppEngine task queues, * without needing to create a separate URL handler. */ +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "TasksDefer", description = "TaskQueues: Defer a task", urlPatterns = "/taskqueues/defer") public class DeferSampleServlet extends HttpServlet { diff --git a/appengine-java8/taskqueues-pull/src/main/java/com/example/taskqueue/TaskqueueServlet.java b/appengine-java8/taskqueues-pull/src/main/java/com/example/taskqueue/TaskqueueServlet.java index 3f766c1ec14..6055cd5e3de 100644 --- a/appengine-java8/taskqueues-pull/src/main/java/com/example/taskqueue/TaskqueueServlet.java +++ b/appengine-java8/taskqueues-pull/src/main/java/com/example/taskqueue/TaskqueueServlet.java @@ -35,6 +35,7 @@ * Form Handling Servlet -- takes the form submission from /src/main/webapp/taskqueues-pull.jsp to * add and delete tasks. */ +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "TaskPull", description = "TaskQueues: Process some queues", urlPatterns = "/taskqueues/queue") public class TaskqueueServlet extends HttpServlet { diff --git a/appengine-java8/taskqueues-push/src/main/java/com/example/appengine/taskqueue/push/Enqueue.java b/appengine-java8/taskqueues-push/src/main/java/com/example/appengine/taskqueue/push/Enqueue.java index 07681ea85a3..2731a1ebcdb 100644 --- a/appengine-java8/taskqueues-push/src/main/java/com/example/appengine/taskqueue/push/Enqueue.java +++ b/appengine-java8/taskqueues-push/src/main/java/com/example/appengine/taskqueue/push/Enqueue.java @@ -28,6 +28,7 @@ // [START enqueue] // The Enqueue servlet should be mapped to the "/enqueue" URL. +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "TaskEnque", description = "taskqueue: Enqueue a job with a key", urlPatterns = "/taskqueues/enqueue") public class Enqueue extends HttpServlet { diff --git a/appengine-java8/taskqueues-push/src/main/java/com/example/appengine/taskqueue/push/Worker.java b/appengine-java8/taskqueues-push/src/main/java/com/example/appengine/taskqueue/push/Worker.java index 76aa11f751a..9902ee5f66a 100644 --- a/appengine-java8/taskqueues-push/src/main/java/com/example/appengine/taskqueue/push/Worker.java +++ b/appengine-java8/taskqueues-push/src/main/java/com/example/appengine/taskqueue/push/Worker.java @@ -25,6 +25,7 @@ // [START worker] // The Worker servlet should be mapped to the "/worker" URL. +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "TaskWorker", description = "TaskQueues: worker", urlPatterns = "/taskqueues/worker") public class Worker extends HttpServlet { diff --git a/appengine-java8/urlfetch/src/main/java/com/example/appengine/UrlFetchServlet.java b/appengine-java8/urlfetch/src/main/java/com/example/appengine/UrlFetchServlet.java index e81d6ee1af6..2419d7999e5 100644 --- a/appengine-java8/urlfetch/src/main/java/com/example/appengine/UrlFetchServlet.java +++ b/appengine-java8/urlfetch/src/main/java/com/example/appengine/UrlFetchServlet.java @@ -31,6 +31,7 @@ import javax.servlet.http.HttpServletResponse; @SuppressWarnings("serial") +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "URLFetch", description = "URLFetch: Write low order IP address to Cloud SQL", urlPatterns = "/urlfetch") public class UrlFetchServlet extends HttpServlet { diff --git a/appengine-java8/users/src/main/java/com/example/appengine/users/UsersServlet.java b/appengine-java8/users/src/main/java/com/example/appengine/users/UsersServlet.java index b9905f3bf1d..2752793c520 100644 --- a/appengine-java8/users/src/main/java/com/example/appengine/users/UsersServlet.java +++ b/appengine-java8/users/src/main/java/com/example/appengine/users/UsersServlet.java @@ -26,6 +26,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +// With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet(name = "UserAPI", description = "UserAPI: Login / Logout with UserService", urlPatterns = "/userapi") public class UsersServlet extends HttpServlet {