|
123 | 123 | `(let [handler# ~(generate-resolve handler-sym)] |
124 | 124 | (fn [request#] |
125 | 125 | (let [context# (.getContextPath |
126 | | - ^javax.servlet.http.HttpServletRequest |
| 126 | + ^jakarta.servlet.http.HttpServletRequest |
127 | 127 | (:servlet-request request#))] |
128 | 128 | (handler# |
129 | 129 | (assoc request# |
|
135 | 135 | (let [servlet-ns (symbol (servlet-ns project))] |
136 | 136 | (compile-form project servlet-ns |
137 | 137 | `(do (ns ~servlet-ns |
138 | | - (:gen-class :extends javax.servlet.http.HttpServlet)) |
| 138 | + (:gen-class :extends jakarta.servlet.http.HttpServlet)) |
139 | 139 | (def ~'service-method) |
140 | 140 | (defn ~'-service [servlet# request# response#] |
141 | 141 | (~'service-method servlet# request# response#))) |
|
151 | 151 | (assert-vars-exist project init-sym destroy-sym handler-sym) |
152 | 152 | (compile-form project project-ns |
153 | 153 | `(do (ns ~project-ns |
154 | | - (:gen-class :implements [javax.servlet.ServletContextListener])) |
| 154 | + (:gen-class :implements [jakarta.servlet.ServletContextListener])) |
155 | 155 | ~(let [servlet-context-event (gensym)] |
156 | 156 | `(do |
157 | 157 | (defn ~'-contextInitialized [this# ~servlet-context-event] |
158 | 158 | ~(if init-sym |
159 | 159 | `(~(generate-resolve init-sym))) |
160 | 160 | (let [handler# ~(generate-handler project handler-sym) |
161 | 161 | make-service-method# ~(generate-resolve |
162 | | - 'ring.util.servlet/make-service-method) |
| 162 | + 'ring.util.jakarta.servlet/make-service-method) |
163 | 163 | method# (make-service-method# handler# ~@(when async? [{:async? true}]))] |
164 | 164 | (alter-var-root |
165 | 165 | ~(generate-resolve (symbol servlet-ns "service-method")) |
|
233 | 233 |
|
234 | 234 | (defn add-servlet-dep [project] |
235 | 235 | (-> project |
236 | | - (deps/add-if-missing ['ring/ring-servlet ring-version]) |
237 | | - (deps/add-if-missing '[javax.servlet/javax.servlet-api "3.1.0"]))) |
| 236 | + (deps/add-if-missing ['org.ring-clojure/ring-jakarta-servlet ring-version]) |
| 237 | + (deps/add-if-missing '[jakarta.servlet/jakarta.servlet-api "6.1.0"]))) |
238 | 238 |
|
239 | 239 | (defn war |
240 | 240 | "Create a $PROJECT-$VERSION.war file." |
|
0 commit comments