org.kohsuke.stapler
Class HttpResponses
java.lang.Object
org.kohsuke.stapler.HttpResponses
public class HttpResponses
- extends java.lang.Object
Factory for HttpResponse
.
- Author:
- Kohsuke Kawaguchi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpResponses
public HttpResponses()
ok
public static HttpResponses.HttpResponseException ok()
notFound
public static HttpResponses.HttpResponseException notFound()
forbidden
public static HttpResponses.HttpResponseException forbidden()
status
public static HttpResponses.HttpResponseException status(int code)
error
public static HttpResponses.HttpResponseException error(int code,
java.lang.Throwable cause)
redirectViaContextPath
public static HttpResponses.HttpResponseException redirectViaContextPath(java.lang.String relative)
- Parameters:
relative
- The path relative to the context path. The context path + this value
is sent to the user.
redirectToDot
public static HttpResponse redirectToDot()
- Redirect to "."
redirectToContextRoot
public static HttpResponses.HttpResponseException redirectToContextRoot()
- Redirect to the context root
forwardToPreviousPage
public static HttpResponses.HttpResponseException forwardToPreviousPage()
- Redirects the user back to where he came from.
Copyright © 2010. All Rights Reserved.