public class View extends Object implements Renderable
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_MODEL_NAME
If left unspecified, the default name of the model in the request
attributes
|
protected Map<String,Object> |
model |
protected String |
path |
Constructor and Description |
---|
View(String path)
Creates a view without a model.
|
View(String path,
Object model) |
View(String path,
Object model,
String modelName) |
Modifier and Type | Method and Description |
---|---|
Object |
getModel() |
Map<String,Object> |
getModelMap() |
String |
getModelName() |
String |
getPath() |
void |
render(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Sets up the model in the request attributes, creates a dispatcher, and
forwards the request.
|
public static final String DEFAULT_MODEL_NAME
protected String path
public View(String path)
path
- will be dispatched to using the servlet container; it should
have a leading /.public String getPath()
public String getModelName()
public Object getModel()
public void render(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException, WebApplicationException
render
in interface Renderable
IOException
javax.servlet.ServletException
WebApplicationException
Copyright © 2014. All Rights Reserved.