public class Utils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
GET
Http GET
|
static String |
POST
Http POST
|
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static String |
formFromMap(String redirectUrl,
Map pmap,
boolean addAutoSubmit)
Generates a html hidden form to acccomplish a auto POST from the browser
Form is assigned an id=saeform
|
static String |
queryStringFromMap(Map pmap)
Generates a query string from the a
Map . |
static String |
queryStringFromRequest(javax.servlet.http.HttpServletRequest request)
Generates a query string from the parameters in the request.
|
static void |
redirect(javax.servlet.http.HttpServletResponse hres,
PrintWriter out,
String redirectUrl,
Map pmap,
String action)
Redirects to
redirectUrl as a GET or a POST
based on action parameter provided. |
public static final String POST
public static final String GET
public static void redirect(javax.servlet.http.HttpServletResponse hres, PrintWriter out, String redirectUrl, Map pmap, String action) throws Exception
redirectUrl
as a GET or a POST
based on action
parameter provided.
in case of POST all params need to be specified in pmap
parameter.hres
- HttpSevletResponse to be used for the redirectout
- the print writer for writing out presentationredirectUrl
- URL to redirect to.pmap
- http parameters to be sent as part of the redirectaction
- http action to be executed : GET or POSTException
public static String queryStringFromRequest(javax.servlet.http.HttpServletRequest request)
request
- http request to pick params from.public static String queryStringFromMap(Map pmap)
Map
.pmap
- params to be added to the query string.public static String formFromMap(String redirectUrl, Map pmap, boolean addAutoSubmit)
redirectUrl
- URL to post teh form to.pmap
- parameters to be sent in the POSTaddAutoSubmit
- adds html and javascript to autosubmit formCopyright © 2010–2025 Open Identity Platform Community. All rights reserved.