Skip to content
This repository was archived by the owner on Aug 17, 2018. It is now read-only.

Commit 5efdb69

Browse files
author
Kin Man Chung
committed
- Don't URL encode JSP file path in the error log, when it does not exist.
svn path=/trunk/; revision=1379
1 parent 005c85f commit 5efdb69

1 file changed

Lines changed: 2 additions & 20 deletions

File tree

impl/src/main/java/org/apache/jasper/servlet/JspServlet.java

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
33
*
4-
* Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
4+
* Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved.
55
*
66
* The contents of this file are subject to the terms of either the GNU
77
* General Public License Version 2 only ("GPL") or the Common Development
@@ -441,15 +441,8 @@ private void serviceJspFile(HttpServletRequest request,
441441
if (wrapper == null) {
442442
// Check if the requested JSP page exists, to avoid
443443
// creating unnecessary directories and files.
444-
/* START PWC 6181923
445-
if (null == context.getResource(jspUri)) {
446-
*/
447-
// START PWC 6181923
448444
if (null == context.getResource(jspUri)
449445
&& !options.getUsePrecompiled()) {
450-
// END PWC 6181923
451-
452-
// START PWC 6300204
453446
String includeRequestUri = (String)
454447
request.getAttribute("javax.servlet.include.request_uri");
455448
if (includeRequestUri != null) {
@@ -463,22 +456,11 @@ private void serviceJspFile(HttpServletRequest request,
463456
throw new FileNotFoundException(
464457
JspUtil.escapeXml(jspUri));
465458
}
466-
// END PWC 6300204
467459

468-
/* RIMOD PWC 6282167, 4878272
469-
response.sendError(HttpServletResponse.SC_NOT_FOUND,
470-
jspUri);
471-
*/
472-
// START PWC 6282167, 4878272
473460
response.sendError(HttpServletResponse.SC_NOT_FOUND);
474-
String realPath = URLEncoder.encode(context.getRealPath(jspUri));
475-
if (realPath.length() > CHAR_LIMIT) {
476-
realPath = realPath.substring(0, CHAR_LIMIT);
477-
}
478461
log.severe(Localizer.getMessage(
479462
"jsp.error.file.not.found",
480-
realPath));
481-
// END PWC 6282167, 4878272
463+
context.getRealPath(jspUri)));
482464
return;
483465
}
484466
boolean isErrorPage = exception != null;

0 commit comments

Comments
 (0)