Class MiscWebUtils
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils
-
public class MiscWebUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description MiscWebUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddebugPrintHeaders(javax.servlet.http.HttpServletRequest req)static Stringescape(String s)This isfrom org.json.simple.JSONObject" => \" , \ => \\static StringgetCustomShortView(Individual individual, javax.servlet.http.HttpServletRequest request)static StringgetCustomShortView(javax.servlet.http.HttpServletRequest request)static StringgetReqInfo(javax.servlet.http.HttpServletRequest req)static StringgetRequestAttributes(javax.servlet.http.HttpServletRequest req)returns a table of the req attributesstatic StringgetRequestParam(javax.servlet.http.HttpServletRequest req)static StringgetSessionAttributes(javax.servlet.http.HttpServletRequest req)static PropertiesloadPropertiesFromRequest(Properties current, javax.servlet.ServletRequest req)static StringwriteAttribute(javax.servlet.http.HttpServletRequest request, String attribute)Gets an attribute from the request, if it is not null, and of Class String print it to req.out, otherwise throw an exception.
-
-
-
Method Detail
-
loadPropertiesFromRequest
public static Properties loadPropertiesFromRequest(Properties current, javax.servlet.ServletRequest req)
-
writeAttribute
public static String writeAttribute(javax.servlet.http.HttpServletRequest request, String attribute) throws javax.servlet.jsp.JspException
Gets an attribute from the request, if it is not null, and of Class String print it to req.out, otherwise throw an exception.- Parameters:
request- Servlet Requestattribute- Attribute name- Throws:
javax.servlet.jsp.JspException
-
getCustomShortView
public static String getCustomShortView(javax.servlet.http.HttpServletRequest request)
-
getCustomShortView
public static String getCustomShortView(Individual individual, javax.servlet.http.HttpServletRequest request)
-
getRequestAttributes
public static String getRequestAttributes(javax.servlet.http.HttpServletRequest req)
returns a table of the req attributes- Parameters:
req- Servlet Request
-
getRequestParam
public static String getRequestParam(javax.servlet.http.HttpServletRequest req)
-
getSessionAttributes
public static String getSessionAttributes(javax.servlet.http.HttpServletRequest req)
-
getReqInfo
public static String getReqInfo(javax.servlet.http.HttpServletRequest req)
-
debugPrintHeaders
public static void debugPrintHeaders(javax.servlet.http.HttpServletRequest req)
-
-