I want to keep a static string array to save variables passed from the client when it calls the server, and then to be able to access them from the client with a getter.
for some reason i can only get very basic type (int instead of Integer for instance) to work, everything else throws a null pointer exception.
here is a code snippet. (using GWT)
@SuppressWarnings("serial")
public class GreetingServiceImpl extends RemoteServiceServlet implements AddElection
{
//this seems to be throwing a NullPointerException:
static String[] currentElections;
static int index;
public String electionServer(String input) {
// save currently running elections
currentElections[index] = input;
index = index + 1;
// TODO: getcurrentElections
So. my question is, if i want to temporarily store a string array at the server side and be able to access it, how would i do this in google web toolkit? thanks!