src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java

Fri, 22 May 2020 21:23:57 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 22 May 2020 21:23:57 +0200
changeset 75
33b6843fdf8a
parent 74
91d1fc2a3a14
child 78
bb4c52bf3439
permissions
-rw-r--r--

adds the ability to create and edit issues

universe@7 1 /*
universe@7 2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
universe@34 3 *
universe@24 4 * Copyright 2018 Mike Becker. All rights reserved.
universe@34 5 *
universe@7 6 * Redistribution and use in source and binary forms, with or without
universe@7 7 * modification, are permitted provided that the following conditions are met:
universe@7 8 *
universe@7 9 * 1. Redistributions of source code must retain the above copyright
universe@7 10 * notice, this list of conditions and the following disclaimer.
universe@7 11 *
universe@7 12 * 2. Redistributions in binary form must reproduce the above copyright
universe@7 13 * notice, this list of conditions and the following disclaimer in the
universe@7 14 * documentation and/or other materials provided with the distribution.
universe@7 15 *
universe@7 16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
universe@7 17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
universe@7 18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
universe@7 19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
universe@7 20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
universe@7 21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
universe@7 22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
universe@7 23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
universe@7 24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
universe@7 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
universe@7 26 * POSSIBILITY OF SUCH DAMAGE.
universe@34 27 *
universe@7 28 */
universe@7 29 package de.uapcore.lightpit;
universe@7 30
universe@38 31 import de.uapcore.lightpit.dao.DataAccessObjects;
universe@38 32 import de.uapcore.lightpit.dao.postgres.PGDataAccessObjects;
universe@33 33 import org.slf4j.Logger;
universe@33 34 import org.slf4j.LoggerFactory;
universe@33 35
universe@7 36 import javax.servlet.ServletException;
universe@7 37 import javax.servlet.http.HttpServlet;
universe@7 38 import javax.servlet.http.HttpServletRequest;
universe@7 39 import javax.servlet.http.HttpServletResponse;
universe@13 40 import javax.servlet.http.HttpSession;
universe@33 41 import java.io.IOException;
universe@47 42 import java.lang.reflect.Constructor;
universe@73 43 import java.lang.reflect.InvocationTargetException;
universe@33 44 import java.lang.reflect.Method;
universe@33 45 import java.lang.reflect.Modifier;
universe@38 46 import java.sql.Connection;
universe@38 47 import java.sql.SQLException;
universe@33 48 import java.util.*;
universe@63 49 import java.util.function.Function;
universe@7 50
universe@7 51 /**
universe@7 52 * A special implementation of a HTTPServlet which is focused on implementing
universe@7 53 * the necessary functionality for {@link LightPITModule}s.
universe@7 54 */
universe@9 55 public abstract class AbstractLightPITServlet extends HttpServlet {
universe@34 56
universe@10 57 private static final Logger LOG = LoggerFactory.getLogger(AbstractLightPITServlet.class);
universe@34 58
universe@43 59 private static final String SITE_JSP = Functions.jspPath("site");
universe@33 60
universe@11 61 /**
universe@11 62 * The EL proxy is necessary, because the EL resolver cannot handle annotation properties.
universe@11 63 */
universe@36 64 private LightPITModule.ELProxy moduleInfo = null;
universe@33 65
universe@63 66 @FunctionalInterface
universe@63 67 protected interface SQLFindFunction<K, T> {
universe@63 68 T apply(K key) throws SQLException;
universe@63 69
universe@63 70 default <V> SQLFindFunction<V, T> compose(Function<? super V, ? extends K> before) throws SQLException {
universe@63 71 Objects.requireNonNull(before);
universe@63 72 return (v) -> this.apply(before.apply(v));
universe@63 73 }
universe@63 74
universe@63 75 default <V> SQLFindFunction<K, V> andThen(Function<? super T, ? extends V> after) throws SQLException {
universe@63 76 Objects.requireNonNull(after);
universe@63 77 return (t) -> after.apply(this.apply(t));
universe@63 78 }
universe@63 79
universe@63 80 static <K> Function<K, K> identity() {
universe@63 81 return (t) -> t;
universe@63 82 }
universe@63 83 }
universe@63 84
universe@10 85 /**
universe@11 86 * Invocation mapping gathered from the {@link RequestMapping} annotations.
universe@34 87 * <p>
universe@18 88 * Paths in this map must always start with a leading slash, although
universe@18 89 * the specification in the annotation must not start with a leading slash.
universe@34 90 * <p>
universe@34 91 * The reason for this is the different handling of empty paths in
universe@18 92 * {@link HttpServletRequest#getPathInfo()}.
universe@11 93 */
universe@39 94 private final Map<HttpMethod, Map<String, Method>> mappings = new HashMap<>();
universe@11 95
universe@11 96 /**
universe@10 97 * Gives implementing modules access to the {@link ModuleManager}.
universe@33 98 *
universe@10 99 * @return the module manager
universe@10 100 */
universe@10 101 protected final ModuleManager getModuleManager() {
universe@10 102 return (ModuleManager) getServletContext().getAttribute(ModuleManager.SC_ATTR_NAME);
universe@10 103 }
universe@33 104
universe@38 105
universe@34 106 /**
universe@38 107 * Creates a set of data access objects for the specified connection.
universe@33 108 *
universe@38 109 * @param connection the SQL connection
universe@38 110 * @return a set of data access objects
universe@17 111 */
universe@38 112 private DataAccessObjects createDataAccessObjects(Connection connection) throws SQLException {
universe@38 113 final var df = (DatabaseFacade) getServletContext().getAttribute(DatabaseFacade.SC_ATTR_NAME);
universe@39 114 if (df.getSQLDialect() == DatabaseFacade.Dialect.Postgres) {
universe@39 115 return new PGDataAccessObjects(connection);
universe@38 116 }
universe@39 117 throw new AssertionError("Non-exhaustive if-else - this is a bug.");
universe@17 118 }
universe@33 119
universe@38 120 private ResponseType invokeMapping(Method method, HttpServletRequest req, HttpServletResponse resp, DataAccessObjects dao) throws IOException {
universe@11 121 try {
universe@14 122 LOG.trace("invoke {}#{}", method.getDeclaringClass().getName(), method.getName());
universe@42 123 final var paramTypes = method.getParameterTypes();
universe@42 124 final var paramValues = new Object[paramTypes.length];
universe@42 125 for (int i = 0; i < paramTypes.length; i++) {
universe@42 126 if (paramTypes[i].isAssignableFrom(HttpServletRequest.class)) {
universe@42 127 paramValues[i] = req;
universe@42 128 } else if (paramTypes[i].isAssignableFrom(HttpServletResponse.class)) {
universe@42 129 paramValues[i] = resp;
universe@42 130 }
universe@42 131 if (paramTypes[i].isAssignableFrom(DataAccessObjects.class)) {
universe@42 132 paramValues[i] = dao;
universe@42 133 }
universe@42 134 }
universe@42 135 return (ResponseType) method.invoke(this, paramValues);
universe@73 136 } catch (InvocationTargetException ex) {
universe@73 137 LOG.error("invocation of method {}::{} failed: {}",
universe@73 138 method.getDeclaringClass().getName(), method.getName(), ex.getTargetException().getMessage());
universe@73 139 LOG.debug("Details: ", ex.getTargetException());
universe@73 140 resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ex.getTargetException().getMessage());
universe@73 141 return ResponseType.NONE;
universe@12 142 } catch (ReflectiveOperationException | ClassCastException ex) {
universe@73 143 LOG.error("invocation of method {}::{} failed: {}",
universe@73 144 method.getDeclaringClass().getName(), method.getName(), ex.getMessage());
universe@38 145 LOG.debug("Details: ", ex);
universe@73 146 resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ex.getMessage());
universe@12 147 return ResponseType.NONE;
universe@11 148 }
universe@11 149 }
universe@11 150
universe@11 151 @Override
universe@11 152 public void init() throws ServletException {
universe@36 153 moduleInfo = Optional.ofNullable(this.getClass().getAnnotation(LightPITModule.class))
universe@36 154 .map(LightPITModule.ELProxy::new).orElse(null);
universe@33 155
universe@33 156 if (moduleInfo != null) {
universe@12 157 scanForRequestMappings();
universe@12 158 }
universe@33 159
universe@12 160 LOG.trace("{} initialized", getServletName());
universe@12 161 }
universe@12 162
universe@12 163 private void scanForRequestMappings() {
universe@12 164 try {
universe@11 165 Method[] methods = getClass().getDeclaredMethods();
universe@11 166 for (Method method : methods) {
universe@11 167 Optional<RequestMapping> mapping = Optional.ofNullable(method.getAnnotation(RequestMapping.class));
universe@11 168 if (mapping.isPresent()) {
universe@11 169 if (!Modifier.isPublic(method.getModifiers())) {
universe@11 170 LOG.warn("{} is annotated with {} but is not public",
universe@11 171 method.getName(), RequestMapping.class.getSimpleName()
universe@11 172 );
universe@11 173 continue;
universe@11 174 }
universe@11 175 if (Modifier.isAbstract(method.getModifiers())) {
universe@11 176 LOG.warn("{} is annotated with {} but is abstract",
universe@11 177 method.getName(), RequestMapping.class.getSimpleName()
universe@11 178 );
universe@11 179 continue;
universe@11 180 }
universe@12 181 if (!ResponseType.class.isAssignableFrom(method.getReturnType())) {
universe@12 182 LOG.warn("{} is annotated with {} but has the wrong return type - 'ResponseType' required",
universe@12 183 method.getName(), RequestMapping.class.getSimpleName()
universe@12 184 );
universe@12 185 continue;
universe@12 186 }
universe@12 187
universe@42 188 boolean paramsInjectible = true;
universe@42 189 for (var param : method.getParameterTypes()) {
universe@42 190 paramsInjectible &= HttpServletRequest.class.isAssignableFrom(param)
universe@42 191 || HttpServletResponse.class.isAssignableFrom(param)
universe@42 192 || DataAccessObjects.class.isAssignableFrom(param);
universe@42 193 }
universe@42 194 if (paramsInjectible) {
universe@58 195 String requestPath = "/" + mapping.get().requestPath();
universe@12 196
universe@39 197 if (mappings
universe@39 198 .computeIfAbsent(mapping.get().method(), k -> new HashMap<>())
universe@39 199 .putIfAbsent(requestPath, method) != null) {
universe@11 200 LOG.warn("{} {} has multiple mappings",
universe@11 201 mapping.get().method(),
universe@11 202 mapping.get().requestPath()
universe@11 203 );
universe@11 204 }
universe@12 205
universe@22 206 LOG.debug("{} {} maps to {}::{}",
universe@11 207 mapping.get().method(),
universe@18 208 requestPath,
universe@22 209 getClass().getSimpleName(),
universe@11 210 method.getName()
universe@11 211 );
universe@11 212 } else {
universe@42 213 LOG.warn("{} is annotated with {} but has the wrong parameters - only HttpServletRequest. HttpServletResponse, and DataAccessObjects are allowed",
universe@11 214 method.getName(), RequestMapping.class.getSimpleName()
universe@11 215 );
universe@11 216 }
universe@11 217 }
universe@11 218 }
universe@12 219 } catch (SecurityException ex) {
universe@12 220 LOG.error("Scan for request mappings on declared methods failed.", ex);
universe@11 221 }
universe@11 222 }
universe@11 223
universe@11 224 @Override
universe@11 225 public void destroy() {
universe@11 226 mappings.clear();
universe@11 227 LOG.trace("{} destroyed", getServletName());
universe@11 228 }
universe@34 229
universe@13 230 /**
universe@74 231 * Sets the name of the content page.
universe@34 232 * <p>
universe@13 233 * It is sufficient to specify the name without any extension. The extension
universe@13 234 * is added automatically if not specified.
universe@34 235 *
universe@74 236 * @param req the servlet request object
universe@74 237 * @param pageName the name of the content page
universe@74 238 * @see Constants#REQ_ATTR_CONTENT_PAGE
universe@13 239 */
universe@74 240 protected void setContentPage(HttpServletRequest req, String pageName) {
universe@74 241 req.setAttribute(Constants.REQ_ATTR_CONTENT_PAGE, Functions.jspPath(pageName));
universe@13 242 }
universe@34 243
universe@11 244 /**
universe@71 245 * Sets the breadcrumbs menu.
universe@71 246 *
universe@71 247 * @param req the servlet request object
universe@71 248 * @param breadcrumbs the menu entries for the breadcrumbs menu
universe@71 249 * @see Constants#REQ_ATTR_BREADCRUMBS
universe@71 250 */
universe@71 251 protected void setBreadcrumbs(HttpServletRequest req, List<MenuEntry> breadcrumbs) {
universe@71 252 req.setAttribute(Constants.REQ_ATTR_BREADCRUMBS, breadcrumbs);
universe@71 253 }
universe@71 254
universe@71 255 /**
universe@47 256 * @param req the servlet request object
universe@47 257 * @param location the location where to redirect
universe@47 258 * @see Constants#REQ_ATTR_REDIRECT_LOCATION
universe@47 259 */
universe@63 260 protected void setRedirectLocation(HttpServletRequest req, String location) {
universe@47 261 if (location.startsWith("./")) {
universe@47 262 location = location.replaceFirst("\\./", Functions.baseHref(req));
universe@47 263 }
universe@47 264 req.setAttribute(Constants.REQ_ATTR_REDIRECT_LOCATION, location);
universe@47 265 }
universe@47 266
universe@47 267 /**
universe@13 268 * Specifies the name of an additional stylesheet used by the module.
universe@34 269 * <p>
universe@13 270 * Setting an additional stylesheet is optional, but quite common for HTML
universe@13 271 * output.
universe@34 272 * <p>
universe@13 273 * It is sufficient to specify the name without any extension. The extension
universe@13 274 * is added automatically if not specified.
universe@34 275 *
universe@34 276 * @param req the servlet request object
universe@13 277 * @param stylesheet the name of the stylesheet
universe@11 278 */
universe@13 279 public void setStylesheet(HttpServletRequest req, String stylesheet) {
universe@13 280 req.setAttribute(Constants.REQ_ATTR_STYLESHEET, Functions.enforceExt(stylesheet, ".css"));
universe@10 281 }
universe@34 282
universe@47 283 /**
universe@47 284 * Obtains a request parameter of the specified type.
universe@47 285 * The specified type must have a single-argument constructor accepting a string to perform conversion.
universe@47 286 * The constructor of the specified type may throw an exception on conversion failures.
universe@47 287 *
universe@71 288 * @param req the servlet request object
universe@47 289 * @param clazz the class object of the expected type
universe@71 290 * @param name the name of the parameter
universe@71 291 * @param <T> the expected type
universe@47 292 * @return the parameter value or an empty optional, if no parameter with the specified name was found
universe@47 293 */
universe@71 294 protected <T> Optional<T> getParameter(HttpServletRequest req, Class<T> clazz, String name) {
universe@47 295 final String paramValue = req.getParameter(name);
universe@47 296 if (paramValue == null) return Optional.empty();
universe@71 297 if (clazz.equals(String.class)) return Optional.of((T) paramValue);
universe@75 298 if (java.sql.Date.class.isAssignableFrom(clazz)) {
universe@75 299 try {
universe@75 300 return Optional.of((T)java.sql.Date.valueOf(paramValue));
universe@75 301 } catch (IllegalArgumentException ex) {
universe@75 302 return Optional.empty();
universe@75 303 }
universe@75 304 }
universe@47 305 try {
universe@47 306 final Constructor<T> ctor = clazz.getConstructor(String.class);
universe@47 307 return Optional.of(ctor.newInstance(paramValue));
universe@47 308 } catch (ReflectiveOperationException e) {
universe@47 309 throw new RuntimeException(e);
universe@47 310 }
universe@47 311
universe@47 312 }
universe@47 313
universe@63 314 /**
universe@63 315 * Tries to look up an entity with a key obtained from a request parameter.
universe@63 316 *
universe@71 317 * @param req the servlet request object
universe@63 318 * @param clazz the class representing the type of the request parameter
universe@71 319 * @param name the name of the request parameter
universe@71 320 * @param find the find function (typically a DAO function)
universe@71 321 * @param <T> the type of the request parameter
universe@71 322 * @param <R> the type of the looked up entity
universe@63 323 * @return the retrieved entity or an empty optional if there is no such entity or the request parameter was missing
universe@63 324 * @throws SQLException if the find function throws an exception
universe@63 325 */
universe@71 326 protected <T, R> Optional<R> findByParameter(HttpServletRequest req, Class<T> clazz, String name, SQLFindFunction<? super T, ? extends R> find) throws SQLException {
universe@63 327 final var param = getParameter(req, clazz, name);
universe@63 328 if (param.isPresent()) {
universe@63 329 return Optional.ofNullable(find.apply(param.get()));
universe@63 330 } else {
universe@63 331 return Optional.empty();
universe@63 332 }
universe@63 333 }
universe@63 334
universe@10 335 private void forwardToFullView(HttpServletRequest req, HttpServletResponse resp)
universe@10 336 throws IOException, ServletException {
universe@34 337
universe@71 338 final var mainMenu = new ArrayList<MenuEntry>(getModuleManager().getMainMenu());
universe@71 339 for (var entry : mainMenu) {
universe@71 340 if (Functions.fullPath(req).startsWith("/" + entry.getPathName())) {
universe@71 341 entry.setActive(true);
universe@71 342 }
universe@71 343 }
universe@71 344 req.setAttribute(Constants.REQ_ATTR_MENU, mainMenu);
universe@43 345 req.getRequestDispatcher(SITE_JSP).forward(req, resp);
universe@10 346 }
universe@34 347
universe@45 348 private String sanitizeRequestPath(HttpServletRequest req) {
universe@45 349 return Optional.ofNullable(req.getPathInfo()).orElse("/");
universe@45 350 }
universe@45 351
universe@39 352 private Optional<Method> findMapping(HttpMethod method, HttpServletRequest req) {
universe@45 353 return Optional.ofNullable(mappings.get(method)).map(rm -> rm.get(sanitizeRequestPath(req)));
universe@11 354 }
universe@34 355
universe@34 356 private void forwardAsSpecified(ResponseType type, HttpServletRequest req, HttpServletResponse resp)
universe@12 357 throws ServletException, IOException {
universe@12 358 switch (type) {
universe@34 359 case NONE:
universe@34 360 return;
universe@43 361 case HTML:
universe@12 362 forwardToFullView(req, resp);
universe@12 363 return;
universe@12 364 // TODO: implement remaining response types
universe@12 365 default:
universe@34 366 throw new AssertionError("ResponseType switch is not exhaustive - this is a bug!");
universe@12 367 }
universe@12 368 }
universe@34 369
universe@38 370 private void doProcess(HttpMethod method, HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
universe@27 371
universe@13 372 // choose the requested language as session language (if available) or fall back to english, otherwise
universe@20 373 HttpSession session = req.getSession();
universe@13 374 if (session.getAttribute(Constants.SESSION_ATTR_LANGUAGE) == null) {
universe@13 375 Optional<List<String>> availableLanguages = Functions.availableLanguages(getServletContext()).map(Arrays::asList);
universe@13 376 Optional<Locale> reqLocale = Optional.of(req.getLocale());
universe@13 377 Locale sessionLocale = reqLocale.filter((rl) -> availableLanguages.map((al) -> al.contains(rl.getLanguage())).orElse(false)).orElse(Locale.ENGLISH);
universe@13 378 session.setAttribute(Constants.SESSION_ATTR_LANGUAGE, sessionLocale);
universe@34 379 LOG.debug("Setting language for new session {}: {}", session.getId(), sessionLocale.getDisplayLanguage());
universe@14 380 } else {
universe@15 381 Locale sessionLocale = (Locale) session.getAttribute(Constants.SESSION_ATTR_LANGUAGE);
universe@15 382 resp.setLocale(sessionLocale);
universe@15 383 LOG.trace("Continuing session {} with language {}", session.getId(), sessionLocale);
universe@13 384 }
universe@34 385
universe@21 386 // set some internal request attributes
universe@53 387 final String fullPath = Functions.fullPath(req);
universe@47 388 req.setAttribute(Constants.REQ_ATTR_BASE_HREF, Functions.baseHref(req));
universe@53 389 req.setAttribute(Constants.REQ_ATTR_PATH, fullPath);
universe@36 390 Optional.ofNullable(moduleInfo).ifPresent((proxy) -> req.setAttribute(Constants.REQ_ATTR_MODULE_INFO, proxy));
universe@34 391
universe@53 392 // if this is an error path, bypass the normal flow
universe@53 393 if (fullPath.startsWith("/error/")) {
universe@53 394 final var mapping = findMapping(method, req);
universe@53 395 if (mapping.isPresent()) {
universe@53 396 forwardAsSpecified(invokeMapping(mapping.get(), req, resp, null), req, resp);
universe@53 397 }
universe@53 398 return;
universe@53 399 }
universe@53 400
universe@38 401 // obtain a connection and create the data access objects
universe@38 402 final var db = (DatabaseFacade) req.getServletContext().getAttribute(DatabaseFacade.SC_ATTR_NAME);
universe@53 403 final var ds = db.getDataSource();
universe@53 404 if (ds == null) {
universe@53 405 resp.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE, "JNDI DataSource lookup failed. See log for details.");
universe@53 406 return;
universe@53 407 }
universe@53 408 try (final var connection = ds.getConnection()) {
universe@38 409 final var dao = createDataAccessObjects(connection);
universe@39 410 try {
universe@39 411 connection.setAutoCommit(false);
universe@39 412 // call the handler, if available, or send an HTTP 404 error
universe@39 413 final var mapping = findMapping(method, req);
universe@39 414 if (mapping.isPresent()) {
universe@39 415 forwardAsSpecified(invokeMapping(mapping.get(), req, resp, dao), req, resp);
universe@39 416 } else {
universe@39 417 resp.sendError(HttpServletResponse.SC_NOT_FOUND);
universe@39 418 }
universe@39 419 connection.commit();
universe@39 420 } catch (SQLException ex) {
universe@39 421 LOG.warn("Database transaction failed (Code {}): {}", ex.getErrorCode(), ex.getMessage());
universe@39 422 LOG.debug("Details: ", ex);
universe@54 423 resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Unhandled Transaction Error - Code: " + ex.getErrorCode());
universe@39 424 connection.rollback();
universe@38 425 }
universe@38 426 } catch (SQLException ex) {
universe@39 427 LOG.error("Severe Database Exception (Code {}): {}", ex.getErrorCode(), ex.getMessage());
universe@38 428 LOG.debug("Details: ", ex);
universe@54 429 resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Database Error - Code: " + ex.getErrorCode());
universe@12 430 }
universe@12 431 }
universe@34 432
universe@7 433 @Override
universe@7 434 protected final void doGet(HttpServletRequest req, HttpServletResponse resp)
universe@7 435 throws ServletException, IOException {
universe@12 436 doProcess(HttpMethod.GET, req, resp);
universe@7 437 }
universe@7 438
universe@7 439 @Override
universe@7 440 protected final void doPost(HttpServletRequest req, HttpServletResponse resp)
universe@7 441 throws ServletException, IOException {
universe@12 442 doProcess(HttpMethod.POST, req, resp);
universe@7 443 }
universe@7 444 }

mercurial