dauer commented on code in PR #15304:
URL: https://github.com/apache/grails-core/pull/15304#discussion_r2691766930
##########
grails-doc/src/en/ref/Tag Libraries/session.adoc:
##########
@@ -35,14 +35,23 @@ The link:{servletApiRefFromRef}session.html[session] object
is an instance of th
----
class ExampleTagLib {
- def logout = {
- log.info "User agent: " + request.getHeader("User-Agent")
- session.invalidate()
+ // List all attributes and their values for the current session
+ def listSessionAttributes = { Map params ->
+ out << params.get("name") << ' : ' <<
session.getAttribute(params.get("name"))
}
}
----
+[source,xml]
+----
+<ul>
+ <g:each var="elm" in="${session.getAttributeNames()}">
+ <li><g:listSessionAttributes name="${elm}" /></li>
+ </g:each>
+</ul>
+----
+
Review Comment:
Updated
--
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]