jglapa commented on issue #13988:
URL: https://github.com/apache/grails-core/issues/13988#issuecomment-3028546360

   Hi, I encountered a similar thing, when trying to migrate from grails 6 to 
grails 7
   
   ```
   java.lang.IllegalStateException: Cannot set request attribute - request is 
not active anymore!
        at 
org.springframework.web.context.request.ServletRequestAttributes.setAttribute(ServletRequestAttributes.java:177)
        at 
org.grails.web.taglib.encoder.WebOutputContextLookup$WebOutputContext.setBinding(WebOutputContextLookup.java:114)
        at 
org.grails.gsp.GroovyPageWritable.doWriteTo(GroovyPageWritable.java:151)
        at org.grails.gsp.GroovyPageWritable.writeTo(GroovyPageWritable.java:82)
        at 
org.grails.web.servlet.view.GroovyPageView.renderTemplate(GroovyPageView.java:76)
        at 
org.grails.web.servlet.view.AbstractGrailsView.renderWithinGrailsWebRequest(AbstractGrailsView.java:72)
   ```
   
   
   having a layout defined:
   ``` 
   <html xmlns="http://www.w3.org/1999/html";>
   <head>
       <title>Administration</title>
       <meta name="layout" content="main" />
   </head>
   
   <body >
   <h1>THIS IS ADMIN</h1>
   <div id="admin-page">
       <g:layoutBody/>
   </div>
   </body>
   </html>
   ```
   and then using it in some gsp file with `g:applyLayout` :
   ```
   <g:applyLayout name="admin">
       <h2>something in admin</h2>
   </g:applyLayout>
   
   ```
   
   leads to the exception **request is not active anymore**
   


-- 
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: notifications-unsubscr...@grails.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to