Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

GSP(GroovyServer Pages) is similar to JSP(JavaServer Pages).

GSP Module Project has started originally by Troy Heninger.

Troy's GroovyPages project page is http://www.investortech.com/emp/troy/groovypages.htm

The original sources of GSP module 1.1 can be found at Groovy CVS: http://cvs.groovy.codehaus.org/viewrep/groovy/modules/pages/src/main/groovy/modules/pages

(code:gsp)
<%
if (session.counter == null)
session.counter = 1
else
session.counter++

session.setAttribute("id", "tmpID")
session.setAttribute("uid", "userID")

request.x = 123
application.x = 500

if (application.counter == null)
application.counter = 1
else
application.counter++

%>

application.counter = [$

Unknown macro: {application.counter}

] <br>
session.counter = [$

Unknown macro: {session.counter}

] <br>
session.id = [$

Unknown macro: {session.id}

] <br>
session.uid = [$

Unknown macro: {session.uid}

] <br>
session.getAttribute('id') = [$

Unknown macro: {session.getAttribute('id')}

] <br>
request.x = [$

Unknown macro: {request.x}

] <br>
(application.x == null ?) = [$

Unknown macro: {application.x == null}

] <br>
application.x = [$

Unknown macro: {application.x}

] <br>
(code)

  • No labels