public class ServletUtil extends Object
Constructor and Description |
---|
ServletUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
checkPermission(DbControl dc)
Checks if the currently logged in user has permission to manage
Open Grid Clusters (=WRITE permission for the extension system).
|
static SessionControl |
getSessionControl(javax.servlet.ServletRequest req)
Get an existing session control and check that a user is logged in.
|
static org.json.simple.JSONObject |
parseRequest(javax.servlet.http.HttpServletRequest request)
Parse the request as JSON data.
|
static void |
setJsonResponseHeaders(javax.servlet.http.HttpServletResponse resp)
Set proper response headers for returning a JSON response.
|
public static SessionControl getSessionControl(javax.servlet.ServletRequest req)
public static void setJsonResponseHeaders(javax.servlet.http.HttpServletResponse resp)
public static org.json.simple.JSONObject parseRequest(javax.servlet.http.HttpServletRequest request) throws IOException, org.json.simple.parser.ParseException
IOException
org.json.simple.parser.ParseException
public static void checkPermission(DbControl dc)