Fixing compile error. NIHVIVO-1000
This commit is contained in:
parent
f4409580b4
commit
2de4504d1b
2 changed files with 0 additions and 83 deletions
|
@ -307,16 +307,6 @@
|
|||
</servlet-mapping>
|
||||
-->
|
||||
|
||||
<servlet>
|
||||
<servlet-name>TestController</servlet-name>
|
||||
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.TestController</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>TestController</servlet-name>
|
||||
<url-pattern>/test</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
||||
<servlet>
|
||||
<servlet-name>fetch</servlet-name>
|
||||
<servlet-class>edu.cornell.mannlib.vitro.webapp.QueryServlet</servlet-class>
|
||||
|
|
|
@ -1,73 +0,0 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
package edu.cornell.mannlib.vitro.webapp.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.RequestDispatcher;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import edu.cornell.mannlib.vitro.webapp.beans.Portal;
|
||||
|
||||
/**
|
||||
* for testing styles and JSPs
|
||||
*
|
||||
* @author bdc34
|
||||
*
|
||||
*/
|
||||
public class TestController extends VitroHttpServlet {
|
||||
private static final Log log = LogFactory.getLog(EntityController.class.getName());
|
||||
|
||||
/**
|
||||
*
|
||||
* @author bdc34
|
||||
*/
|
||||
public void doGet( HttpServletRequest req, HttpServletResponse res )
|
||||
throws IOException, ServletException {
|
||||
try {
|
||||
super.doGet(req, res);
|
||||
|
||||
VitroRequest vreq = new VitroRequest(req);
|
||||
|
||||
Portal portal = vreq.getPortal();
|
||||
vreq.setAttribute("portalBean", portal);
|
||||
vreq.setAttribute("portal", portal);
|
||||
|
||||
String body = vreq.getParameter("bodyJsp");
|
||||
if( body != null )
|
||||
vreq.setAttribute("bodyJsp" , body);
|
||||
else
|
||||
vreq.setAttribute("bodyJsp", Controllers.EMPTY);
|
||||
|
||||
|
||||
//set title before we do the highlighting so we don't get markup in it.
|
||||
vreq.setAttribute("title","Test Page");
|
||||
|
||||
String css = "<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\""
|
||||
+ portal.getThemeDir() + "css/entity.css\"/>\n"
|
||||
+ "<script language='JavaScript' type='text/javascript' src='js/toggle.js'></script>";
|
||||
vreq.setAttribute("css",css);
|
||||
|
||||
RequestDispatcher rd = vreq.getRequestDispatcher(Controllers.BASIC_JSP);
|
||||
rd.forward(req,res);
|
||||
} catch (Throwable e) {
|
||||
log.error(e);
|
||||
req.setAttribute("javax.servlet.jsp.jspException",e);
|
||||
RequestDispatcher rd = req.getRequestDispatcher("/error.jsp");
|
||||
rd.forward(req, res);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException,IOException {
|
||||
doGet(request, response);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue