arturobernalg commented on code in PR #282:
URL: https://github.com/apache/jspwiki/pull/282#discussion_r1237687781
##########
jspwiki-bootstrap/src/main/java/org/apache/wiki/bootstrap/WikiBootstrapServletContextListener.java:
##########
@@ -98,4 +101,33 @@ ConfigurationSource createConfigurationSource( final
Properties properties ) {
public void contextDestroyed( final ServletContextEvent sce ) {
}
+ /**
+ * This method sets the JSPWiki working directory (jspwiki.workDir). It
first checks if this property
+ * is already set. If it isn't, it attempts to use the servlet container's
temporary directory
+ * (javax.servlet.context.tempdir). If that is also unavailable, it
defaults to the system's temporary
+ * directory (java.io.tmpdir).
+ * <p>
+ * This method is package-private to allow for unit testing.
+ *
+ * @param properties the JSPWiki properties
+ * @param servletContext the Servlet context from which to fetch the
tempdir if needed
+ * @since JSPWiki 2.11.1
+ */
+ void setWorkDir(final Properties properties, final ServletContext
servletContext) {
Review Comment:
done.
##########
jspwiki-main/src/main/java/org/apache/wiki/ui/Installer.java:
##########
@@ -86,6 +86,7 @@ public Installer( final HttpServletRequest request, final
ServletConfig config )
// Stash the request
m_request = request;
m_validated = false;
+ TMP_DIR = m_engine.getWikiProperties().getProperty( "java.io.tmpdir" );
Review Comment:
done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]