-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
3 changed files
with
67 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,8 +44,10 @@ | |
* </p> | ||
* | ||
* <ol> | ||
* <li>Sets the MultiPartManager to an instance of FileUploadMultiPartManager.</li> | ||
* <li>Adds the JakartaFileCleaner listener that cleans up the temporary files.</li> | ||
* <li>Sets the MultiPartManager to an instance of | ||
* FileUploadMultiPartManager.</li> | ||
* <li>Adds the JakartaFileCleaner listener that cleans up the temporary | ||
* files.</li> | ||
* </ol> | ||
* | ||
* @author Manfred Riem ([email protected]) | ||
|
@@ -62,13 +64,17 @@ public class FileUploadMultiPartInitializer implements ServletContainerInitializ | |
*/ | ||
public FileUploadMultiPartInitializer() { | ||
} | ||
|
||
@Override | ||
public void onStartup(Set<Class<?>> classes, ServletContext servletContext) throws ServletException { | ||
WebApplication webApplication = (WebApplication) servletContext; | ||
LOGGER.log(TRACE, "Setting the MultiPartManager"); | ||
if (LOGGER.isLoggable(TRACE)) { | ||
LOGGER.log(TRACE, "Setting the MultiPartManager"); | ||
} | ||
webApplication.getManager().setMultiPartManager(new FileUploadMultiPartManager()); | ||
LOGGER.log(TRACE, "Adding the listener used to cleanup temporary files"); | ||
if (LOGGER.isLoggable(TRACE)) { | ||
LOGGER.log(TRACE, "Adding the listener used to cleanup temporary files"); | ||
} | ||
webApplication.addListener("org.apache.commons.fileupload2.jakarta.servlet6.JakartaFileCleaner"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters