summaryrefslogtreecommitdiffstats
path: root/base/server/share/webapps
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2015-06-04 19:58:52 -0400
committerEndi S. Dewata <edewata@redhat.com>2015-06-08 09:53:05 -0400
commitd7c80ae21a141438d38bfb0da9afbccfd453aa80 (patch)
treebeb7b21e07c22a19f5b172cb143aca55d1a38732 /base/server/share/webapps
parent78db4ceba7b17c1ab1d7ea9f55b8c8acc90e891e (diff)
downloadpki-d7c80ae21a141438d38bfb0da9afbccfd453aa80.tar.gz
pki-d7c80ae21a141438d38bfb0da9afbccfd453aa80.tar.xz
pki-d7c80ae21a141438d38bfb0da9afbccfd453aa80.zip
Fixed NPE in ROOT's index.jsp.
The ROOT's index.jsp has been modified to check each subsystem's servlet context for null before accessing the value. https://fedorahosted.org/pki/ticket/1407
Diffstat (limited to 'base/server/share/webapps')
-rw-r--r--base/server/share/webapps/ROOT/index.jsp44
1 files changed, 27 insertions, 17 deletions
diff --git a/base/server/share/webapps/ROOT/index.jsp b/base/server/share/webapps/ROOT/index.jsp
index 509a2d02e..648a3470f 100644
--- a/base/server/share/webapps/ROOT/index.jsp
+++ b/base/server/share/webapps/ROOT/index.jsp
@@ -89,9 +89,10 @@ $(function() {
<%
ServletContext caContext = getServletContext().getContext("/ca");
- String caName = caContext.getServletContextName();
- String caPath = caContext.getContextPath();
- if (!"".equals(caPath)) {
+ if (caContext != null) {
+ String caName = caContext.getServletContextName();
+ String caPath = caContext.getContextPath();
+ if (!"".equals(caPath)) {
%>
<p>
<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
@@ -107,7 +108,7 @@ $(function() {
</td>
</tr>
<%
- if (request.isSecure()) {
+ if (request.isSecure()) {
%>
<tr valign="TOP">
<td>
@@ -122,19 +123,21 @@ $(function() {
</td>
</tr>
<%
- }
+ }
%>
</table>
<br>
<%
+ }
}
ServletContext kraContext = getServletContext().getContext("/kra");
- String kraName = kraContext.getServletContextName();
- String kraPath = kraContext.getContextPath();
- if (!"".equals(kraPath) && request.isSecure()) {
+ if (kraContext != null) {
+ String kraName = kraContext.getServletContextName();
+ String kraPath = kraContext.getContextPath();
+ if (!"".equals(kraPath) && request.isSecure()) {
%>
<p>
<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
@@ -160,12 +163,14 @@ $(function() {
<br>
<%
+ }
}
ServletContext ocspContext = getServletContext().getContext("/ocsp");
- String ocspName = ocspContext.getServletContextName();
- String ocspPath = ocspContext.getContextPath();
- if (!"".equals(ocspPath) && request.isSecure()) {
+ if (ocspContext != null) {
+ String ocspName = ocspContext.getServletContextName();
+ String ocspPath = ocspContext.getContextPath();
+ if (!"".equals(ocspPath) && request.isSecure()) {
%>
<p>
<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
@@ -191,12 +196,14 @@ $(function() {
<br>
<%
+ }
}
ServletContext tksContext = getServletContext().getContext("/tks");
- String tksName = tksContext.getServletContextName();
- String tksPath = tksContext.getContextPath();
- if (!"".equals(tksPath) && request.isSecure()) {
+ if (tksContext != null) {
+ String tksName = tksContext.getServletContextName();
+ String tksPath = tksContext.getContextPath();
+ if (!"".equals(tksPath) && request.isSecure()) {
%>
<p>
<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
@@ -222,12 +229,14 @@ $(function() {
<br>
<%
+ }
}
ServletContext tpsContext = getServletContext().getContext("/tps");
- String tpsName = tpsContext.getServletContextName();
- String tpsPath = tpsContext.getContextPath();
- if (!"".equals(tpsPath) && request.isSecure()) {
+ if (tpsContext != null) {
+ String tpsName = tpsContext.getServletContextName();
+ String tpsPath = tpsContext.getContextPath();
+ if (!"".equals(tpsPath) && request.isSecure()) {
%>
<p>
<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
@@ -247,6 +256,7 @@ $(function() {
<br>
<%
+ }
}
%>