View packaging still in progress
This commit is contained in:
@@ -95,6 +95,20 @@
|
||||
<!-- <includePath>${basedir}/src/main/sass/plugins/</includePath> -->
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<version>${jetty.version}</version>
|
||||
<configuration>
|
||||
<scan>0</scan>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>pairgoth.webapp.url</name>
|
||||
<value>http://localhost:8080</value>
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencyManagement>
|
||||
|
@@ -1,6 +1,7 @@
|
||||
# webapp
|
||||
webapp.env = dev
|
||||
env = dev
|
||||
webapp.url = https://localhost:8080
|
||||
api.url = https://localhost:8085
|
||||
|
||||
# store
|
||||
store = file
|
||||
|
@@ -10,7 +10,7 @@ import okhttp3.internal.EMPTY_REQUEST
|
||||
class ApiTool {
|
||||
companion object {
|
||||
const val JSON = "application/json"
|
||||
val apiRoot = System.getProperty("pairgoth.webapp.url").let { base ->
|
||||
val apiRoot = System.getProperty("pairgoth.api.url").let { base ->
|
||||
if (base.endsWith('/')) "${base}api/"
|
||||
else "${base}/api/"
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ class LanguageFilter : Filter {
|
||||
// the request must be redirected
|
||||
val preferredLanguage = getPreferredLanguage(request)
|
||||
val destination = if (lang != null) target else uri
|
||||
response.sendRedirect("${preferredLanguage}${destination}")
|
||||
response.sendRedirect("/${preferredLanguage}${destination}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -51,7 +51,7 @@ class WebappManager : ServletContextListener, ServletContextAttributeListener, H
|
||||
/* ServletContextListener interface */
|
||||
override fun contextInitialized(sce: ServletContextEvent) {
|
||||
context = sce.servletContext
|
||||
logger.info("---------- Starting Web Application ----------")
|
||||
logger.info("---------- Starting Pairgoth Web Client ----------")
|
||||
context.setAttribute("manager", this)
|
||||
webappRoot = context.getRealPath("/")
|
||||
try {
|
||||
|
Reference in New Issue
Block a user