	public PageResponse process(Request request) {
		Twitter twitter = new TwitterFactory().getInstance();
		String q = "dartford";
		if (request.params().named("q") != null) {
			q = request.params().named("q").value;
		}
		Query query = new Query(q);
		query.setPage(1);
		QueryResult result = null;
		StringBuilder sb = new StringBuilder();
		try {
			result = twitter.search(query);
			sb.append("<div>Searching for <strong>").append(q).append("</strong></div>");
			sb.append("<div><pre>results");
			sb.append(("page " + result.getPage()));
			for (Tweet tweet : result.getTweets()) {
				sb.append("\n");
				sb.append(tweet.getCreatedAt() + " - " + tweet.getFromUser() + ":" + tweet.getText() + ":"
						+ tweet.getLocation());
			}
			sb.append("</pre></div>");
		} catch (TwitterException e) {
			sb.append(e.getMessage());
		}
		return PageResponseFactory.text(sb.toString());
	}

	public PageResponse process(Request request) {
		Twitter twitter = new TwitterFactory().getInstance();
		String q = "dartford";
		if (request.params().named("q") != null) {
			q = request.params().named("q").value;
		}
		Query query = new Query(q);
		query.setPage(1);
		QueryResult result = null;
		StringBuilder sb = new StringBuilder();
		try {
			result = twitter.search(query);
			sb.append("<div>Searching for <strong>").append(q).append("</strong></div>");
			sb.append("<div><pre>results");
			sb.append(("page " + result.getPage()));
			for (Object t : result.getTweets()) {
				Tweet tweet = (Tweet)t;
				sb.append("\n");
				sb.append(tweet.getCreatedAt() + " - " + tweet.getFromUser() + ":" + tweet.getText() + ":"
						+ tweet.getLocation());
			}
			sb.append("</pre></div>");
		} catch (TwitterException e) {
			sb.append(e.getMessage());
		}
		return PageResponseFactory.text(sb.toString());
	}
