import java.io.IOException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import com.google.gson.Gson;
import com.google.appengine.api.datastore.DatastoreService;
import com.google.appengine.api.datastore.DatastoreServiceFactory;
import com.google.appengine.api.datastore.Entity;
import com.google.appengine.api.datastore.PreparedQuery;
import com.google.appengine.api.datastore.Query;
import com.google.appengine.api.datastore.EntityNotFoundException;
import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.Query.Filter;
import com.google.appengine.api.datastore.Query.FilterOperator;
import com.google.appengine.api.datastore.Query.FilterPredicate;
import com.google.appengine.api.datastore.FetchOptions;
import com.google.appengine.api.datastore.Query.SortDirection;
import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;
import com.google.appengine.api.users.User;

@WebServlet("/fillMonth")
public class FillMonthChartServlet extends HttpServlet {

  @Override
  public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {

    DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
    ArrayList<String> allProperties = new ArrayList<>();

    UserService userService = UserServiceFactory.getUserService();
    if(userService.isUserLoggedIn()){
        User user = userService.getCurrentUser();
        String userProperty = "";
        String userNickname = user.getNickname();
        Query query = new Query("input").addSort("input", SortDirection.DESCENDING);
        query.setFilter(new FilterPredicate("User", FilterOperator.EQUAL, userNickname));
        PreparedQuery results = datastore.prepare(query);
        int limit =0;
        if(results.countEntities() < 62){
            limit = results.countEntities();
        }
        else{
            limit = 62;
        }

        //Writes properties specific to the current user to /fill-charts to be fetched
        for(Entity entity:results.asIterable(FetchOptions.Builder.withLimit(limit))){
            try{
                Key oldKey = entity.getKey();
                Entity oldEntity = datastore.get(oldKey);
                String data = (String)oldEntity.getProperty("input");
                allProperties.add(data);
        }
            catch(EntityNotFoundException e){}
        }
    }
        response.getWriter().println(allProperties);
    
  } 
}
@@ -1771,98 +1771,8 @@
 G);%0A
-        query.setFilter(new FilterPredicate(%22User%22, FilterOperator.EQUAL, userNickname));%0A
     
@@ -1821,24 +1821,24 @@
 are(query);%0A
+
         int 
@@ -2182,13 +2182,135 @@
     
-try%7B%0A
+userProperty = (String)entity.getProperty(%22User%22);%0A            if(userProperty.equals(userNickname))%7B%0A                try%7B%0A    
     
@@ -2347,24 +2347,28 @@
 y.getKey();%0A
+    
             
@@ -2425,24 +2425,28 @@
             
+ 
+   
 String data 
@@ -2503,16 +2503,20 @@
         
+    
 allPrope
@@ -2532,34 +2532,42 @@
 (data);%0A        
+   
+ 
 %7D%0A
+    
             catc
@@ -2597,16 +2597,30 @@
 on e)%7B%7D%0A
+            %7D%0A
         

Remove query User filter