From 9a981c5dc6c2abb2979fc98af139aa1af4c20803 Mon Sep 17 00:00:00 2001 From: Hong Shao Date: Wed, 18 Sep 2024 16:36:10 -0400 Subject: [PATCH 1/2] [PXS-82308] Update liftweb 2.3.6 to be Jakarta EE compatible --- build.sbt | 2 +- .../main/scala/net/liftweb/util/Mailer.scala | 9 +++--- .../scala/net/liftweb/util/MailerSpec.scala | 2 +- .../scala/net/liftweb/jpa/RequestVarEM.scala | 2 +- project/Build.scala | 2 +- project/Dependencies.scala | 15 +++++---- .../mocks/MockHttpServletRequest.scala | 4 +-- .../mocks/MockHttpServletResponse.scala | 4 +-- .../liftweb/mocks/MockServletContext.scala | 4 +-- .../scala/net/liftweb/http/LiftRules.scala | 3 +- .../provider/servlet/HTTPRequestServlet.scala | 32 +++++++++---------- .../servlet/HTTPResponseServlet.scala | 4 +-- .../provider/servlet/HTTPServletContext.scala | 2 +- .../provider/servlet/HTTPServletSession.scala | 10 +++--- .../servlet/ServletFilterProvider.scala | 8 ++--- .../containers/Jetty6AsyncProvider.scala | 2 +- .../containers/Jetty7AsyncProvider.scala | 5 +-- .../containers/Servlet30AsyncProvider.scala | 10 +++--- 18 files changed, 61 insertions(+), 59 deletions(-) diff --git a/build.sbt b/build.sbt index db8360b8cd..97bc530148 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ import Dependencies._ organization in ThisBuild := "net.liftweb" -version in ThisBuild := "2.6.3-px-1" +version in ThisBuild := "2.6.3-px-jakarta-1" homepage in ThisBuild := Some(url("http://www.liftweb.net")) diff --git a/core/util/src/main/scala/net/liftweb/util/Mailer.scala b/core/util/src/main/scala/net/liftweb/util/Mailer.scala index 4564a258e8..e988102f31 100644 --- a/core/util/src/main/scala/net/liftweb/util/Mailer.scala +++ b/core/util/src/main/scala/net/liftweb/util/Mailer.scala @@ -17,8 +17,9 @@ package net.liftweb package util -import javax.mail._ -import javax.mail.internet._ +import jakarta.activation.{DataHandler, DataSource} +import jakarta.mail._ +import jakarta.mail.internet._ import javax.naming.{Context, InitialContext} import java.util.Properties import common._ @@ -278,7 +279,7 @@ trait Mailer extends SimpleInjector { } /** - * Given a MailBodyType, convert it to a javax.mail.BodyPart. You can override this method if you + * Given a MailBodyType, convert it to a jakarta.mail.BodyPart. You can override this method if you * add custom MailBodyTypes */ protected def buildMailBody(tab: MailBodyType): BodyPart = { @@ -336,7 +337,7 @@ trait Mailer extends SimpleInjector { part.setFileName(holder.name) part.setContentID(holder.name) part.setDisposition(if (holder.attachment) Part.ATTACHMENT else Part.INLINE) - part.setDataHandler(new javax.activation.DataHandler(new javax.activation.DataSource { + part.setDataHandler(new DataHandler(new DataSource { def getContentType = holder.mimeType def getInputStream = new java.io.ByteArrayInputStream(holder.bytes) def getName = holder.name diff --git a/core/util/src/test/scala/net/liftweb/util/MailerSpec.scala b/core/util/src/test/scala/net/liftweb/util/MailerSpec.scala index 2421ef2d3d..d683be66db 100644 --- a/core/util/src/test/scala/net/liftweb/util/MailerSpec.scala +++ b/core/util/src/test/scala/net/liftweb/util/MailerSpec.scala @@ -17,7 +17,7 @@ package net.liftweb package util -import javax.mail.internet.{MimeMessage, MimeMultipart} +import jakarta.mail.internet.{MimeMessage, MimeMultipart} import org.specs2.mutable.Specification diff --git a/persistence/jpa/src/main/scala/net/liftweb/jpa/RequestVarEM.scala b/persistence/jpa/src/main/scala/net/liftweb/jpa/RequestVarEM.scala index 88e925eb2d..2b920d6428 100644 --- a/persistence/jpa/src/main/scala/net/liftweb/jpa/RequestVarEM.scala +++ b/persistence/jpa/src/main/scala/net/liftweb/jpa/RequestVarEM.scala @@ -17,7 +17,7 @@ package net.liftweb package jpa -import javax.persistence.EntityManager +import jakarta.persistence.EntityManager import net.liftweb.http.TransientRequestVar diff --git a/project/Build.scala b/project/Build.scala index feb909f8a8..a319a298d9 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -101,7 +101,7 @@ object BuildDef extends Build { .settings(description := "Utilities Library", parallelExecution in Test := false, libraryDependencies <++= scalaVersion {sv => Seq(joda_time, - joda_convert, commons_codec, javamail, log4j, htmlparser, xerces)} + joda_convert, commons_codec, jakartamail, log4j, htmlparser, xerces)} ) // Web Projects diff --git a/project/Dependencies.scala b/project/Dependencies.scala index f8387d7838..dc193a24a8 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -37,9 +37,10 @@ object Dependencies { // Compile scope: // Scope available in all classpath, transitive by default. lazy val commons_codec = "commons-codec" % "commons-codec" % "1.6" - lazy val commons_fileupload = "commons-fileupload" % "commons-fileupload" % "1.3.1" + lazy val commons_fileupload = "org.apache.commons" % "commons-fileupload2-jakarta-servlet5" % "2.0.0-M2" lazy val commons_httpclient = "commons-httpclient" % "commons-httpclient" % "3.1" - lazy val javamail = "javax.mail" % "mail" % "1.4.4" + lazy val jakartamail = "jakarta.mail" % "jakarta.mail-api" % "2.1.3" + lazy val joda_time = "joda-time" % "joda-time" % "2.1" lazy val joda_convert = "org.joda" % "joda-convert" % "1.2" lazy val htmlparser = "nu.validator.htmlparser" % "htmlparser" % "1.4" @@ -64,11 +65,11 @@ object Dependencies { // Provided scope: // Scope provided by container, available only in compile and test classpath, non-transitive by default. - lazy val logback = "ch.qos.logback" % "logback-classic" % "1.0.9" % "provided" - lazy val log4j = "log4j" % "log4j" % "1.2.16" % "provided" - lazy val slf4j_log4j12 = "org.slf4j" % "slf4j-log4j12" % slf4jVersion % "provided" - lazy val persistence_api = "javax.persistence" % "persistence-api" % "1.0" % "provided" - lazy val servlet_api = "javax.servlet" % "servlet-api" % "2.5" % "provided" + lazy val logback = "ch.qos.logback" % "logback-classic" % "1.0.9" % "provided" + lazy val log4j = "log4j" % "log4j" % "1.2.16" % "provided" + lazy val slf4j_log4j12 = "org.slf4j" % "slf4j-log4j12" % slf4jVersion % "provided" + lazy val persistence_api = "javax.persistence" % "persistence-api" % "1.0" % "provided" + lazy val servlet_api = "jakarta.servlet" % "jakarta.servlet-api" % "6.0.0" % "provided" // Runtime scope: diff --git a/web/testkit/src/main/scala/net/liftweb/mocks/MockHttpServletRequest.scala b/web/testkit/src/main/scala/net/liftweb/mocks/MockHttpServletRequest.scala index 37635c8d90..5780329597 100644 --- a/web/testkit/src/main/scala/net/liftweb/mocks/MockHttpServletRequest.scala +++ b/web/testkit/src/main/scala/net/liftweb/mocks/MockHttpServletRequest.scala @@ -25,8 +25,8 @@ import java.util.Date import java.util.Locale import java.util.{Enumeration => JEnum} import java.util.{HashMap => JHash} -import javax.servlet._ -import javax.servlet.http._ +import jakarta.servlet._ +import jakarta.servlet.http._ import scala.collection.JavaConversions._ import scala.collection.mutable.ListBuffer diff --git a/web/testkit/src/main/scala/net/liftweb/mocks/MockHttpServletResponse.scala b/web/testkit/src/main/scala/net/liftweb/mocks/MockHttpServletResponse.scala index 8468930bcd..f136d24467 100644 --- a/web/testkit/src/main/scala/net/liftweb/mocks/MockHttpServletResponse.scala +++ b/web/testkit/src/main/scala/net/liftweb/mocks/MockHttpServletResponse.scala @@ -31,8 +31,8 @@ import java.util.Arrays import java.util.Date import java.util.Locale import java.util.Vector -import javax.servlet._ -import javax.servlet.http._ +import jakarta.servlet._ +import jakarta.servlet.http._ /** * A Mock HttpServletResponse. Take a peek at it's writer or diff --git a/web/testkit/src/main/scala/net/liftweb/mocks/MockServletContext.scala b/web/testkit/src/main/scala/net/liftweb/mocks/MockServletContext.scala index 77adfc6986..55f25437c2 100644 --- a/web/testkit/src/main/scala/net/liftweb/mocks/MockServletContext.scala +++ b/web/testkit/src/main/scala/net/liftweb/mocks/MockServletContext.scala @@ -33,8 +33,8 @@ import java.util.Arrays import java.util.Date import java.util.Locale import java.util.Vector -import javax.servlet._ -import javax.servlet.http._ +import jakarta.servlet._ +import jakarta.servlet.http._ /** * An example of how to use these mock classes in your unit tests: diff --git a/web/webkit/src/main/scala/net/liftweb/http/LiftRules.scala b/web/webkit/src/main/scala/net/liftweb/http/LiftRules.scala index 18b6772b43..136250827f 100644 --- a/web/webkit/src/main/scala/net/liftweb/http/LiftRules.scala +++ b/web/webkit/src/main/scala/net/liftweb/http/LiftRules.scala @@ -2053,8 +2053,7 @@ object StrictXHTML1_0Validator extends GenericValidator { abstract class GenericValidator extends XHtmlValidator with Loggable { import javax.xml.validation._ - import javax.xml._ - import XMLConstants._ + import javax.xml.XMLConstants._ import java.net.URL import javax.xml.transform.dom._ import javax.xml.transform.stream._ diff --git a/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/HTTPRequestServlet.scala b/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/HTTPRequestServlet.scala index a0dbf9be8e..eb68f7d98c 100644 --- a/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/HTTPRequestServlet.scala +++ b/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/HTTPRequestServlet.scala @@ -19,18 +19,18 @@ package http package provider package servlet -import java.io.{InputStream} -import java.util.{Locale} -import javax.servlet.http.{HttpServletRequest} -import org.apache.commons.fileupload.servlet._ -import org.apache.commons.fileupload.ProgressListener +import java.io.InputStream +import java.util.Locale +import jakarta.servlet.http.{HttpServletRequest} +import org.apache.commons.fileupload2.jakarta.servlet5.{JakartaServletFileUpload} +import org.apache.commons.fileupload2.core.ProgressListener import net.liftweb.common._ import net.liftweb.util._ import Helpers._ import scala.language.postfixOps -class HTTPRequestServlet(val req: HttpServletRequest, val provider: HTTPProvider) extends HTTPRequest { +class HTTPRequestServlet(@transient val req: HttpServletRequest, @transient val provider: HTTPProvider) extends HTTPRequest { private lazy val ctx = { new HTTPServletContext(req.getSession.getServletContext) } @@ -69,7 +69,7 @@ class HTTPRequestServlet(val req: HttpServletRequest, val provider: HTTPProvider // don't cache... allow multiple sessions for the request // necessary for session destruction on login - def session = new HTTPServletSession(req getSession) + def session = new HTTPServletSession(req.getSession) def uri = req.getRequestURI @@ -95,11 +95,11 @@ class HTTPRequestServlet(val req: HttpServletRequest, val provider: HTTPProvider def remoteHost: String = req.getRemoteHost - def serverName = req getServerName + def serverName = req.getServerName - def scheme: String = req getScheme + def scheme: String = req.getScheme - def serverPort = req getServerPort + def serverPort = req.getServerPort def method: String = req.getMethod @@ -107,7 +107,7 @@ class HTTPRequestServlet(val req: HttpServletRequest, val provider: HTTPProvider def inputStream: InputStream = req.getInputStream - def multipartContent_? = ServletFileUpload.isMultipartContent(req) + def multipartContent_? = JakartaServletFileUpload.isMultipartContent(req) /** * Destroy the underlying servlet session @@ -129,11 +129,11 @@ class HTTPRequestServlet(val req: HttpServletRequest, val provider: HTTPProvider } yield id def extractFiles: List[ParamHolder] = (new Iterator[ParamHolder] { - val mimeUpload = (new ServletFileUpload) + val mimeUpload = new JakartaServletFileUpload mimeUpload.setProgressListener(new ProgressListener { lazy val progList: (Long, Long, Int) => Unit = S.session.flatMap(_.progressListener) openOr LiftRules.progressListener - def update(a: Long, b: Long, c: Int) {progList(a, b, c)} + def update(a: Long, b: Long, c: Int): Unit = {progList(a, b, c)} }) mimeUpload.setSizeMax(LiftRules.maxMimeSize) @@ -142,16 +142,16 @@ class HTTPRequestServlet(val req: HttpServletRequest, val provider: HTTPProvider def hasNext = what.hasNext - import scala.collection.JavaConverters._ + import scala.jdk.CollectionConverters._ def next = what.next match { - case f if (f.isFormField) => NormalParamHolder(f.getFieldName, new String(readWholeStream(f.openStream), "UTF-8")) + case f if (f.isFormField) => NormalParamHolder(f.getFieldName, new String(readWholeStream(f.getInputStream), "UTF-8")) case f => { val headers = f.getHeaders() val names: List[String] = if (headers eq null) Nil else headers.getHeaderNames().asInstanceOf[java.util.Iterator[String]].asScala.toList val map: Map[String, List[String]] = Map(names.map(n => n -> headers.getHeaders(n).asInstanceOf[java.util.Iterator[String]].asScala.toList) :_*) LiftRules.withMimeHeaders(map) { - LiftRules.handleMimeFile(f.getFieldName, f.getContentType, f.getName, f.openStream) + LiftRules.handleMimeFile(f.getFieldName, f.getContentType, f.getName, f.getInputStream) } } } diff --git a/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/HTTPResponseServlet.scala b/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/HTTPResponseServlet.scala index 8b1729a327..d5ed9e40a1 100644 --- a/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/HTTPResponseServlet.scala +++ b/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/HTTPResponseServlet.scala @@ -21,7 +21,7 @@ package servlet import scala.collection.mutable.{ListBuffer} import java.io.{OutputStream} -import javax.servlet.http.{HttpServletResponse, Cookie} +import jakarta.servlet.http.{HttpServletResponse, Cookie} import net.liftweb.common._ import net.liftweb.util._ import Helpers._ @@ -33,7 +33,7 @@ class HTTPResponseServlet(resp: HttpServletResponse) extends HTTPResponse { def addCookies(cookies: List[HTTPCookie]) = cookies.foreach { case c => - val cookie = new javax.servlet.http.Cookie(c.name, c.value openOr null) + val cookie = new Cookie(c.name, c.value openOr null) c.domain map (cookie.setDomain(_)) c.path map (cookie.setPath(_)) c.maxAge map (cookie.setMaxAge(_)) diff --git a/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/HTTPServletContext.scala b/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/HTTPServletContext.scala index 1f368f0910..38eb0cfc04 100644 --- a/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/HTTPServletContext.scala +++ b/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/HTTPServletContext.scala @@ -19,7 +19,7 @@ package http package provider package servlet -import javax.servlet.{ServletContext} +import jakarta.servlet.{ServletContext} import java.net.URL import java.io.InputStream diff --git a/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/HTTPServletSession.scala b/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/HTTPServletSession.scala index f1535c3be4..c9c369153a 100644 --- a/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/HTTPServletSession.scala +++ b/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/HTTPServletSession.scala @@ -19,7 +19,7 @@ package http package provider package servlet -import javax.servlet.http._ +import jakarta.servlet.http._ import net.liftweb.common._ import net.liftweb.util._ @@ -53,23 +53,23 @@ class HTTPServletSession(session: HttpSession) extends HTTPSession { * Represents the "bridge" between HttpSession and LiftSession */ case class SessionToServletBridge(uniqueId: String) extends HttpSessionBindingListener with HttpSessionActivationListener { - def sessionDidActivate(se: HttpSessionEvent) = { + override def sessionDidActivate(se: HttpSessionEvent) = { SessionMaster.getSession(uniqueId, Empty).foreach(ls => LiftSession.onSessionActivate.foreach(_(ls))) } - def sessionWillPassivate(se: HttpSessionEvent) = { + override def sessionWillPassivate(se: HttpSessionEvent) = { SessionMaster.getSession(uniqueId, Empty).foreach(ls => LiftSession.onSessionPassivate.foreach(_(ls))) } - def valueBound(event: HttpSessionBindingEvent) { + override def valueBound(event: HttpSessionBindingEvent) { } /** * When the session is unbound the the HTTP session, stop us */ - def valueUnbound(event: HttpSessionBindingEvent) { + override def valueUnbound(event: HttpSessionBindingEvent) { SessionMaster.sendMsg(RemoveSession(uniqueId)) } diff --git a/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/ServletFilterProvider.scala b/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/ServletFilterProvider.scala index 0643f19639..9d502224af 100644 --- a/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/ServletFilterProvider.scala +++ b/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/ServletFilterProvider.scala @@ -19,8 +19,8 @@ package http package provider package servlet -import javax.servlet._ -import javax.servlet.http._ +import jakarta.servlet._ +import jakarta.servlet.http._ import net.liftweb.common._ import net.liftweb.util._ @@ -32,7 +32,7 @@ trait ServletFilterProvider extends Filter with HTTPProvider { var ctx: HTTPContext = _ //We need to capture the ServletContext on init - def init(config: FilterConfig) { + override def init(config: FilterConfig) { ctx = new HTTPServletContext(config.getServletContext) LiftRules.setContext(ctx) @@ -42,7 +42,7 @@ trait ServletFilterProvider extends Filter with HTTPProvider { } //And throw it away on destruction - def destroy { + override def destroy { ctx = null terminate } diff --git a/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/containers/Jetty6AsyncProvider.scala b/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/containers/Jetty6AsyncProvider.scala index b5684bcd6f..c10fd0603d 100644 --- a/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/containers/Jetty6AsyncProvider.scala +++ b/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/containers/Jetty6AsyncProvider.scala @@ -20,7 +20,7 @@ package provider package servlet package containers -import javax.servlet.http.HttpServletRequest +import jakarta.servlet.http.HttpServletRequest import net.liftweb.common._ import net.liftweb.http._ diff --git a/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/containers/Jetty7AsyncProvider.scala b/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/containers/Jetty7AsyncProvider.scala index ab553de8a1..41dc743974 100644 --- a/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/containers/Jetty7AsyncProvider.scala +++ b/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/containers/Jetty7AsyncProvider.scala @@ -20,7 +20,8 @@ package provider package servlet package containers -import javax.servlet.http.HttpServletRequest +import jakarta.servlet.ServletRequest +import jakarta.servlet.http.HttpServletRequest import net.liftweb.common._ import net.liftweb.http._ @@ -43,7 +44,7 @@ object Jetty7AsyncProvider extends AsyncProviderMeta { isResumed) = { try { val cc = Class.forName("org.eclipse.jetty.continuation.ContinuationSupport") - val meth = cc.getMethod("getContinuation", classOf[javax.servlet.ServletRequest]) + val meth = cc.getMethod("getContinuation", classOf[ServletRequest]) val cci = Class.forName("org.eclipse.jetty.continuation.Continuation") val getAttribute = cci.getMethod("getAttribute", classOf[String]) val setAttribute = cci.getMethod("setAttribute", classOf[String], classOf[AnyRef]) diff --git a/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/containers/Servlet30AsyncProvider.scala b/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/containers/Servlet30AsyncProvider.scala index 878c4e3f1f..aa42f189d6 100644 --- a/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/containers/Servlet30AsyncProvider.scala +++ b/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/containers/Servlet30AsyncProvider.scala @@ -20,8 +20,8 @@ package provider package servlet package containers -import javax.servlet.http.HttpServletRequest -import javax.servlet._ +import jakarta.servlet.http.{HttpServletRequest, HttpServletResponse} +//import jakarta.servlet._ import net.liftweb.common._ import net.liftweb.http._ @@ -40,8 +40,8 @@ object Servlet30AsyncProvider extends AsyncProviderMeta { complete, isSupported) = { try { - val cc = Class.forName("javax.servlet.ServletRequest") - val asyncClass = Class.forName("javax.servlet.AsyncContext") + val cc = Class.forName("jakarta.servlet.ServletRequest") + val asyncClass = Class.forName("jakarta.servlet.AsyncContext") val startAsync = cc.getMethod("startAsync") val getResponse = asyncClass.getMethod("getResponse") val complete = asyncClass.getMethod("complete") @@ -107,7 +107,7 @@ class Servlet30AsyncProvider(req: HTTPRequest) extends ServletAsyncProvider with def resume(what: (Req, LiftResponse)): Boolean = { logger.trace("Servlet 3.0 begin resume") - val httpRes = getResponse.invoke(asyncCtx).asInstanceOf[javax.servlet.http.HttpServletResponse] + val httpRes = getResponse.invoke(asyncCtx).asInstanceOf[HttpServletResponse] val httpResponse = new HTTPResponseServlet(httpRes) val liftServlet = req.provider.liftServlet try { From 41e19ebfb09eaed98b0c6226860143006b19129b Mon Sep 17 00:00:00 2001 From: Hong Shao Date: Mon, 4 Nov 2024 12:36:47 -0500 Subject: [PATCH 2/2] [PXS-82308] Update version number and dependency --- build.sbt | 2 +- project/Dependencies.scala | 2 +- .../net/liftweb/http/provider/servlet/HTTPRequestServlet.scala | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index 97bc530148..118ae8b366 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ import Dependencies._ organization in ThisBuild := "net.liftweb" -version in ThisBuild := "2.6.3-px-jakarta-1" +version in ThisBuild := "2.6.3-px-jakarta-2" homepage in ThisBuild := Some(url("http://www.liftweb.net")) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index dc193a24a8..fcd981262b 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -37,7 +37,7 @@ object Dependencies { // Compile scope: // Scope available in all classpath, transitive by default. lazy val commons_codec = "commons-codec" % "commons-codec" % "1.6" - lazy val commons_fileupload = "org.apache.commons" % "commons-fileupload2-jakarta-servlet5" % "2.0.0-M2" + lazy val commons_fileupload = "org.apache.commons" % "commons-fileupload2-jakarta-servlet6" % "2.0.0-M2" lazy val commons_httpclient = "commons-httpclient" % "commons-httpclient" % "3.1" lazy val jakartamail = "jakarta.mail" % "jakarta.mail-api" % "2.1.3" diff --git a/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/HTTPRequestServlet.scala b/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/HTTPRequestServlet.scala index eb68f7d98c..46ed8960cf 100644 --- a/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/HTTPRequestServlet.scala +++ b/web/webkit/src/main/scala/net/liftweb/http/provider/servlet/HTTPRequestServlet.scala @@ -22,7 +22,7 @@ package servlet import java.io.InputStream import java.util.Locale import jakarta.servlet.http.{HttpServletRequest} -import org.apache.commons.fileupload2.jakarta.servlet5.{JakartaServletFileUpload} +import org.apache.commons.fileupload2.jakarta.servlet6.JakartaServletFileUpload import org.apache.commons.fileupload2.core.ProgressListener import net.liftweb.common._ import net.liftweb.util._