Skip to content

Commit

Permalink
Merge branch 'jetty-11.0.x' into jetty-12.0.x-merge-11
Browse files Browse the repository at this point in the history
  • Loading branch information
olamy committed Oct 17, 2023
2 parents ffe80cd + 3507e17 commit e99d47c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.net.URI;
import java.nio.file.Path;

import jakarta.servlet.ServletContext;
import org.eclipse.jetty.ee10.webapp.WebAppContext;

/**
Expand All @@ -27,7 +28,7 @@ public class JspConfig
{
public static void init(WebAppContext context, URI baseUri, File scratchDir)
{
context.setAttribute("jakarta.servlet.context.tempdir", scratchDir);
context.setAttribute(ServletContext.TEMPDIR, scratchDir);
context.setAttribute("org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern",
".*/jetty-jakarta-servlet-api-[^/]*\\.jar$|.*jakarta.servlet.jsp.jstl-[^/]*\\.jar|.*taglibs-standard.*\\.jar");
context.setWar(baseUri.toASCIIString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import java.io.File;
import java.net.URI;

import jakarta.servlet.ServletContext;
import org.eclipse.jetty.ee9.webapp.WebAppContext;

/**
Expand All @@ -26,7 +27,7 @@ public class JspConfig
{
public static void init(WebAppContext context, URI baseUri, File scratchDir)
{
context.setAttribute("jakarta.servlet.context.tempdir", scratchDir);
context.setAttribute(ServletContext.TEMPDIR, scratchDir);
context.setAttribute("org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern",
System.getProperty("org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern"));
context.setWar(baseUri.toASCIIString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ public String getContentDispositionFilename()
* @param in Request input stream
* @param contentType Content-Type header
* @param config MultipartConfigElement
* @param contextTmpDir javax.servlet.context.tempdir
* @param contextTmpDir {@value jakarta.servlet.ServletContext#TEMPDIR}
*/
public MultiPartFormInputStream(InputStream in, String contentType, MultipartConfigElement config, File contextTmpDir)
{
Expand All @@ -397,7 +397,8 @@ public MultiPartFormInputStream(InputStream in, String contentType, MultipartCon
* @param in Request input stream
* @param contentType Content-Type header
* @param config MultipartConfigElement
* @param contextTmpDir javax.servlet.context.tempdir
* @param contextTmpDir {@value jakarta.servlet.ServletContext#TEMPDIR}
* @param maxParts the maximum number of parts that can be parsed from the multipart content (0 for no parts allowed, -1 for unlimited parts).
*/
public MultiPartFormInputStream(InputStream in, String contentType, MultipartConfigElement config, File contextTmpDir, int maxParts)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ public void setContextWhiteList(String... contextWhiteList)

/**
* Set temporary directory for context.
* The jakarta.servlet.context.tempdir attribute is also set.
* The {@value jakarta.servlet.ServletContext#TEMPDIR} attribute is also set.
*
* @param dir Writable temporary directory.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void cloneConfigure(WebAppContext template, WebAppContext context) throws
* exit depends on value of persistTempDirectory.
* </li>
* <li>
* Iff jakarta.servlet.context.tempdir context attribute is set for
* Iff {@value jakarta.servlet.ServletContext#TEMPDIR} context attribute is set for
* this webapp &amp;&amp; exists &amp;&amp; writeable, then use it. Set delete on exit depends on
* value of persistTempDirectory.
* </li>
Expand Down

0 comments on commit e99d47c

Please sign in to comment.