src/main/kotlin/de/uapcore/lightpit/RequestMapping.kt

changeset 195
9c7aff3cbb14
parent 184
e8eecee6aadf
child 198
94f174d591ab
--- a/src/main/kotlin/de/uapcore/lightpit/RequestMapping.kt	Thu May 13 10:23:37 2021 +0200
+++ b/src/main/kotlin/de/uapcore/lightpit/RequestMapping.kt	Thu May 13 11:28:50 2021 +0200
@@ -108,9 +108,13 @@
     fun param(name: String): String? = request.getParameter(name)
     fun paramArray(name: String): Array<String> = request.getParameterValues(name) ?: emptyArray()
 
+    fun forward(jsp: String) {
+        request.getRequestDispatcher(jspPath(jsp)).forward(request, response)
+    }
+
     fun render(page: String? = null) {
         page?.let { contentPage = it }
-        request.getRequestDispatcher(jspPath("site")).forward(request, response)
+        forward("site")
     }
 
     fun renderCommit(location: String? = null) {

mercurial