Skip to content

Commit 3ec2628

Browse files
committed
Merge pull request #405 from GoogleCloudPlatform:EE10-JspInitialization
PiperOrigin-RevId: 812886187 Change-Id: I95391eb20d78dff799f64af735e8d12bd8ac1a5e
2 parents 5c13a8a + 8e5dab2 commit 3ec2628

1 file changed

Lines changed: 1 addition & 18 deletions

File tree

runtime/runtime_impl_jetty12/src/main/java/com/google/apphosting/runtime/jetty/ee10/EE10AppVersionHandlerFactory.java

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import java.io.File;
3434
import java.io.IOException;
3535
import java.io.PrintWriter;
36-
import javax.servlet.jsp.JspFactory;
3736
import org.eclipse.jetty.ee10.annotations.AnnotationConfiguration;
3837
import org.eclipse.jetty.ee10.quickstart.QuickStartConfiguration;
3938
import org.eclipse.jetty.ee10.servlet.Dispatcher;
@@ -168,23 +167,7 @@ private org.eclipse.jetty.server.Handler doCreateHandler(AppVersion appVersion)
168167
context.setExtractWAR(false);
169168
// ensure exception is thrown if context startup fails
170169
context.setThrowUnavailableOnStartupException(true);
171-
// for JSP 2.2
172-
try {
173-
// Use the App Class loader to try to initialize the JSP machinery.
174-
// Not an issue if it fails: it means the app does not contain the JSP jars in WEB-INF/lib.
175-
Class<?> klass = classLoader.loadClass(TOMCAT_SIMPLE_INSTANCE_MANAGER);
176-
Object sim = klass.getConstructor().newInstance();
177-
context.getServletContext().setAttribute(TOMCAT_INSTANCE_MANAGER, sim);
178-
// Set JSP factory equivalent for:
179-
// JspFactory jspf = new JspFactoryImpl();
180-
klass = classLoader.loadClass(TOMCAT_JSP_FACTORY);
181-
JspFactory jspf = (JspFactory) klass.getConstructor().newInstance();
182-
JspFactory.setDefaultFactory(jspf);
183-
Class.forName("org.apache.jasper.compiler.JspRuntimeContext", true, classLoader);
184-
} catch (Throwable t) {
185-
// No big deal, there are no JSPs in the App since the jsp libraries are not inside the
186-
// web app classloader.
187-
}
170+
188171
SessionsConfig sessionsConfig = appVersion.getSessionsConfig();
189172
EE10SessionManagerHandler.Config.Builder builder = EE10SessionManagerHandler.Config.builder();
190173
if (sessionsConfig.getAsyncPersistenceQueueName() != null) {

0 commit comments

Comments
 (0)