You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2016/08/30 22:42:34 UTC
svn commit: r1758492 -
/tomcat/tc6.0.x/trunk/java/org/apache/jasper/servlet/JspServlet.java
Author: markt
Date: Tue Aug 30 22:42:34 2016
New Revision: 1758492
URL: http://svn.apache.org/viewvc?rev=1758492&view=rev
Log:
Clean-up. Use longer lines.
Fix a handful of IDE warnings.
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/jasper/servlet/JspServlet.java
Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/servlet/JspServlet.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/servlet/JspServlet.java?rev=1758492&r1=1758491&r2=1758492&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/servlet/JspServlet.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/servlet/JspServlet.java Tue Aug 30 22:42:34 2016
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -57,6 +57,8 @@ import org.apache.juli.logging.LogFactor
*/
public class JspServlet extends HttpServlet implements PeriodicEventListener {
+ private static final long serialVersionUID = 1L;
+
// Logger
private Log log = LogFactory.getLog(JspServlet.class);
@@ -69,24 +71,23 @@ public class JspServlet extends HttpServ
/*
* Initializes this JspServlet.
*/
+ @Override
public void init(ServletConfig config) throws ServletException {
-
+
super.init(config);
this.config = config;
this.context = config.getServletContext();
-
+
// Initialize the JSP Runtime Context
// Check for a custom Options implementation
- String engineOptionsName =
- config.getInitParameter("engineOptionsClass");
+ String engineOptionsName = config.getInitParameter("engineOptionsClass");
if (engineOptionsName != null) {
// Instantiate the indicated Options implementation
try {
- ClassLoader loader = Thread.currentThread()
- .getContextClassLoader();
- Class engineOptionsClass = loader.loadClass(engineOptionsName);
- Class[] ctorSig = { ServletConfig.class, ServletContext.class };
- Constructor ctor = engineOptionsClass.getConstructor(ctorSig);
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ Class<?> engineOptionsClass = loader.loadClass(engineOptionsName);
+ Class<?>[] ctorSig = { ServletConfig.class, ServletContext.class };
+ Constructor<?> ctor = engineOptionsClass.getConstructor(ctorSig);
Object[] args = { config, context };
options = (Options) ctor.newInstance(args);
} catch (Throwable e) {
@@ -203,9 +204,10 @@ public class JspServlet extends HttpServ
}
}
-
- public void service (HttpServletRequest request,
+
+ @Override
+ public void service (HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
@@ -234,7 +236,7 @@ public class JspServlet extends HttpServ
}
} else {
/*
- * Requested JSP has not been the target of a
+ * Requested JSP has not been the target of a
* RequestDispatcher.include(). Reconstruct its path from the
* request's getServletPath() and getPathInfo()
*/
@@ -246,7 +248,7 @@ public class JspServlet extends HttpServ
}
}
- if (log.isDebugEnabled()) {
+ if (log.isDebugEnabled()) {
log.debug("JspEngine --> " + jspUri);
log.debug("\t ServletPath: " + request.getServletPath());
log.debug("\t PathInfo: " + request.getPathInfo());
@@ -270,6 +272,7 @@ public class JspServlet extends HttpServ
}
+ @Override
public void destroy() {
if (log.isDebugEnabled()) {
log.debug("JspServlet.destroy()");
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org