public interface Presentable
Created by Jeff Gaynor
on 10/20/11 at 2:02 PM
Servlets that present something to a user (e.g. those serving up JSP) implement this interface. The contract is then that in the main doGet or doPost methods, prepare is invoked before the start of every call and present at the very end. Generally servlets should not touch the response output stream before handing it off, though be sure to consult any documentation.
Modifier and Type | Method and Description |
---|---|
void |
handleError(PresentableState state,
Throwable t)
Handle and error.
|
void |
prepare(PresentableState state)
This is invoked before the main processing for this servlet.
|
void |
present(PresentableState state)
This is invoked after the main processing for the servlet.
|
void prepare(PresentableState state) throws Throwable
state
- Throwable
void present(PresentableState state) throws Throwable
state
- Throwable
void handleError(PresentableState state, Throwable t) throws IOException, javax.servlet.ServletException
IOException
javax.servlet.ServletException
Copyright © 2019. All Rights Reserved.