HTTP 404 or 405 when accessing protected application root path context resource without a trailing slash
Issue
- Getting HTTP 404 Not Found error:
...
"request": {
"method": "POST",
"url": "https://localhost:8443/j_security_check",
"httpVersion": "HTTP/1.1",
...
...
},
"response": {
"status": 404,
"statusText": "",
"httpVersion": "HTTP/1.1",
...
"headers": [
...
],
"content": {
"size": 74,
"compression": -84,
"mimeType": "text/html",
"text": "<html><head><title>Error</title></head><body>404 - Not Found</body></html>"
},
...
...
- We recently updated EAP 7 and now we see issues with FORM authentication. No redirect occurs to add a trailing slash. When the FORM login is then submitted, the
j_security_check
request is made without the application context and fails:
localhost.localdomain - - [25/Mar/2020:15:51:42 -0400] "POST /j_security_check;jsessionid=2rinyfprMaTeJG4yNWSNptFHZvr73Vd1paGSWcOt HTTP/1.1" 405 104 "http://localhost:8080/SimpleWar" "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0" -
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7.2.4 - 7.2.7
- 7.3.0
- Access a secured application root context path without a trailing slash (e.g. "https://localhost:8443/context")
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.