Package edu.uiuc.ncsa.security.servlet
Class JSPUtil
- java.lang.Object
-
- edu.uiuc.ncsa.security.servlet.JSPUtil
-
public class JSPUtil extends Object
Class with a bunch of very useful JSP utilities in it.Created by Jeff Gaynor
on 10/12/11 at 3:11 PM
-
-
Constructor Summary
Constructors Constructor Description JSPUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
fwd(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String resource)
Forwards a requeststatic String
getParameter(javax.servlet.http.HttpServletRequest request, Object key)
Gets a parameter from the request and invokes the objects toString method.static void
handleException(Throwable t, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String page)
static boolean
isEmpty(String x)
Returns if a string is null or of zero length.
-
-
-
Method Detail
-
fwd
public static void fwd(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String resource) throws IOException, javax.servlet.ServletException
Forwards a request- Parameters:
req
-res
-resource
-- Throws:
IOException
javax.servlet.ServletException
-
isEmpty
public static boolean isEmpty(String x)
Returns if a string is null or of zero length.- Parameters:
x
-- Returns:
-
getParameter
public static String getParameter(javax.servlet.http.HttpServletRequest request, Object key)
Gets a parameter from the request and invokes the objects toString method. This is very useful if you have URIs or URLs and need to check the request for values.- Parameters:
request
-key
-- Returns:
-
handleException
public static void handleException(Throwable t, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String page) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
-