Class MiscWebUtils


  • public class MiscWebUtils
    extends Object
    • Constructor Detail

      • MiscWebUtils

        public MiscWebUtils()
    • 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 Request
        attribute - 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)
      • escape

        public static String escape​(String s)
        This isfrom org.json.simple.JSONObject " => \" , \ => \\
        Parameters:
        s - String to escape