From 87948222752af32f8f960d8a392e63c20c4b481d Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Fri, 6 Dec 2024 12:48:42 +0100 Subject: [PATCH] add javax jars for tomcat 10+ --- download-latest-java-tomcat.cfm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/download-latest-java-tomcat.cfm b/download-latest-java-tomcat.cfm index 4e52a00..87412be 100644 --- a/download-latest-java-tomcat.cfm +++ b/download-latest-java-tomcat.cfm @@ -48,6 +48,7 @@ https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd" version="6.0">'; FileCopy("lucee/tomcat10/conf/catalina.properties", "lucee/tomcat9/tomcat-lucee-conf/conf/catalina.properties"); + addJavaxJars(getDirectoryFromPath( getCurrentTemplatePath() ) & "lucee/lucee/lib/"); break; default: throw "Unsupported Tomcat version [#tomcat_version#]"; @@ -132,6 +133,21 @@ return true; }; + function addJavaxJars(jarPath){ + // tomcat 10+ uses jarkarta but needs the javax servlet jars too + logger( "Adding javax jars to [#jarPath#]" ); + var jars = [ + "https://repo1.maven.org/maven2/javax/servlet/javax.servlet-api/4.0.1/javax.servlet-api-4.0.1.jar", + "https://repo1.maven.org/maven2/javax/servlet/jsp/javax.servlet.jsp-api/2.3.3/javax.servlet.jsp-api-2.3.3.jar", + "https://repo1.maven.org/maven2/javax/el/javax.el-api/3.0.0/javax.el-api-3.0.0.jar" + ]; + + for (var jar in jars){ + logger(chr(9) & jar); + http method="get" url=jar path=arguments.jarPath file=listlast(jar,"/") throwOnError=true; + } + } + /* // lucee ignores permissions when extracting files function applyPermissions( src, dest ){