Skip to content

Instantly share code, notes, and snippets.

@daichan4649 daichan4649/
Last active Nov 15, 2016

What would you like to do?
AndroidStudio+GAE/J+Jersey sample
buildscript {
repositories {
dependencies {
classpath ''
repositories {
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'appengine'
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
dependencies {
appengineSdk ''
compile 'javax.servlet:servlet-api:2.5'
compile 'org.glassfish.jersey.containers:jersey-container-servlet:2.22.2'
compile ''
appengine {
downloadSdk = true
appcfg {
oauth2 = true
package daichan4649.jersey;
public class Event {
private String ymd;
private String name;
public Event(String ymd, String name) {
this.ymd = ymd; = name;
public String getYmd() {
return ymd;
public void setYmd(String ymd) {
this.ymd = ymd;
public String getName() {
return name;
public void setName(String name) { = name;
package daichan4649.jersey;
import java.util.ArrayList;
import java.util.List;
public class JerseySample {
public List<Event> getEvents() {
List<Event> list = new ArrayList<>();
list.add(new Event("20160415", "AKBAR"));
list.add(new Event("20160514", "CIRCLE'16"));
list.add(new Event("20160903", "SunsetLive2016"));
return list;
<?xml version="1.0" encoding="utf-8"?>
<web-app version="2.5" xmlns="">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.