universe@204: /* universe@204: * Copyright 2021 Mike Becker. All rights reserved. universe@204: * universe@204: * Redistribution and use in source and binary forms, with or without universe@204: * modification, are permitted provided that the following conditions are met: universe@204: * universe@204: * 1. Redistributions of source code must retain the above copyright universe@204: * notice, this list of conditions and the following disclaimer. universe@204: * universe@204: * 2. Redistributions in binary form must reproduce the above copyright universe@204: * notice, this list of conditions and the following disclaimer in the universe@204: * documentation and/or other materials provided with the distribution. universe@204: * universe@204: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" universe@204: * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE universe@204: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE universe@204: * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE universe@204: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL universe@204: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR universe@204: * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER universe@204: * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, universe@204: * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE universe@204: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. universe@204: */ universe@204: universe@204: package de.uapcore.lightpit.servlet universe@204: universe@204: import de.uapcore.lightpit.AbstractServlet universe@204: import de.uapcore.lightpit.HttpRequest universe@204: import de.uapcore.lightpit.dao.DataAccessObject universe@254: import jakarta.servlet.annotation.WebServlet universe@204: universe@204: @WebServlet(urlPatterns = ["/about/*"]) universe@204: class AboutServlet : AbstractServlet() { universe@204: universe@204: init { universe@204: get("/", this::viewAboutPage) universe@204: } universe@204: universe@204: private fun viewAboutPage(http: HttpRequest, dao: DataAccessObject) { universe@204: with(http) { universe@204: styleSheets = listOf("about") universe@204: render("about") universe@204: } universe@204: } universe@204: }