Skip to end of metadata
Go to start of metadata

A Resolution is a class that takes a servlet request and response objects and redirects, forwards or writes the response contents. Resolutions are executed in the last step of workflow execution.

AbstractAction methods

AbstractAction includes some convenience methods to create common resolution classes:

RedirectResolution

Redirect a browesr request to other location:

If there are validation errors in this request, they will be saved to a flash context and restored at the end of the next request (after the new event has been executed, but before any resolution execution). That way, they can be displayed as if they happened in the redirected request - for example, to redirect the request to a different action where current validation errors should be displayed.

ForwardResolution

Forward a request to a file resource. By default, forwards are located inside /WEB-INF/jsp to prevent direct browser invocations:

You can set the logging threshold of ForwardResolutionImpl to DEBUG to see the current forward destination.

When using forwardWithLocale("location.jsp") the framework will first look for a resource for the request locale (e.g.: "location_es.jsp"), the default locale (e.g.: "location_en.jsp") or the empty locale ("location.jsp"), in this order.

HtmlResolution

Intended for cases where the generated response includes very simple HTML generated from Java code:

HttpErrorResolution

Intended for cases where a HTTP error response should be generated.

You may also just throw HttpErrorException instead. Notice that in this case the error message will be logged but not displayed in the HTML error page.

InputStreamResolution

Used to return a file to the browser.

The Content-Type will be calculated by default using the MIME types registered in MimeUtils, but it can be overriden by invoking resolution.setContentType().


‹ Property annotations
up
Exceptions and Errors ›

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.