boolean minorChange = Boolean.parseBoolean(request.getParameter("minor"));
// save page or preview+edit page?
if (request.getParameter("wpSave") != null) {
// save page
Contributor contributor = new Contributor();
contributor.setIp(request.getRemoteAddr());
String timestamp = Revision.calendarToString(Calendar.getInstance(TimeZone.getTimeZone("UTC")));
int newRevId = (oldVersion == -1) ? 1 : oldVersion + 1;
Revision newRev = new Revision(newRevId, timestamp, minorChange, contributor, summary);
newRev.setUnpackedText(content);