web.xml: add servlet for AboutQrCodesController
aboutQrCodes.ftl: create initial mockup foaf-person--exportQrCode.ftl: rename from individual-exportQrCode individual-exportQrCode.ftl: delete AboutQrCodesController.java: create ExportQrCodeController.java: handle rename of FTL file
This commit is contained in:
parent
e08a675874
commit
6a2614710f
5 changed files with 71 additions and 1 deletions
|
@ -0,0 +1,40 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
package edu.cornell.mannlib.vitro.webapp.controller;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ExceptionResponseValues;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
|
||||
|
||||
public class AboutQrCodesController extends FreemarkerHttpServlet {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Log log = LogFactory.getLog(ExportQrCodeController.class);
|
||||
private static final String TEMPLATE_DEFAULT = "aboutQrCodes.ftl";
|
||||
|
||||
@Override
|
||||
protected ResponseValues processRequest(VitroRequest vreq) {
|
||||
try {
|
||||
Map<String, Object> body = new HashMap<String, Object>();
|
||||
|
||||
return new TemplateResponseValues(TEMPLATE_DEFAULT, body);
|
||||
} catch (Throwable e) {
|
||||
log.error(e, e);
|
||||
return new ExceptionResponseValues(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getTitle(String siteName, VitroRequest vreq) {
|
||||
return "About QR Codes";
|
||||
}
|
||||
|
||||
}
|
|
@ -23,7 +23,7 @@ public class ExportQrCodeController extends FreemarkerHttpServlet {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Log log = LogFactory.getLog(ExportQrCodeController.class);
|
||||
private static final String TEMPLATE_DEFAULT = "individual-exportQrCode.ftl";
|
||||
private static final String TEMPLATE_DEFAULT = "foaf-person--exportQrCode.ftl";
|
||||
|
||||
@Override
|
||||
protected ResponseValues processRequest(VitroRequest vreq) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue