Skip to content

Commit

Permalink
Somewhat improving the location variable name
Browse files Browse the repository at this point in the history
WW-1807


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@556512 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Donald J. Brown committed Jul 16, 2007
1 parent 048333c commit 5f16c73
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,28 +143,28 @@ public String getContentType() {
}

/**
* Execute this result, using the specified template location.
* Execute this result, using the specified template locationArg.
* <p/>
* The template location has already been interoplated for any variable substitutions
* The template locationArg has already been interoplated for any variable substitutions
* <p/>
* this method obtains the freemarker configuration and the object wrapper from the provided hooks.
* It them implements the template processing workflow by calling the hooks for
* preTemplateProcess and postTemplateProcess
*/
public void doExecute(String location, ActionInvocation invocation) throws IOException, TemplateException {
this.location = location;
public void doExecute(String locationArg, ActionInvocation invocation) throws IOException, TemplateException {
this.location = locationArg;
this.invocation = invocation;
this.configuration = getConfiguration();
this.wrapper = getObjectWrapper();

if (!location.startsWith("/")) {
if (!locationArg.startsWith("/")) {
ActionContext ctx = invocation.getInvocationContext();
HttpServletRequest req = (HttpServletRequest) ctx.get(ServletActionContext.HTTP_REQUEST);
String base = ResourceUtil.getResourceBase(req);
location = base + "/" + location;
locationArg = base + "/" + locationArg;
}

Template template = configuration.getTemplate(location, deduceLocale());
Template template = configuration.getTemplate(locationArg, deduceLocale());
TemplateModel model = createModel();

// Give subclasses a chance to hook into preprocessing
Expand Down

0 comments on commit 5f16c73

Please sign in to comment.