registrationEntry :
+ servletRegistrations.entrySet()) {
+ if (!ignorePatterns.contains(registrationEntry.getKey())) {
+ for (String mapping : registrationEntry.getValue().getMappings()) {
+ sb.append("");
+ sb.append(registrationEntry.getKey());
+ sb.append("");
+ samplesList.add(sb.toString());
+ sb.setLength(0);
+ }
+ }
+ }
+ return samplesList;
+ }
+}
\ No newline at end of file
diff --git a/flexible/analytics/src/main/java/com/example/analytics/AnalyticsServlet.java b/flexible/java/samples/src/main/java/com/example/flexible/analytics/AnalyticsServlet.java
similarity index 95%
rename from flexible/analytics/src/main/java/com/example/analytics/AnalyticsServlet.java
rename to flexible/java/samples/src/main/java/com/example/flexible/analytics/AnalyticsServlet.java
index d451a799629..3ebf8a553ef 100644
--- a/flexible/analytics/src/main/java/com/example/analytics/AnalyticsServlet.java
+++ b/flexible/java/samples/src/main/java/com/example/flexible/analytics/AnalyticsServlet.java
@@ -14,26 +14,24 @@
* limitations under the License.
*/
-package com.example.analytics;
-
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.client.utils.URIBuilder;
-import org.apache.http.impl.client.HttpClientBuilder;
+package com.example.flexible.analytics;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
-
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.utils.URIBuilder;
+import org.apache.http.impl.client.HttpClientBuilder;
// [START example]
@SuppressWarnings("serial")
-@WebServlet(name = "analytics", value = "")
+@WebServlet(name = "Add Google Analytics event", value = "/analytics")
public class AnalyticsServlet extends HttpServlet {
@Override
diff --git a/flexible/cloudsql/src/main/java/com/example/cloudsql/CloudSqlServlet.java b/flexible/java/samples/src/main/java/com/example/flexible/cloudsql/CloudSqlServlet.java
similarity index 97%
rename from flexible/cloudsql/src/main/java/com/example/cloudsql/CloudSqlServlet.java
rename to flexible/java/samples/src/main/java/com/example/flexible/cloudsql/CloudSqlServlet.java
index 45558bb24f8..b03ad85e86e 100644
--- a/flexible/cloudsql/src/main/java/com/example/cloudsql/CloudSqlServlet.java
+++ b/flexible/java/samples/src/main/java/com/example/flexible/cloudsql/CloudSqlServlet.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.example.cloudsql;
+package com.example.flexible.cloudsql;
import java.io.IOException;
import java.io.PrintWriter;
@@ -29,7 +29,6 @@
import java.sql.Timestamp;
import java.util.Date;
import java.util.Properties;
-
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
@@ -38,7 +37,7 @@
// [START example]
@SuppressWarnings("serial")
-@WebServlet(name = "cloudsql", value = "")
+@WebServlet(name = "CloudSQL Sample", value = "/cloudsql")
public class CloudSqlServlet extends HttpServlet {
String url;
diff --git a/flexible/cron/src/main/java/com/example/cron/CronServlet.java b/flexible/java/samples/src/main/java/com/example/flexible/cron/CronServlet.java
similarity index 97%
rename from flexible/cron/src/main/java/com/example/cron/CronServlet.java
rename to flexible/java/samples/src/main/java/com/example/flexible/cron/CronServlet.java
index 998e013b2e2..83e003282e9 100644
--- a/flexible/cron/src/main/java/com/example/cron/CronServlet.java
+++ b/flexible/java/samples/src/main/java/com/example/flexible/cron/CronServlet.java
@@ -14,11 +14,10 @@
* limitations under the License.
*/
-package com.example.cron;
+package com.example.flexible.cron;
import java.io.IOException;
import java.io.PrintWriter;
-
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
diff --git a/flexible/datastore/src/main/java/com/example/datastore/DatastoreServlet.java b/flexible/java/samples/src/main/java/com/example/flexible/datastore/DatastoreServlet.java
similarity index 97%
rename from flexible/datastore/src/main/java/com/example/datastore/DatastoreServlet.java
rename to flexible/java/samples/src/main/java/com/example/flexible/datastore/DatastoreServlet.java
index ef9822cd1f8..d8cc888b002 100644
--- a/flexible/datastore/src/main/java/com/example/datastore/DatastoreServlet.java
+++ b/flexible/java/samples/src/main/java/com/example/flexible/datastore/DatastoreServlet.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.example.managedvms.datastore;
+package com.example.flexible.datastore;
import com.google.cloud.datastore.Datastore;
import com.google.cloud.datastore.DatastoreOptions;
@@ -26,13 +26,11 @@
import com.google.cloud.datastore.Query;
import com.google.cloud.datastore.QueryResults;
import com.google.cloud.datastore.StructuredQuery;
-
import java.io.IOException;
import java.io.PrintWriter;
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
-
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
@@ -41,7 +39,7 @@
// [START example]
@SuppressWarnings("serial")
-@WebServlet(name = "datastore", value = "")
+@WebServlet(name = "Datastore Sample", value = "/datastore")
public class DatastoreServlet extends HttpServlet {
@Override
diff --git a/flexible/disk/src/main/java/com/example/disk/DiskServlet.java b/flexible/java/samples/src/main/java/com/example/flexible/disk/DiskServlet.java
similarity index 96%
rename from flexible/disk/src/main/java/com/example/disk/DiskServlet.java
rename to flexible/java/samples/src/main/java/com/example/flexible/disk/DiskServlet.java
index 24c0e5b027a..63b3c31631d 100644
--- a/flexible/disk/src/main/java/com/example/disk/DiskServlet.java
+++ b/flexible/java/samples/src/main/java/com/example/flexible/disk/DiskServlet.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.example.disk;
+package com.example.flexible.disk;
import java.io.IOException;
import java.io.PrintWriter;
@@ -27,7 +27,6 @@
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.util.List;
-
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
@@ -35,7 +34,7 @@
// [START example]
@SuppressWarnings("serial")
-@WebServlet(name = "disk", value = "")
+@WebServlet(name = "Read/Write to disk", value = "/disk")
public class DiskServlet extends HttpServlet {
@Override
diff --git a/flexible/mailgun/src/main/java/com/example/mailgun/MailgunServlet.java b/flexible/java/samples/src/main/java/com/example/flexible/mailgun/MailgunServlet.java
similarity index 99%
rename from flexible/mailgun/src/main/java/com/example/mailgun/MailgunServlet.java
rename to flexible/java/samples/src/main/java/com/example/flexible/mailgun/MailgunServlet.java
index 304cd05f917..e06781c3350 100644
--- a/flexible/mailgun/src/main/java/com/example/mailgun/MailgunServlet.java
+++ b/flexible/java/samples/src/main/java/com/example/flexible/mailgun/MailgunServlet.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.example.mailgun;
+package com.example.flexible.mailgun;
import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.ClientResponse;
@@ -23,10 +23,8 @@
import com.sun.jersey.core.util.MultivaluedMapImpl;
import com.sun.jersey.multipart.FormDataMultiPart;
import com.sun.jersey.multipart.file.FileDataBodyPart;
-
import java.io.File;
import java.io.IOException;
-
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
diff --git a/flexible/mailjet/src/main/java/com/example/mailjet/MailjetServlet.java b/flexible/java/samples/src/main/java/com/example/flexible/mailjet/MailjetServlet.java
similarity index 96%
rename from flexible/mailjet/src/main/java/com/example/mailjet/MailjetServlet.java
rename to flexible/java/samples/src/main/java/com/example/flexible/mailjet/MailjetServlet.java
index b8723834431..af2e5d1f139 100644
--- a/flexible/mailjet/src/main/java/com/example/mailjet/MailjetServlet.java
+++ b/flexible/java/samples/src/main/java/com/example/flexible/mailjet/MailjetServlet.java
@@ -15,7 +15,7 @@
*/
// [START mailjet_imports]
-package com.example.mailjet;
+package com.example.flexible.mailjet;
import com.mailjet.client.MailjetClient;
import com.mailjet.client.MailjetRequest;
@@ -38,7 +38,7 @@
// [START app]
@SuppressWarnings("serial")
-@WebServlet(name = "mailjet", value = "/send/email")
+@WebServlet(name = "Send an email using MailJet", value = "/mailjet/send/email")
public class MailjetServlet extends HttpServlet {
private static final String MAILJET_API_KEY = System.getenv("MAILJET_API_KEY");
private static final String MAILJET_SECRET_KEY = System.getenv("MAILJET_SECRET_KEY");
diff --git a/flexible/memcache/src/main/java/com/example/memcache/MemcacheServlet.java b/flexible/java/samples/src/main/java/com/example/flexible/memcache/MemcacheServlet.java
similarity index 95%
rename from flexible/memcache/src/main/java/com/example/memcache/MemcacheServlet.java
rename to flexible/java/samples/src/main/java/com/example/flexible/memcache/MemcacheServlet.java
index ad46b2437bd..163d3eb6ac3 100644
--- a/flexible/memcache/src/main/java/com/example/memcache/MemcacheServlet.java
+++ b/flexible/java/samples/src/main/java/com/example/flexible/memcache/MemcacheServlet.java
@@ -14,26 +14,24 @@
* limitations under the License.
*/
-package com.example.memcache;
-
-import net.rubyeye.xmemcached.MemcachedClient;
-import net.rubyeye.xmemcached.MemcachedClientBuilder;
-import net.rubyeye.xmemcached.XMemcachedClientBuilder;
-import net.rubyeye.xmemcached.exception.MemcachedException;
-import net.rubyeye.xmemcached.utils.AddrUtil;
+package com.example.flexible.memcache;
import java.io.IOException;
import java.util.concurrent.TimeoutException;
-
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import net.rubyeye.xmemcached.MemcachedClient;
+import net.rubyeye.xmemcached.MemcachedClientBuilder;
+import net.rubyeye.xmemcached.XMemcachedClientBuilder;
+import net.rubyeye.xmemcached.exception.MemcachedException;
+import net.rubyeye.xmemcached.utils.AddrUtil;
// [START example]
@SuppressWarnings("serial")
-@WebServlet(name = "memcache", value = "")
+@WebServlet(name = "Memcache sample", value = "/memcache")
public class MemcacheServlet extends HttpServlet {
@Override
diff --git a/flexible/sendgrid/src/main/java/com/example/sendgrid/SendEmailServlet.java b/flexible/java/samples/src/main/java/com/example/flexible/sendgrid/SendEmailServlet.java
similarity index 94%
rename from flexible/sendgrid/src/main/java/com/example/sendgrid/SendEmailServlet.java
rename to flexible/java/samples/src/main/java/com/example/flexible/sendgrid/SendEmailServlet.java
index cfbd0232d04..8ac7c480e23 100644
--- a/flexible/sendgrid/src/main/java/com/example/sendgrid/SendEmailServlet.java
+++ b/flexible/java/samples/src/main/java/com/example/flexible/sendgrid/SendEmailServlet.java
@@ -14,13 +14,11 @@
* limitations under the License.
*/
-package com.example.sendgrid;
+package com.example.flexible.sendgrid;
import com.sendgrid.SendGrid;
import com.sendgrid.SendGridException;
-
import java.io.IOException;
-
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
@@ -29,7 +27,7 @@
// [START example]
@SuppressWarnings("serial")
-@WebServlet(name = "sendemail", value = "/send/email")
+@WebServlet(name = "Send an email using SendGrid", value = "/sendgrid/email/send")
public class SendEmailServlet extends HttpServlet {
@Override
diff --git a/flexible/twilio/src/main/java/com/example/twilio/ReceiveCallServlet.java b/flexible/java/samples/src/main/java/com/example/flexible/twilio/ReceiveCallServlet.java
similarity index 93%
rename from flexible/twilio/src/main/java/com/example/twilio/ReceiveCallServlet.java
rename to flexible/java/samples/src/main/java/com/example/flexible/twilio/ReceiveCallServlet.java
index 9fb115f9ab1..a40c0b03ddc 100644
--- a/flexible/twilio/src/main/java/com/example/twilio/ReceiveCallServlet.java
+++ b/flexible/java/samples/src/main/java/com/example/flexible/twilio/ReceiveCallServlet.java
@@ -14,14 +14,12 @@
* limitations under the License.
*/
-package com.example.twilio;
+package com.example.flexible.twilio;
import com.twilio.sdk.verbs.Say;
import com.twilio.sdk.verbs.TwiMLException;
import com.twilio.sdk.verbs.TwiMLResponse;
-
import java.io.IOException;
-
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
@@ -30,7 +28,7 @@
// [START example]
@SuppressWarnings("serial")
-@WebServlet(name = "receivecall", value = "/call/receive")
+@WebServlet(name = "Receive a call", value = "/twillio/call/receive")
public class ReceiveCallServlet extends HttpServlet {
@Override
diff --git a/flexible/twilio/src/main/java/com/example/twilio/ReceiveSmsServlet.java b/flexible/java/samples/src/main/java/com/example/flexible/twilio/ReceiveSmsServlet.java
similarity index 94%
rename from flexible/twilio/src/main/java/com/example/twilio/ReceiveSmsServlet.java
rename to flexible/java/samples/src/main/java/com/example/flexible/twilio/ReceiveSmsServlet.java
index 5a47ea3b303..5b7488617f8 100644
--- a/flexible/twilio/src/main/java/com/example/twilio/ReceiveSmsServlet.java
+++ b/flexible/java/samples/src/main/java/com/example/flexible/twilio/ReceiveSmsServlet.java
@@ -14,14 +14,12 @@
* limitations under the License.
*/
-package com.example.twilio;
+package com.example.flexible.twilio;
import com.twilio.sdk.verbs.Message;
import com.twilio.sdk.verbs.TwiMLException;
import com.twilio.sdk.verbs.TwiMLResponse;
-
import java.io.IOException;
-
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
@@ -30,7 +28,7 @@
// [START example]
@SuppressWarnings("serial")
-@WebServlet(name = "receivesms", value = "/sms/receive")
+@WebServlet(name = "Receive an SMS", value = "/twillio/sms/receive")
public class ReceiveSmsServlet extends HttpServlet {
@Override
diff --git a/flexible/twilio/src/main/java/com/example/twilio/SendSmsServlet.java b/flexible/java/samples/src/main/java/com/example/flexible/twilio/SendSmsServlet.java
similarity index 96%
rename from flexible/twilio/src/main/java/com/example/twilio/SendSmsServlet.java
rename to flexible/java/samples/src/main/java/com/example/flexible/twilio/SendSmsServlet.java
index ae0af6c6564..a7fab3c907c 100644
--- a/flexible/twilio/src/main/java/com/example/twilio/SendSmsServlet.java
+++ b/flexible/java/samples/src/main/java/com/example/flexible/twilio/SendSmsServlet.java
@@ -14,29 +14,27 @@
* limitations under the License.
*/
-package com.example.twilio;
+package com.example.flexible.twilio;
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.factory.MessageFactory;
import com.twilio.sdk.resource.instance.Account;
import com.twilio.sdk.resource.instance.Message;
-import org.apache.http.NameValuePair;
-import org.apache.http.message.BasicNameValuePair;
-
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.apache.http.NameValuePair;
+import org.apache.http.message.BasicNameValuePair;
// [START example]
@SuppressWarnings("serial")
-@WebServlet(name = "sendsms", value = "/sms/send")
+@WebServlet(name = "Send an SMS", value = "/twillio/sms/send")
public class SendSmsServlet extends HttpServlet {
@Override
diff --git a/flexible/cloudstorage/src/main/java/com/example/cloudstorage/UploadServlet.java b/flexible/java/samples/src/main/java/com/example/flexible/upload/UploadServlet.java
similarity index 94%
rename from flexible/cloudstorage/src/main/java/com/example/cloudstorage/UploadServlet.java
rename to flexible/java/samples/src/main/java/com/example/flexible/upload/UploadServlet.java
index 6223073be4e..947b965fae3 100644
--- a/flexible/cloudstorage/src/main/java/com/example/cloudstorage/UploadServlet.java
+++ b/flexible/java/samples/src/main/java/com/example/flexible/upload/UploadServlet.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.example.cloudstorage;
+package com.example.flexible.upload;
import com.google.cloud.storage.Acl;
import com.google.cloud.storage.Blob;
@@ -34,9 +34,9 @@
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.Part;
-// [START example]
+// [START upload]
@SuppressWarnings("serial")
-@WebServlet(name = "upload", value = "/upload")
+@WebServlet(name = "Upload a file to a GCS bucket", value = "/upload")
@MultipartConfig()
public class UploadServlet extends HttpServlet {
@@ -67,4 +67,4 @@ public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOEx
resp.getWriter().print(blob.getMediaLink());
}
}
-// [END example]
+// [END upload]
diff --git a/flexible/cloudsql/src/main/resources/config.properties b/flexible/java/samples/src/main/resources/config.properties
similarity index 100%
rename from flexible/cloudsql/src/main/resources/config.properties
rename to flexible/java/samples/src/main/resources/config.properties
diff --git a/flexible/mailgun/src/main/resources/example-attachment.txt b/flexible/java/samples/src/main/resources/example-attachment.txt
similarity index 100%
rename from flexible/mailgun/src/main/resources/example-attachment.txt
rename to flexible/java/samples/src/main/resources/example-attachment.txt
diff --git a/flexible/java/samples/src/main/webapp/analytics.html b/flexible/java/samples/src/main/webapp/analytics.html
new file mode 100644
index 00000000000..7d77c8bb4b0
--- /dev/null
+++ b/flexible/java/samples/src/main/webapp/analytics.html
@@ -0,0 +1,10 @@
+
+Google Analytics Tracking Sample
+
+Add Google analytics tracking to a GAE Flex App
+
+
+
+
diff --git a/flexible/java/samples/src/main/webapp/cloudsql.html b/flexible/java/samples/src/main/webapp/cloudsql.html
new file mode 100644
index 00000000000..9ae8d67d131
--- /dev/null
+++ b/flexible/java/samples/src/main/webapp/cloudsql.html
@@ -0,0 +1,9 @@
+
+Google Cloud SQL Sample
+
+
+
+
diff --git a/flexible/java/samples/src/main/webapp/datastore.html b/flexible/java/samples/src/main/webapp/datastore.html
new file mode 100644
index 00000000000..c764800cd8a
--- /dev/null
+++ b/flexible/java/samples/src/main/webapp/datastore.html
@@ -0,0 +1,9 @@
+
+Google Cloud SQL Sample
+
+
+
+
diff --git a/flexible/java/samples/src/main/webapp/disk.html b/flexible/java/samples/src/main/webapp/disk.html
new file mode 100644
index 00000000000..b9ae074ebb7
--- /dev/null
+++ b/flexible/java/samples/src/main/webapp/disk.html
@@ -0,0 +1,9 @@
+
+Disk Sample
+
+
+
+
\ No newline at end of file
diff --git a/flexible/java/samples/src/main/webapp/index.jsp b/flexible/java/samples/src/main/webapp/index.jsp
new file mode 100644
index 00000000000..a88b2df760d
--- /dev/null
+++ b/flexible/java/samples/src/main/webapp/index.jsp
@@ -0,0 +1,19 @@
+<%@ page import="com.example.flexible.SamplesIndex" %>
+
+
+ GAE Flex Samples
+
+
+
+ <%
+ for (String sample : SamplesIndex.getSamples(request)) {
+ %>
+ - <%= sample %>
+
+ <%
+ }
+ %>
+ - A static HTML page
+
+
+
\ No newline at end of file
diff --git a/flexible/mailgun/src/main/webapp/index.html b/flexible/java/samples/src/main/webapp/mailgun/email/send.html
similarity index 87%
rename from flexible/mailgun/src/main/webapp/index.html
rename to flexible/java/samples/src/main/webapp/mailgun/email/send.html
index 96d9a88b936..804030b7955 100644
--- a/flexible/mailgun/src/main/webapp/index.html
+++ b/flexible/java/samples/src/main/webapp/mailgun/email/send.html
@@ -5,7 +5,7 @@
-
+
+
+
diff --git a/flexible/java/samples/src/main/webapp/memcache.html b/flexible/java/samples/src/main/webapp/memcache.html
new file mode 100644
index 00000000000..973c7ca5750
--- /dev/null
+++ b/flexible/java/samples/src/main/webapp/memcache.html
@@ -0,0 +1,12 @@
+
+
+
+
+ Memcache test
+
+
+
+
+
\ No newline at end of file
diff --git a/flexible/java/samples/src/main/webapp/sendgrid/email/send.html b/flexible/java/samples/src/main/webapp/sendgrid/email/send.html
new file mode 100644
index 00000000000..13a563c6ff6
--- /dev/null
+++ b/flexible/java/samples/src/main/webapp/sendgrid/email/send.html
@@ -0,0 +1,10 @@
+
+Send an email using SendGrid
+
+
+
+
\ No newline at end of file
diff --git a/flexible/static-files/src/main/webapp/index.html b/flexible/java/samples/src/main/webapp/static.html
similarity index 100%
rename from flexible/static-files/src/main/webapp/index.html
rename to flexible/java/samples/src/main/webapp/static.html
diff --git a/flexible/static-files/src/main/webapp/stylesheets/styles.css b/flexible/java/samples/src/main/webapp/stylesheets/styles.css
similarity index 100%
rename from flexible/static-files/src/main/webapp/stylesheets/styles.css
rename to flexible/java/samples/src/main/webapp/stylesheets/styles.css
diff --git a/flexible/java/samples/src/main/webapp/twillio/call/receive.html b/flexible/java/samples/src/main/webapp/twillio/call/receive.html
new file mode 100644
index 00000000000..f1b793dc771
--- /dev/null
+++ b/flexible/java/samples/src/main/webapp/twillio/call/receive.html
@@ -0,0 +1,8 @@
+
+Twilio Code Samples
+
+
+
+
\ No newline at end of file
diff --git a/flexible/java/samples/src/main/webapp/twillio/sms/receive.html b/flexible/java/samples/src/main/webapp/twillio/sms/receive.html
new file mode 100644
index 00000000000..b5c825e0d56
--- /dev/null
+++ b/flexible/java/samples/src/main/webapp/twillio/sms/receive.html
@@ -0,0 +1,8 @@
+
+Twilio Code Samples
+
+
+
+
\ No newline at end of file
diff --git a/flexible/java/samples/src/main/webapp/twillio/sms/send.html b/flexible/java/samples/src/main/webapp/twillio/sms/send.html
new file mode 100644
index 00000000000..b33ac23a0d8
--- /dev/null
+++ b/flexible/java/samples/src/main/webapp/twillio/sms/send.html
@@ -0,0 +1,9 @@
+
+Twilio Code Samples
+
+
+
+
\ No newline at end of file
diff --git a/flexible/cloudstorage/src/main/webapp/index.html b/flexible/java/samples/src/main/webapp/upload.html
similarity index 81%
rename from flexible/cloudstorage/src/main/webapp/index.html
rename to flexible/java/samples/src/main/webapp/upload.html
index 78e9c675a9b..0c8c12df7e3 100644
--- a/flexible/cloudstorage/src/main/webapp/index.html
+++ b/flexible/java/samples/src/main/webapp/upload.html
@@ -1,5 +1,5 @@
- Google Managed VMs Cloud Storage Sample
+ Cloud Storage Sample
Select a file to upload to your Google Cloud Storage bucket.
-
-
-
diff --git a/flexible/memcache/README.md b/flexible/memcache/README.md
deleted file mode 100644
index aab8ddf0d2e..00000000000
--- a/flexible/memcache/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# flexible/memcache
-
-How to use memcache on flexible.
-
-# NEEDS WORK
-
-This sample needs to be updated to use redis-memcache
diff --git a/flexible/memcache/pom.xml b/flexible/memcache/pom.xml
deleted file mode 100644
index 398c1765ea9..00000000000
--- a/flexible/memcache/pom.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
- 4.0.0
- war
- 1.0-SNAPSHOT
- com.example.flexible
- memcache
-
-
- doc-samples
- com.google.cloud
- 1.0.0
- ../..
-
-
-
- 1.8
- 1.8
-
- 1.0.0
- 9.3.8.v20160314
-
- false
-
-
-
-
- javax.servlet
- javax.servlet-api
- 3.1.0
- jar
- provided
-
-
-
- com.googlecode.xmemcached
- xmemcached
- 2.3.0
-
-
-
-
-
- ${project.build.directory}/${project.build.finalName}/WEB-INF/classes
-
-
-
- com.google.cloud.tools
- appengine-maven-plugin
- ${appengine.maven.plugin}
-
-
-
-
-
- org.eclipse.jetty
- jetty-maven-plugin
- ${jetty.maven.plugin}
-
-
-
-
diff --git a/flexible/memcache/src/main/appengine/app.yaml b/flexible/memcache/src/main/appengine/app.yaml
deleted file mode 100644
index 2bf46125d17..00000000000
--- a/flexible/memcache/src/main/appengine/app.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-runtime: java
-env: flex
-
-handlers:
-- url: /.*
- script: this field is required, but ignored
-
-# [START config]
-beta_settings:
- use_memcache_proxy: true
-# [END config]
diff --git a/flexible/sendgrid/README.md b/flexible/sendgrid/README.md
deleted file mode 100644
index d7786659624..00000000000
--- a/flexible/sendgrid/README.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Java SendGrid Email Sample for Google App Engine Flexible Environment
-
-This sample demonstrates how to use [SendGrid](https://www.sendgrid.com) on
-[Google App Engine flexible environment][aeflex-docs].
-
-See the [sample application documentaion][sample-docs] for more detailed
-instructions.
-
-For more information about SendGrid, see their
-[documentation](https://sendgrid.com/docs/User_Guide/index.html).
-
-[aeflex-docs]: https://cloud.google.com/appengine/docs/flexible/
-[sample-docs]: https://cloud.google.com/appengine/docs/flexible/java/sending-emails-with-sendgrid
-
-## Setup
-
-Before you can run or deploy the sample, you will need to do the following:
-
-1. [Create a SendGrid Account](http://sendgrid.com/partner/google). As of
- September 2015, Google users start with 25,000 free emails per month.
-1. Configure your SendGrid settings in the environment variables section in
- [`src/main/appengine/app.yaml`](src/main/appengine/app.yaml).
-
-## Running locally
-
-You can run the application locally and send emails from your local machine. You
-will need to set environment variables before starting your application:
-
- $ export SENDGRID_API_KEY=[your-sendgrid-api-key]
- $ export SENDGRID_SENDER=[your-sendgrid-sender-email-address]
- $ mvn clean jetty:run
diff --git a/flexible/sendgrid/pom.xml b/flexible/sendgrid/pom.xml
deleted file mode 100644
index 926dddb88a8..00000000000
--- a/flexible/sendgrid/pom.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
- 4.0.0
- war
- 1.0-SNAPSHOT
- com.example.managedvms
- managed-vms-sendgrid
-
-
- doc-samples
- com.google.cloud
- 1.0.0
- ../..
-
-
-
- 1.8
- 1.8
-
- 1.0.0
- 9.3.8.v20160314
-
- false
-
-
-
-
- javax.servlet
- javax.servlet-api
- 3.1.0
- jar
- provided
-
-
-
- com.sendgrid
- sendgrid-java
- 2.2.2
-
-
-
-
-
- ${project.build.directory}/${project.build.finalName}/WEB-INF/classes
-
-
- com.google.cloud.tools
- appengine-maven-plugin
- ${appengine.maven.plugin}
-
-
-
-
-
- org.eclipse.jetty
- jetty-maven-plugin
- ${jetty.maven.plugin}
-
-
-
-
diff --git a/flexible/sendgrid/src/main/appengine/app.yaml b/flexible/sendgrid/src/main/appengine/app.yaml
deleted file mode 100644
index 0efc5d7b4d2..00000000000
--- a/flexible/sendgrid/src/main/appengine/app.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-runtime: java
-env: flex
-
-handlers:
-- url: /.*
- script: this field is required, but ignored
-
-# [START env_variables]
-env_variables:
- SENDGRID_API_KEY: YOUR-SENDGRID-API-KEY
- SENDGRID_SENDER: YOUR-SENDGRID-SENDER
-# [END env_variables]
diff --git a/flexible/static-files/pom.xml b/flexible/static-files/pom.xml
deleted file mode 100644
index 223ccdb9b88..00000000000
--- a/flexible/static-files/pom.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
- 4.0.0
- war
- 1.0-SNAPSHOT
- com.example.flexible
- staticfiles
-
-
- doc-samples
- com.google.cloud
- 1.0.0
- ../..
-
-
-
- 1.8
- 1.8
-
- 1.0.0
- 9.3.8.v20160314
-
- false
-
-
-
-
- javax.servlet
- javax.servlet-api
- 3.1.0
- jar
- provided
-
-
-
-
- ${project.build.directory}/${project.build.finalName}/WEB-INF/classes
-
-
- com.google.cloud.tools
- appengine-maven-plugin
- ${appengine.maven.plugin}
-
-
-
-
-
- org.eclipse.jetty
- jetty-maven-plugin
- ${jetty.maven.plugin}
-
-
-
-
diff --git a/flexible/static-files/src/main/appengine/app.yaml b/flexible/static-files/src/main/appengine/app.yaml
deleted file mode 100644
index d7890aaff58..00000000000
--- a/flexible/static-files/src/main/appengine/app.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-runtime: java
-env: flex
-
-handlers:
-- url: /.*
- script: this field is required, but ignored
diff --git a/flexible/twilio/README.md b/flexible/twilio/README.md
deleted file mode 100644
index a1234c78af6..00000000000
--- a/flexible/twilio/README.md
+++ /dev/null
@@ -1,37 +0,0 @@
-# Java Twilio Voice and SMS Sample for Google App Engine Flexible Environment
-
-This sample demonstrates how to use [Twilio](https://www.twilio.com) on [Google
-App flexible environment][aeflex-docs].
-
-See the [sample application documentaion][sample-docs] for more detailed
-instructions.
-
-For more information about Twilio, see their [Java quickstart
-tutorials](https://www.twilio.com/docs/quickstart/java).
-
-[aeflex-docs]: https://cloud.google.com/appengine/docs/flexible/
-[sample-docs]: https://cloud.google.com/appengine/docs/flexible/java/using-sms-and-voice-services-via-twilio
-
-
-## Setup
-
-Before you can run or deploy the sample, you will need to do the following:
-
-1. [Create a Twilio Account](http://ahoy.twilio.com/googlecloudplatform). Google
- App Engine customers receive a complimentary credit for SMS messages and
- inbound messages.
-1. Create a number on twilio, and configure the voice request URL to be
- ``https://your-app-id.appspot.com/call/receive`` and the SMS request URL to
- be ``https://your-app-id.appspot.com/sms/receive``.
-1. Configure your Twilio settings in the environment variables section in
- ``src/main/appengine/app.yaml``.
-
-## Running locally
-
-You can run the application locally to test the callbacks and SMS sending. You
-will need to set environment variables before starting your application:
-
- $ export TWILIO_ACCOUNT_SID=[your-twilio-accoun-sid]
- $ export TWILIO_AUTH_TOKEN=[your-twilio-auth-token]
- $ export TWILIO_NUMBER=[your-twilio-number]
- $ mvn clean jetty:run
diff --git a/flexible/twilio/pom.xml b/flexible/twilio/pom.xml
deleted file mode 100644
index 2fa8fbed988..00000000000
--- a/flexible/twilio/pom.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
- 4.0.0
- war
- 1.0-SNAPSHOT
- com.example.flexible
- twilio
-
-
- doc-samples
- com.google.cloud
- 1.0.0
- ../..
-
-
-
- 1.8
- 1.8
-
- 1.0.0
- 9.3.8.v20160314
-
- false
-
-
-
-
-
- com.twilio.sdk
- twilio-java-sdk
- 6.3.0
-
-
-
- javax.servlet
- javax.servlet-api
- 3.1.0
- jar
- provided
-
-
-
-
- ${project.build.directory}/${project.build.finalName}/WEB-INF/classes
-
-
- com.google.cloud.tools
- appengine-maven-plugin
- ${appengine.maven.plugin}
-
-
-
-
-
- org.eclipse.jetty
- jetty-maven-plugin
- ${jetty.maven.plugin}
-
-
-
-
diff --git a/flexible/twilio/src/main/appengine/app.yaml b/flexible/twilio/src/main/appengine/app.yaml
deleted file mode 100644
index 1ee3836bcef..00000000000
--- a/flexible/twilio/src/main/appengine/app.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
-runtime: java
-env: flex
-
-handlers:
-- url: /.*
- script: this field is required, but ignored
-
-# [START env_variables]
-env_variables:
- TWILIO_ACCOUNT_SID: YOUR-TWILIO-ACCOUNT-SID
- TWILIO_AUTH_TOKEN: YOUR-TWILIO-AUTH-TOKEN
- TWILIO_NUMBER: YOUR-TWILIO-NUMBER
-# [END env_variables]