Skip to content

Commit

Permalink
Changes:
Browse files Browse the repository at this point in the history
- Fix: Old H2-library removed from DB folder
- Log4j2: Better env-variable in configuration
- Logging context name (servlet-name) for log4j2 in servlet-context
- Files Upload/Download example template: URL fixes (+language)
  • Loading branch information
autumoswitzerland committed Nov 8, 2024
1 parent b2151ca commit 03e7d9e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cfg/logging-web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<Configuration status="error" name="BeetRootConfig">
<Properties>
<Property name="basePath">${env:CATALINA_BASE}/logs</Property>
<Property name="basePath">${sys:catalina.base}/logs</Property>
</Properties>
<Appenders>
<Console name="console" target="SYSTEM_OUT">
Expand Down
Binary file removed db/h2/h2-2.3.230.jar
Binary file not shown.
Binary file not shown.
9 changes: 6 additions & 3 deletions src/main/java/ch/autumo/beetroot/AbstractBeetRootServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,18 @@ public void init(ServletConfig config) throws ServletException {
} catch (Exception e) {
LOG.error("Configuration initialization failed !", e);
throw new ServletException("Configuration initialization failed !", e);
}
}



// 2. Logging configuration
final String servletContainer = config.getInitParameter("servletContainer");
if (servletContainer == null || !servletContainer.equals("jetty")) {
// configure logging
// Configure logging
final String logCfgFile = config.getInitParameter("beetRootLogConfig");
try {
LoggingFactory.getInstance().initialize(webAppRoot + logCfgFile);
// For environments such as WebLogic, it is important that a logging context has a unique name!
LoggingFactory.getInstance().initialize(webAppRoot + logCfgFile, configMan.getServletName());
} catch (Exception ioex) {
throw new ServletException("Logging configuration initialization failed !", ioex);
}
Expand Down
2 changes: 1 addition & 1 deletion web/html/files/add.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
</nav>
<div class="fileupload index large-10 medium-8 columns content">
<div class="fileupload form content">
<form enctype="multipart/form-data" action="/files/add" method="post">
<form enctype="multipart/form-data" action="/{$lang}/files/add" method="post">
<fieldset>
<legend>
{$l.files.add.1}
Expand Down
2 changes: 1 addition & 1 deletion web/html/files/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h3>
</h3>
<p>
{$l.files.view.2}
<a href="/files/view?download=web/img/ifaceX-back.png">
<a href="/{$lang}/files/view?download=web/img/ifaceX-back.png">
{$l.files.view.3}
</a>
</p>
Expand Down

0 comments on commit 03e7d9e

Please sign in to comment.