Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

LPS-27690

  • Loading branch information...
commit 566c5d83d665493495ee305cab0f8393997c1a9d 1 parent df66b70
@brianchandotcom authored
Showing with 38 additions and 34 deletions.
  1. +38 −34 util-taglib/src/com/liferay/taglib/util/IncludeTag.java
View
72 util-taglib/src/com/liferay/taglib/util/IncludeTag.java
@@ -70,7 +70,7 @@ public int doEndTag() throws JspException {
callSetAttributes();
if (themeResourceExists(page)) {
- _doIncludeTheme(page);
+ doIncludeTheme(page);
return EVAL_PAGE;
}
@@ -78,7 +78,7 @@ else if (!FileAvailabilityUtil.isAvailable(servletContext, page)) {
return processEndTag();
}
else {
- _doInclude(page);
+ doInclude(page);
return EVAL_PAGE;
}
@@ -110,7 +110,7 @@ public int doStartTag() throws JspException {
callSetAttributes();
if (themeResourceExists(page)) {
- _doIncludeTheme(page);
+ doIncludeTheme(page);
return EVAL_BODY_INCLUDE;
}
@@ -118,7 +118,7 @@ else if (!FileAvailabilityUtil.isAvailable(servletContext, page)) {
return processStartTag();
}
else {
- _doInclude(page);
+ doInclude(page);
return EVAL_BODY_INCLUDE;
}
@@ -195,6 +195,36 @@ protected void cleanUpSetAttributes() {
}
}
+ protected void doInclude(String page) throws JspException {
+ try {
+ include(page);
+ }
+ catch (Exception e) {
+ String currentURL = (String)request.getAttribute(
+ WebKeys.CURRENT_URL);
+
+ _log.error(
+ "Current URL " + currentURL + " generates exception: " +
+ e.getMessage());
+
+ LogUtil.log(_log, e);
+
+ if (e instanceof JspException) {
+ throw (JspException)e;
+ }
+ }
+ }
+
+ protected void doIncludeTheme(String page) throws Exception {
+ HttpServletResponse response =
+ (HttpServletResponse)pageContext.getResponse();
+
+ Theme theme = (Theme)request.getAttribute(WebKeys.THEME);
+
+ ThemeUtil.include(
+ servletContext, request, response, pageContext, page, theme);
+ }
+
protected String getCustomPage(
ServletContext servletContext, HttpServletRequest request) {
@@ -268,6 +298,10 @@ protected boolean isCleanUpSetAttributes() {
return _CLEAN_UP_SET_ATTRIBUTES;
}
+ protected boolean isUseCustomPage() {
+ return _useCustomPage;
+ }
+
protected int processEndTag() throws Exception {
return EVAL_PAGE;
}
@@ -304,36 +338,6 @@ protected boolean themeResourceExists(String page) throws Exception {
return exists;
}
- private void _doInclude(String page) throws JspException {
- try {
- include(page);
- }
- catch (Exception e) {
- String currentURL = (String)request.getAttribute(
- WebKeys.CURRENT_URL);
-
- _log.error(
- "Current URL " + currentURL + " generates exception: " +
- e.getMessage());
-
- LogUtil.log(_log, e);
-
- if (e instanceof JspException) {
- throw (JspException)e;
- }
- }
- }
-
- private void _doIncludeTheme(String page) throws Exception {
- HttpServletResponse response =
- (HttpServletResponse)pageContext.getResponse();
-
- Theme theme = (Theme)request.getAttribute(WebKeys.THEME);
-
- ThemeUtil.include(
- servletContext, request, response, pageContext, page, theme);
- }
-
private static final boolean _CLEAN_UP_SET_ATTRIBUTES = false;
private static final boolean _THEME_JSP_OVERRIDE_ENABLED =

0 comments on commit 566c5d8

Please sign in to comment.
Something went wrong with that request. Please try again.