public class HtmlHelper extends Object
Constructor and Description |
---|
HtmlHelper() |
Modifier and Type | Method and Description |
---|---|
static String |
getErrorPage(String headerMessage,
String message,
String serverName) |
static String |
getExceptionErrorPage(String headerMessage,
String message,
String serverName,
Throwable t) |
static void |
sendErrorPage(Request request,
Response response,
ErrorPageGenerator generator,
int status,
String reasonPhrase,
String description,
Throwable exception)
Generate and send an error page for the given HTTP response status.
|
static void |
setErrorAndSendErrorPage(Request request,
Response response,
ErrorPageGenerator generator,
int status,
String reasonPhrase,
String description,
Throwable exception)
Generate and send an error page for the given HTTP response status.
|
static void |
writeTraceMessage(Request request,
Response response) |
public static void sendErrorPage(Request request, Response response, ErrorPageGenerator generator, int status, String reasonPhrase, String description, Throwable exception) throws IOException
setErrorAndSendErrorPage(org.glassfish.grizzly.http.server.Request, org.glassfish.grizzly.http.server.Response, org.glassfish.grizzly.http.server.ErrorPageGenerator, int, java.lang.String, java.lang.String, java.lang.Throwable)
,
this method doesn't change the Response
status code and reason phrase.request
- response
- generator
- status
- reasonPhrase
- description
- exception
- IOException
public static void setErrorAndSendErrorPage(Request request, Response response, ErrorPageGenerator generator, int status, String reasonPhrase, String description, Throwable exception) throws IOException
setErrorAndSendErrorPage(org.glassfish.grizzly.http.server.Request, org.glassfish.grizzly.http.server.Response, org.glassfish.grizzly.http.server.ErrorPageGenerator, int, java.lang.String, java.lang.String, java.lang.Throwable)
,
this method does change the Response
status code and reason phrase.request
- response
- generator
- status
- reasonPhrase
- description
- exception
- IOException
public static void writeTraceMessage(Request request, Response response) throws IOException
IOException
public static String getErrorPage(String headerMessage, String message, String serverName)
String
containing the HTTP response.Copyright © 2014 Oracle Corporation. All rights reserved.