birdy1980
05/06/2022, 11:13 AM/api/*
On Commandbox 5.5.1 I suddenly get a 404 not found
.
I'll try to create a demo project to have a simple way of reproducing the problembirdy1980
05/06/2022, 12:23 PMbdw429s
05/06/2022, 2:37 PMbdw429s
05/06/2022, 2:38 PMbdw429s
05/06/2022, 2:38 PMbdw429s
05/06/2022, 2:39 PM--trace
start and inspecting the console output to see if the rest servlet mappings were added to the server!bdw429s
05/06/2022, 3:19 PMbdw429s
05/06/2022, 3:19 PMbdw429s
05/06/2022, 3:20 PM--servlet-rest-mappings /api/*
and this log here is correct
[DEBUG] Runwar: Overriding web.xml rest mappings with [/api/*]
bdw429s
05/06/2022, 3:20 PM[TRACE] Runwar: servlet-name: CFRestServlet, servlet-class: coldfusion.bootstrap.BootstrapServlet
[TRACE] Runwar: Adding servlet: ***** CFRestServlet: coldfusion.bootstrap.BootstrapServlet *****
bdw429s
05/06/2022, 3:21 PM[TRACE] Runwar: Skipping mapping servlet-name: CFRestServlet, url-partern: /rest/*
[TRACE] Runwar: Skipping mapping servlet-name: CFRestServlet, url-partern: /restapps/*
bdw429s
05/06/2022, 3:23 PMLOG.debug("Added rest mapping: " + path + " to " + restServlet.getName());
bdw429s
05/06/2022, 3:23 PMbdw429s
05/06/2022, 3:24 PMweb.xml
servlets were added, so there is no rest mapping in existence yetbdw429s
05/06/2022, 3:24 PMbdw429s
05/06/2022, 3:24 PMbdw429s
05/06/2022, 3:25 PMbdw429s
05/06/2022, 3:42 PMbdw429s
05/06/2022, 3:44 PMweb-override.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "<http://java.sun.com/dtd/web-app_2_3.dtd>">
<web-app id="adobe_coldfusion">
<servlet-mapping id="coldfusion_mapping_rest">
<servlet-name>CFRestServlet</servlet-name>
<url-pattern>/api/*</url-pattern>
</servlet-mapping>
</web-app>
and changed the server.json
like so
"app":{
"cfengine":"adobe@2018",
"restMappings":",",
"webXMLOverride":"web-override.xml"
},
bdw429s
05/06/2022, 3:46 PMbdw429s
05/06/2022, 4:27 PMbirdy1980
05/06/2022, 7:51 PMbirdy1980
05/09/2022, 7:06 AMbdw429s
05/09/2022, 3:08 PM