From 8ca37ee9088bcd07844a9d8ecdbde145e1607708 Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Mon, 20 Aug 2018 13:13:39 -0700 Subject: [PATCH] update region tags (#1179) * region tags: request/logging example * analytics * mailgun * mailjet, sendgrid * cloud sql and postgresql and datastore * Storage, twilio * pubsub * fixed app.yaml errors --- .../example/appengine/requests/LoggingServlet.java | 4 ++-- .../example/appengine/requests/RequestsServlet.java | 4 ++-- .../example/appengine/requests/LoggingServlet.java | 7 +++---- .../example/appengine/requests/RequestsServlet.java | 5 ++--- flexible/analytics/src/main/appengine/app.yaml | 4 ++-- .../java/com/example/analytics/AnalyticsServlet.java | 4 ++-- flexible/cloudsql/pom.xml | 12 ++++++------ .../java/com/example/cloudsql/CloudSqlServlet.java | 4 ++-- flexible/cloudstorage/src/main/appengine/app.yaml | 2 -- .../java/com/example/cloudstorage/UploadServlet.java | 4 ++-- flexible/datastore/pom.xml | 4 ++-- .../java/com/example/datastore/DatastoreServlet.java | 4 ++-- flexible/mailgun/pom.xml | 4 ++-- .../java/com/example/mailgun/MailgunServlet.java | 10 ++++------ flexible/mailjet/pom.xml | 4 ++-- flexible/mailjet/src/main/appengine/app.yaml | 4 ++-- .../java/com/example/mailjet/MailjetServlet.java | 8 ++++---- flexible/postgres/pom.xml | 12 ++++++------ .../com/example/postgres/PostgresSqlServlet.java | 4 ++-- flexible/pubsub/pom.xml | 4 ---- flexible/pubsub/src/main/appengine/app.yaml | 7 +++---- flexible/sendgrid/pom.xml | 4 ++-- flexible/sendgrid/src/main/appengine/app.yaml | 4 ++-- .../java/com/example/sendgrid/SendEmailServlet.java | 4 ++-- flexible/twilio/pom.xml | 4 ++-- flexible/twilio/src/main/appengine/app.yaml | 4 ++-- .../java/com/example/twilio/ReceiveCallServlet.java | 4 ++-- .../java/com/example/twilio/ReceiveSmsServlet.java | 4 ++-- .../main/java/com/example/twilio/SendSmsServlet.java | 4 ++-- 29 files changed, 68 insertions(+), 79 deletions(-) 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 50d97b4a3dd..907c83fe607 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 @@ -22,7 +22,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -// [START simple_logging_example] +// [START gae_java8_logging_example] // With @WebServlet annotation the webapp/WEB-INF/web.xml is no longer required. @WebServlet( name = "RequestLogging", @@ -44,4 +44,4 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOExc // [END_EXCLUDE] } } -// [END simple_logging_example] +// [END gae_java8_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 bf575133b85..c0fec78ba48 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 @@ -21,7 +21,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -// [START simple_request_example] +// [START gae_java8_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 { @@ -32,4 +32,4 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOExc resp.getWriter().println("Hello, world"); } } -// [END simple_request_example] +// [END gae_java8_request_example] diff --git a/appengine/requests/src/main/java/com/example/appengine/requests/LoggingServlet.java b/appengine/requests/src/main/java/com/example/appengine/requests/LoggingServlet.java index 38916aa67da..2115d799d4b 100644 --- a/appengine/requests/src/main/java/com/example/appengine/requests/LoggingServlet.java +++ b/appengine/requests/src/main/java/com/example/appengine/requests/LoggingServlet.java @@ -21,7 +21,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -// [START simple_logging_example] +// [START gae_java_logging_example] public class LoggingServlet extends HttpServlet { private static final Logger log = Logger.getLogger(LoggingServlet.class.getName()); @@ -36,6 +36,5 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) resp.getWriter().println("Check logs for results"); // [END_EXCLUDE] } -} -// [END simple_logging_example] - +} +// [END gae_java_logging_example] diff --git a/appengine/requests/src/main/java/com/example/appengine/requests/RequestsServlet.java b/appengine/requests/src/main/java/com/example/appengine/requests/RequestsServlet.java index 8dff3498311..638af2167f6 100644 --- a/appengine/requests/src/main/java/com/example/appengine/requests/RequestsServlet.java +++ b/appengine/requests/src/main/java/com/example/appengine/requests/RequestsServlet.java @@ -20,7 +20,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -// [START simple_request_example] +// [START gae_java_request_example] public class RequestsServlet extends HttpServlet { @Override public void doGet(HttpServletRequest req, HttpServletResponse resp) @@ -29,5 +29,4 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) resp.getWriter().println("Hello, world"); } } -// [END simple_request_example] - +// [END gae_java_request_example] diff --git a/flexible/analytics/src/main/appengine/app.yaml b/flexible/analytics/src/main/appengine/app.yaml index 3273b02a0e8..be578da0625 100644 --- a/flexible/analytics/src/main/appengine/app.yaml +++ b/flexible/analytics/src/main/appengine/app.yaml @@ -5,7 +5,7 @@ handlers: - url: /.* script: this field is required, but ignored -# [START env_variables] +# [START gae_flex_analytics_env_variables] env_variables: GA_TRACKING_ID: YOUR-GA-TRACKING-ID -# [END env_variables] +# [END gae_flex_analytics_env_variables] diff --git a/flexible/analytics/src/main/java/com/example/analytics/AnalyticsServlet.java b/flexible/analytics/src/main/java/com/example/analytics/AnalyticsServlet.java index 6ae1033c9d6..198aa35e02c 100644 --- a/flexible/analytics/src/main/java/com/example/analytics/AnalyticsServlet.java +++ b/flexible/analytics/src/main/java/com/example/analytics/AnalyticsServlet.java @@ -29,7 +29,7 @@ import org.apache.http.client.utils.URIBuilder; import org.apache.http.impl.client.HttpClientBuilder; -// [START example] +// [START gae_flex_analytics_track_event] @SuppressWarnings("serial") @WebServlet(name = "analytics", value = "") public class AnalyticsServlet extends HttpServlet { @@ -63,4 +63,4 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) resp.getWriter().println("Event tracked."); } } -// [END example] +// [END gae_flex_analytics_track_event] diff --git a/flexible/cloudsql/pom.xml b/flexible/cloudsql/pom.xml index 12ba5547e23..7fa6f1560ce 100644 --- a/flexible/cloudsql/pom.xml +++ b/flexible/cloudsql/pom.xml @@ -30,7 +30,7 @@ 1.0.9 - + jdbc:mysql://google/${database}?cloudSqlInstance=${INSTANCE_CONNECTION_NAME}&socketFactory=com.google.cloud.sql.mysql.SocketFactory&user=${user}&password=${password}&useSSL=false - + @@ -75,7 +75,7 @@ jar provided - + mysql mysql-connector-java @@ -86,17 +86,17 @@ mysql-socket-factory-connector-j-6 1.0.10 - + - + src/main/resources true - + ${project.build.directory}/${project.build.finalName}/WEB-INF/classes diff --git a/flexible/cloudsql/src/main/java/com/example/cloudsql/CloudSqlServlet.java b/flexible/cloudsql/src/main/java/com/example/cloudsql/CloudSqlServlet.java index 80826a40dea..79d678b4ccc 100644 --- a/flexible/cloudsql/src/main/java/com/example/cloudsql/CloudSqlServlet.java +++ b/flexible/cloudsql/src/main/java/com/example/cloudsql/CloudSqlServlet.java @@ -39,7 +39,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -// [START example] +// [START gae_flex_mysql_app] @SuppressWarnings("serial") @WebServlet(name = "cloudsql", value = "") public class CloudSqlServlet extends HttpServlet { @@ -126,4 +126,4 @@ public void init() throws ServletException { } } } -// [END example] +// [END gae_flex_mysql_app] diff --git a/flexible/cloudstorage/src/main/appengine/app.yaml b/flexible/cloudstorage/src/main/appengine/app.yaml index da52dfa3ff2..c1b2c4799e2 100644 --- a/flexible/cloudstorage/src/main/appengine/app.yaml +++ b/flexible/cloudstorage/src/main/appengine/app.yaml @@ -5,7 +5,5 @@ handlers: - url: /.* script: this field is required, but ignored -# [START env_variables] env_variables: BUCKET_NAME: YOUR-BUCKET-NAME -# [END env_variables] diff --git a/flexible/cloudstorage/src/main/java/com/example/cloudstorage/UploadServlet.java b/flexible/cloudstorage/src/main/java/com/example/cloudstorage/UploadServlet.java index 22ae9db90a2..f296e3e8f2b 100644 --- a/flexible/cloudstorage/src/main/java/com/example/cloudstorage/UploadServlet.java +++ b/flexible/cloudstorage/src/main/java/com/example/cloudstorage/UploadServlet.java @@ -34,7 +34,7 @@ import javax.servlet.http.HttpServletResponse; import javax.servlet.http.Part; -// [START example] +// [START gae_flex_storage_app] @SuppressWarnings("serial") @WebServlet(name = "upload", value = "/upload") @MultipartConfig() @@ -67,4 +67,4 @@ public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOEx resp.getWriter().print(blob.getMediaLink()); } } -// [END example] +// [END gae_flex_storage_app] diff --git a/flexible/datastore/pom.xml b/flexible/datastore/pom.xml index 2cb08456982..ed2653c3ed8 100644 --- a/flexible/datastore/pom.xml +++ b/flexible/datastore/pom.xml @@ -45,13 +45,13 @@ jar provided - + com.google.cloud google-cloud-datastore 1.38.0 - + diff --git a/flexible/datastore/src/main/java/com/example/datastore/DatastoreServlet.java b/flexible/datastore/src/main/java/com/example/datastore/DatastoreServlet.java index 341c0763a7d..3742964ef34 100644 --- a/flexible/datastore/src/main/java/com/example/datastore/DatastoreServlet.java +++ b/flexible/datastore/src/main/java/com/example/datastore/DatastoreServlet.java @@ -39,7 +39,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -// [START example] +// [START gae_flex_datastore_app] @SuppressWarnings("serial") @WebServlet(name = "datastore", value = "") public class DatastoreServlet extends HttpServlet { @@ -82,4 +82,4 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOExc } } } -// [END example] +// [END gae_flex_datastore_app] diff --git a/flexible/mailgun/pom.xml b/flexible/mailgun/pom.xml index b027b8a65b3..f6d79b603ff 100644 --- a/flexible/mailgun/pom.xml +++ b/flexible/mailgun/pom.xml @@ -48,7 +48,7 @@ jar provided - + com.sun.jersey jersey-core @@ -64,7 +64,7 @@ jersey-multipart 1.19.4 - + diff --git a/flexible/mailgun/src/main/java/com/example/mailgun/MailgunServlet.java b/flexible/mailgun/src/main/java/com/example/mailgun/MailgunServlet.java index 8d990fb2289..fc1cb3e4103 100644 --- a/flexible/mailgun/src/main/java/com/example/mailgun/MailgunServlet.java +++ b/flexible/mailgun/src/main/java/com/example/mailgun/MailgunServlet.java @@ -33,7 +33,6 @@ import javax.servlet.http.HttpServletResponse; import javax.ws.rs.core.MediaType; -// [START example] @SuppressWarnings("serial") @WebServlet(name = "mailgun", value = "/send/email") public class MailgunServlet extends HttpServlet { @@ -57,7 +56,7 @@ public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOEx } //CHECKSTYLE OFF: VariableDeclarationUsageDistance - // [START simple] + // [START gae_flex_mailgun_simple_message] private ClientResponse sendSimpleMessage(String recipient) { Client client = Client.create(); client.addFilter(new HTTPBasicAuthFilter("api", MAILGUN_API_KEY)); @@ -71,9 +70,9 @@ private ClientResponse sendSimpleMessage(String recipient) { return webResource.type(MediaType.APPLICATION_FORM_URLENCODED).post(ClientResponse.class, formData); } - // [END simple] + // [END gae_flex_mailgun_simple_message] - // [START complex] + // [START gae_flex_mailgun_complex_message] private ClientResponse sendComplexMessage(String recipient) { Client client = Client.create(); client.addFilter(new HTTPBasicAuthFilter("api", MAILGUN_API_KEY)); @@ -90,7 +89,6 @@ private ClientResponse sendComplexMessage(String recipient) { return webResource.type(MediaType.MULTIPART_FORM_DATA_TYPE) .post(ClientResponse.class, formData); } - // [END complex] + // [END gae_flex_mailgun_complex_message] //CHECKSTYLE ON: VariableDeclarationUsageDistance } -// [END example] diff --git a/flexible/mailjet/pom.xml b/flexible/mailjet/pom.xml index e71bb60481f..e8b46412c0d 100644 --- a/flexible/mailjet/pom.xml +++ b/flexible/mailjet/pom.xml @@ -50,13 +50,13 @@ jar provided - + com.mailjet mailjet-client ${mailjet-version} - + diff --git a/flexible/mailjet/src/main/appengine/app.yaml b/flexible/mailjet/src/main/appengine/app.yaml index a41ea04614a..8ecf1bb9370 100644 --- a/flexible/mailjet/src/main/appengine/app.yaml +++ b/flexible/mailjet/src/main/appengine/app.yaml @@ -5,8 +5,8 @@ handlers: - url: /.* script: this field is required, but ignored -# [START env_variables] +# [START gae_flex_mailjet_yaml] env_variables: MAILJET_API_KEY: YOUR-MAILJET-API-KEY MAILJET_SECRET_KEY: YOUR-MAILJET-SECRET-KEY -# [END env_variables] +# [END gae_flex_mailjet_yaml] diff --git a/flexible/mailjet/src/main/java/com/example/mailjet/MailjetServlet.java b/flexible/mailjet/src/main/java/com/example/mailjet/MailjetServlet.java index 3ba5e4f9d9b..96eba884e71 100644 --- a/flexible/mailjet/src/main/java/com/example/mailjet/MailjetServlet.java +++ b/flexible/mailjet/src/main/java/com/example/mailjet/MailjetServlet.java @@ -14,7 +14,7 @@ * limitations under the License. */ -// [START mailjet_imports] +// [START gae_flex_mailjet_config] package com.example.mailjet; @@ -34,9 +34,9 @@ import org.json.JSONArray; import org.json.JSONObject; -// [END mailjet_imports] +// [END gae_flex_mailjet_config] -// [START app] +// [START gae_flex_mailjet_send_message] @SuppressWarnings("serial") @WebServlet(name = "mailjet", value = "/send/email") public class MailjetServlet extends HttpServlet { @@ -80,4 +80,4 @@ public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOEx } } } -// [END app] +// [END gae_flex_mailjet_send_message] diff --git a/flexible/postgres/pom.xml b/flexible/postgres/pom.xml index cd50869ec7a..4b650c62951 100644 --- a/flexible/postgres/pom.xml +++ b/flexible/postgres/pom.xml @@ -30,7 +30,7 @@ 1.0.9 - + jdbc:postgresql://google/${database}?useSSL=false&socketFactoryArg=${INSTANCE_CONNECTION_NAME}&socketFactory=com.google.cloud.sql.postgres.SocketFactory&user=${user}&password=${password} - + @@ -75,7 +75,7 @@ jar provided - + org.postgresql postgresql @@ -87,17 +87,17 @@ postgres-socket-factory 1.0.10 - + - + src/main/resources true - + ${project.build.directory}/${project.build.finalName}/WEB-INF/classes diff --git a/flexible/postgres/src/main/java/com/example/postgres/PostgresSqlServlet.java b/flexible/postgres/src/main/java/com/example/postgres/PostgresSqlServlet.java index 381757db852..3920af59efa 100644 --- a/flexible/postgres/src/main/java/com/example/postgres/PostgresSqlServlet.java +++ b/flexible/postgres/src/main/java/com/example/postgres/PostgresSqlServlet.java @@ -39,7 +39,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -// [START example] +// [START gae_flex_postgres_app] @SuppressWarnings("serial") @WebServlet(name = "postgresql", value = "") public class PostgresSqlServlet extends HttpServlet { @@ -124,4 +124,4 @@ public void init() throws ServletException { } } } -// [END example] +// [END gae_flex_postgres_app] diff --git a/flexible/pubsub/pom.xml b/flexible/pubsub/pom.xml index 559f01583d1..4ab16e117d7 100644 --- a/flexible/pubsub/pom.xml +++ b/flexible/pubsub/pom.xml @@ -13,7 +13,6 @@ See the License for the specific language governing permissions and limitations under the License. --> - 4.0.0 war @@ -62,7 +61,6 @@ provided - com.google.cloud google-cloud-pubsub @@ -73,7 +71,6 @@ google-cloud-datastore 1.38.0 - @@ -122,4 +119,3 @@ - diff --git a/flexible/pubsub/src/main/appengine/app.yaml b/flexible/pubsub/src/main/appengine/app.yaml index 5233b58b21c..4665b40ad36 100644 --- a/flexible/pubsub/src/main/appengine/app.yaml +++ b/flexible/pubsub/src/main/appengine/app.yaml @@ -10,7 +10,7 @@ # 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. -# [START appyaml] + runtime: java env: flex @@ -18,9 +18,8 @@ handlers: - url: /.* script: this field is required, but ignored -# [START env_variables] +# [START gae_flex_pubsub_yaml] env_variables: PUBSUB_TOPIC: PUBSUB_VERIFICATION_TOKEN: -# [END env_variables] -# [END appyaml] +# [END gae_flex_pubsub_yaml] diff --git a/flexible/sendgrid/pom.xml b/flexible/sendgrid/pom.xml index d149bf3a8f3..fea3f0a670b 100644 --- a/flexible/sendgrid/pom.xml +++ b/flexible/sendgrid/pom.xml @@ -48,13 +48,13 @@ jar provided - + com.sendgrid sendgrid-java 2.2.2 - + diff --git a/flexible/sendgrid/src/main/appengine/app.yaml b/flexible/sendgrid/src/main/appengine/app.yaml index 0efc5d7b4d2..431a03ca3e7 100644 --- a/flexible/sendgrid/src/main/appengine/app.yaml +++ b/flexible/sendgrid/src/main/appengine/app.yaml @@ -5,8 +5,8 @@ handlers: - url: /.* script: this field is required, but ignored -# [START env_variables] +# [START gae_flex_sendgrid_yaml] env_variables: SENDGRID_API_KEY: YOUR-SENDGRID-API-KEY SENDGRID_SENDER: YOUR-SENDGRID-SENDER -# [END env_variables] +# [END gae_flex_sendgrid_yaml] diff --git a/flexible/sendgrid/src/main/java/com/example/sendgrid/SendEmailServlet.java b/flexible/sendgrid/src/main/java/com/example/sendgrid/SendEmailServlet.java index 62084136490..7e2e43e53ed 100644 --- a/flexible/sendgrid/src/main/java/com/example/sendgrid/SendEmailServlet.java +++ b/flexible/sendgrid/src/main/java/com/example/sendgrid/SendEmailServlet.java @@ -27,7 +27,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -// [START example] +// [START gae_flex_sendgrid] @SuppressWarnings("serial") @WebServlet(name = "sendemail", value = "/send/email") public class SendEmailServlet extends HttpServlet { @@ -63,4 +63,4 @@ public void service(HttpServletRequest req, HttpServletResponse resp) throws IOE } } } -// [END example] +// [END gae_flex_sendgrid] diff --git a/flexible/twilio/pom.xml b/flexible/twilio/pom.xml index 1c2a85b3301..a97e9bf2b6f 100644 --- a/flexible/twilio/pom.xml +++ b/flexible/twilio/pom.xml @@ -41,13 +41,13 @@ - + com.twilio.sdk twilio-java-sdk 6.3.0 - + javax.servlet javax.servlet-api diff --git a/flexible/twilio/src/main/appengine/app.yaml b/flexible/twilio/src/main/appengine/app.yaml index 1ee3836bcef..c1af1764ff7 100644 --- a/flexible/twilio/src/main/appengine/app.yaml +++ b/flexible/twilio/src/main/appengine/app.yaml @@ -5,9 +5,9 @@ handlers: - url: /.* script: this field is required, but ignored -# [START env_variables] +# [START gae_flex_twilio_env] env_variables: TWILIO_ACCOUNT_SID: YOUR-TWILIO-ACCOUNT-SID TWILIO_AUTH_TOKEN: YOUR-TWILIO-AUTH-TOKEN TWILIO_NUMBER: YOUR-TWILIO-NUMBER -# [END env_variables] +# [END gae_flex_twilio_env] diff --git a/flexible/twilio/src/main/java/com/example/twilio/ReceiveCallServlet.java b/flexible/twilio/src/main/java/com/example/twilio/ReceiveCallServlet.java index 48b22671dc9..53c8874afa9 100644 --- a/flexible/twilio/src/main/java/com/example/twilio/ReceiveCallServlet.java +++ b/flexible/twilio/src/main/java/com/example/twilio/ReceiveCallServlet.java @@ -26,7 +26,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -// [START example] +// [START gae_flex_twilio_receive_call] @SuppressWarnings("serial") @WebServlet(name = "receivecall", value = "/call/receive") public class ReceiveCallServlet extends HttpServlet { @@ -46,4 +46,4 @@ public void service(HttpServletRequest req, HttpServletResponse resp) throws IOE resp.getWriter().print(twiml.toXML()); } } -// [END example] +// [END gae_flex_twilio_receive_call] diff --git a/flexible/twilio/src/main/java/com/example/twilio/ReceiveSmsServlet.java b/flexible/twilio/src/main/java/com/example/twilio/ReceiveSmsServlet.java index f13d774c18f..65f99333bca 100644 --- a/flexible/twilio/src/main/java/com/example/twilio/ReceiveSmsServlet.java +++ b/flexible/twilio/src/main/java/com/example/twilio/ReceiveSmsServlet.java @@ -26,7 +26,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -// [START example] +// [START gae_flex_twilio_receive_sms] @SuppressWarnings("serial") @WebServlet(name = "receivesms", value = "/sms/receive") public class ReceiveSmsServlet extends HttpServlet { @@ -50,4 +50,4 @@ public void service(HttpServletRequest request, HttpServletResponse response) th response.getWriter().print(twiml.toXML()); } } -// [END example] +// [END gae_flex_twilio_receive_sms] diff --git a/flexible/twilio/src/main/java/com/example/twilio/SendSmsServlet.java b/flexible/twilio/src/main/java/com/example/twilio/SendSmsServlet.java index 3c54f9eb3ae..1fc2ff12418 100644 --- a/flexible/twilio/src/main/java/com/example/twilio/SendSmsServlet.java +++ b/flexible/twilio/src/main/java/com/example/twilio/SendSmsServlet.java @@ -32,7 +32,7 @@ import org.apache.http.NameValuePair; import org.apache.http.message.BasicNameValuePair; -// [START example] +// [START gae_flex_twilio_send_sms] @SuppressWarnings("serial") @WebServlet(name = "sendsms", value = "/sms/send") public class SendSmsServlet extends HttpServlet { @@ -64,4 +64,4 @@ public void service(HttpServletRequest req, HttpServletResponse resp) throws IOE } } } -// [END example] +// [END gae_flex_twilio_send_sms]