Skip to content

Commit ccc9ad9

Browse files
committed
replace string with field
1 parent 5fcd186 commit ccc9ad9

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

opengrok-web/src/main/java/org/opengrok/web/PageConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ public final class PageConfig {
118118

119119
public static final String DUMMY_REVISION = "unknown";
120120

121+
public static final String historyJspAttrName = "history.jsp-hist";
122+
121123
// query parameters
122124
static final String PROJECT_PARAM_NAME = "project";
123125
static final String GROUP_PARAM_NAME = "group";

opengrok-web/src/main/webapp/history.jsp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ org.opengrok.indexer.web.Util"
9898
response.sendError(HttpServletResponse.SC_NOT_FOUND);
9999
return;
100100
}
101-
request.setAttribute("history.jsp-hist", hist);
101+
request.setAttribute(PageConfig.historyJspAttrName, hist);
102102
}
103103
}
104104
%>
@@ -109,7 +109,7 @@ include file="/httpheader.jspf"
109109
%>
110110
<%
111111
{
112-
if ((request.getAttribute("history.jsp-hist")) != null) {
112+
if ((request.getAttribute(PageConfig.historyJspAttrName)) != null) {
113113
%>
114114
<body>
115115
<script type="text/javascript">/* <![CDATA[ */
@@ -124,7 +124,7 @@ include file="/httpheader.jspf"
124124
}
125125
}
126126
{
127-
if (request.getAttribute("history.jsp-hist") != null) {
127+
if (request.getAttribute(PageConfig.historyJspAttrName) != null) {
128128
%>
129129
<%@include file="/pageheader.jspf" %>
130130
<%
@@ -136,7 +136,7 @@ include file="/httpheader.jspf"
136136
String path = cfg.getPath();
137137
138138
History hist;
139-
if ((hist = (History) request.getAttribute("history.jsp-hist")) != null) {
139+
if ((hist = (History) request.getAttribute(PageConfig.historyJspAttrName)) != null) {
140140
141141
int startIndex = cfg.getStartIndex();
142142
int max = cfg.getMaxItems();
@@ -155,7 +155,7 @@ include file="/httpheader.jspf"
155155
}
156156
}
157157
{
158-
if (request.getAttribute("history.jsp-hist") != null) {
158+
if (request.getAttribute(PageConfig.historyJspAttrName) != null) {
159159
%>
160160
<%@
161161
@@ -170,7 +170,7 @@ include file="/minisearch.jspf"
170170
String context = request.getContextPath();
171171
String path = cfg.getPath();
172172
History hist;
173-
if ((hist = (History) request.getAttribute("history.jsp-hist")) != null) {
173+
if ((hist = (History) request.getAttribute(PageConfig.historyJspAttrName)) != null) {
174174
RuntimeEnvironment env = cfg.getEnv();
175175
String uriEncodedName = cfg.getUriEncodedPath();
176176
Project project = cfg.getProject();

0 commit comments

Comments
 (0)