sbglasius opened a new issue, #16378:
URL: https://github.com/apache/grails-core/issues/16378

   ## Description
   
   The `error.gsp` templates generated by Grails Forge and the `web` 
application profile still
   reference the pre-Jakarta EE servlet request attribute name 
`javax.servlet.error.exception`.
   Since Grails 8 targets Jakarta EE 10 (Servlet 6.x), the container sets this 
attribute under the
   key `jakarta.servlet.error.exception` (verified against
   `jakarta.servlet.RequestDispatcher.ERROR_EXCEPTION`, which resolves to
   `"jakarta.servlet.error.exception"` in `jakarta.servlet-api-6.1.0.jar`).
   
   Because `request.getAttribute('javax.servlet.error.exception')` never 
matches, the
   `<g:elseif>` branch that renders exception details on the generated error 
page never fires
   for apps built from these templates.
   
   ## Affected files
   
   - `grails-forge/grails-forge-core/src/main/resources/gsp/error.gsp` (lines 
14-15) — used by
     Grails Forge-generated apps
   - `grails-profiles/web/skeleton/grails-app/views/error.gsp` (lines 14-15) — 
used by
     `grails create-app` (web profile)
   
   A handful of stale example apps under `grails-test-examples/` (`mail`, 
`geb`, `geb-gebconfig`,
   `scaffolding`, `hibernate5/issue450`, `hibernate7/issue450`) have the same 
stale reference but
   are not user-facing templates.
   
   ## Expected behavior
   
   Both templates should reference `jakarta.servlet.error.exception` instead of
   `javax.servlet.error.exception`, matching the already-corrected templates 
elsewhere in the
   repo (e.g. `grails-test-examples/gsp-sitemesh3/grails-app/views/error.gsp`).
   
   ## Steps to reproduce
   
   1. Generate a new app via Grails Forge or `grails create-app` (web profile)
   2. Trigger an unhandled exception in a controller
   3. Observe that the rendered error page never shows exception details, 
because the
      attribute lookup key is wrong
   
   Reported via the mailing list.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to