From 9b7a19c8e4c2c4446b6b41c4b2b5b002f9139cc9 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Fri, 8 Sep 2023 19:08:00 -0500 Subject: [PATCH] Update OCSPOCSPServlet to use @WebServlet --- base/ocsp/shared/webapps/ocsp/WEB-INF/web.xml | 25 ------------------- .../cms/servlet/ocsp/OCSPOCSPServlet.java | 17 +++++++++++++ 2 files changed, 17 insertions(+), 25 deletions(-) diff --git a/base/ocsp/shared/webapps/ocsp/WEB-INF/web.xml b/base/ocsp/shared/webapps/ocsp/WEB-INF/web.xml index 5d3234c148e..9a6c27a47f3 100644 --- a/base/ocsp/shared/webapps/ocsp/WEB-INF/web.xml +++ b/base/ocsp/shared/webapps/ocsp/WEB-INF/web.xml @@ -102,21 +102,6 @@ /services.template - - ocspOCSP - com.netscape.cms.servlet.ocsp.OCSPOCSPServlet - GetClientCert - false - AuthzMgr - BasicAclAuthz - authority - ocsp - ID - ocspOCSP - resourceID - certServer.ee.request.ocsp - - ocspDownloadPKCS12 com.netscape.cms.servlet.csadmin.DownloadPKCS12 @@ -253,16 +238,6 @@ /agent/header - - ocspOCSP - /ee/ocsp - - - - ocspOCSP - /ee/ocsp/* - - services /services diff --git a/base/ocsp/src/main/java/com/netscape/cms/servlet/ocsp/OCSPOCSPServlet.java b/base/ocsp/src/main/java/com/netscape/cms/servlet/ocsp/OCSPOCSPServlet.java index c79707c290d..edb12fc01d3 100644 --- a/base/ocsp/src/main/java/com/netscape/cms/servlet/ocsp/OCSPOCSPServlet.java +++ b/base/ocsp/src/main/java/com/netscape/cms/servlet/ocsp/OCSPOCSPServlet.java @@ -17,6 +17,23 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.cms.servlet.ocsp; +import javax.servlet.annotation.WebInitParam; +import javax.servlet.annotation.WebServlet; + +@WebServlet( + name = "ocspOCSP", + urlPatterns = { + "/ee/ocsp", + "/ee/ocsp/*" + }, + initParams = { + @WebInitParam(name="GetClientCert", value="false"), + @WebInitParam(name="AuthzMgr", value="BasicAclAuthz"), + @WebInitParam(name="authority", value="ocsp"), + @WebInitParam(name="ID", value="ocspOCSP"), + @WebInitParam(name="resourceID", value="certServer.ee.request.ocsp") + } +) public class OCSPOCSPServlet extends OCSPServlet { private static final long serialVersionUID = 1L; }