From 21cb9a7a75df68c324dfb73e2b93306e47c438ff Mon Sep 17 00:00:00 2001 From: James Daugherty Date: Tue, 5 May 2026 10:16:34 -0400 Subject: [PATCH] Add jetty test app --- grails-test-examples/jetty/build.gradle | 64 +++++++++++++++++++ .../assets/javascripts/application.js | 16 +++++ .../assets/stylesheets/application.css | 18 ++++++ .../jetty/grails-app/conf/application.yml | 60 +++++++++++++++++ .../jetty/grails-app/conf/logback-spring.xml | 42 ++++++++++++ .../grails-app/conf/spring/resources.groovy | 22 +++++++ .../issue12688/SessionController.groovy | 38 +++++++++++ .../controllers/issue12688/UrlMappings.groovy | 33 ++++++++++ .../init/issue12688/Application.groovy | 31 +++++++++ .../init/issue12688/BootStrap.groovy | 29 +++++++++ .../jetty/grails-app/views/error.gsp | 29 +++++++++ .../jetty/grails-app/views/index.gsp | 28 ++++++++ .../jetty/grails-app/views/notFound.gsp | 28 ++++++++ .../jetty/grails-app/views/session/index.gsp | 30 +++++++++ .../jetty/grails-app/views/session/show.gsp | 27 ++++++++ .../groovy/issue12688/JettySessionSpec.groovy | 51 +++++++++++++++ .../issue12688/pages/SessionFormPage.groovy | 32 ++++++++++ .../issue12688/pages/SessionShowPage.groovy | 31 +++++++++ settings.gradle | 4 +- 19 files changed, 612 insertions(+), 1 deletion(-) create mode 100644 grails-test-examples/jetty/build.gradle create mode 100644 grails-test-examples/jetty/grails-app/assets/javascripts/application.js create mode 100644 grails-test-examples/jetty/grails-app/assets/stylesheets/application.css create mode 100644 grails-test-examples/jetty/grails-app/conf/application.yml create mode 100644 grails-test-examples/jetty/grails-app/conf/logback-spring.xml create mode 100644 grails-test-examples/jetty/grails-app/conf/spring/resources.groovy create mode 100644 grails-test-examples/jetty/grails-app/controllers/issue12688/SessionController.groovy create mode 100644 grails-test-examples/jetty/grails-app/controllers/issue12688/UrlMappings.groovy create mode 100644 grails-test-examples/jetty/grails-app/init/issue12688/Application.groovy create mode 100644 grails-test-examples/jetty/grails-app/init/issue12688/BootStrap.groovy create mode 100644 grails-test-examples/jetty/grails-app/views/error.gsp create mode 100644 grails-test-examples/jetty/grails-app/views/index.gsp create mode 100644 grails-test-examples/jetty/grails-app/views/notFound.gsp create mode 100644 grails-test-examples/jetty/grails-app/views/session/index.gsp create mode 100644 grails-test-examples/jetty/grails-app/views/session/show.gsp create mode 100644 grails-test-examples/jetty/src/integration-test/groovy/issue12688/JettySessionSpec.groovy create mode 100644 grails-test-examples/jetty/src/integration-test/groovy/issue12688/pages/SessionFormPage.groovy create mode 100644 grails-test-examples/jetty/src/integration-test/groovy/issue12688/pages/SessionShowPage.groovy diff --git a/grails-test-examples/jetty/build.gradle b/grails-test-examples/jetty/build.gradle new file mode 100644 index 00000000000..036352bf585 --- /dev/null +++ b/grails-test-examples/jetty/build.gradle @@ -0,0 +1,64 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +plugins { + id 'org.apache.grails.buildsrc.properties' + id 'org.apache.grails.buildsrc.dependency-validator' + id 'org.apache.grails.buildsrc.compile' +} + +version = '0.1' +group = 'issue12688' + +apply plugin: 'org.apache.grails.gradle.grails-web' +apply plugin: 'org.apache.grails.gradle.grails-gsp' +apply plugin: 'cloud.wondrify.asset-pipeline' + +dependencies { + implementation platform(project(':grails-bom')) + + implementation 'org.springframework.boot:spring-boot-starter-logging' + implementation 'org.springframework.boot:spring-boot-autoconfigure' + implementation 'org.apache.grails:grails-core' + implementation 'org.springframework.boot:spring-boot-starter-actuator' + implementation 'org.springframework.boot:spring-boot-starter-jetty' + implementation 'org.apache.grails:grails-web-boot' + implementation 'org.apache.grails:grails-layout' + implementation 'org.apache.grails:grails-logging' + implementation 'org.apache.grails:grails-rest-transforms' + implementation 'org.apache.grails:grails-databinding' + implementation 'org.apache.grails:grails-services' + implementation 'org.apache.grails:grails-url-mappings' + implementation 'org.apache.grails:grails-interceptors' + implementation 'org.apache.grails:grails-gsp' + + testAndDevelopmentOnly platform(project(':grails-bom')) + testAndDevelopmentOnly 'org.webjars.npm:bootstrap' + testAndDevelopmentOnly 'org.webjars.npm:jquery' + + runtimeOnly 'cloud.wondrify:asset-pipeline-grails' + runtimeOnly 'org.fusesource.jansi:jansi' + + integrationTestImplementation testFixtures('org.apache.grails:grails-geb') +} + +apply { + from rootProject.layout.projectDirectory.file('gradle/functional-test-config.gradle') + from rootProject.layout.projectDirectory.file('gradle/test-webjar-asset-config.gradle') + from rootProject.layout.projectDirectory.file('gradle/grails-extension-gradle-config.gradle') +} diff --git a/grails-test-examples/jetty/grails-app/assets/javascripts/application.js b/grails-test-examples/jetty/grails-app/assets/javascripts/application.js new file mode 100644 index 00000000000..7914e5e77f2 --- /dev/null +++ b/grails-test-examples/jetty/grails-app/assets/javascripts/application.js @@ -0,0 +1,16 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//= require_self diff --git a/grails-test-examples/jetty/grails-app/assets/stylesheets/application.css b/grails-test-examples/jetty/grails-app/assets/stylesheets/application.css new file mode 100644 index 00000000000..ad24325fbb9 --- /dev/null +++ b/grails-test-examples/jetty/grails-app/assets/stylesheets/application.css @@ -0,0 +1,18 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + *= require_self + */ diff --git a/grails-test-examples/jetty/grails-app/conf/application.yml b/grails-test-examples/jetty/grails-app/conf/application.yml new file mode 100644 index 00000000000..45c13725fda --- /dev/null +++ b/grails-test-examples/jetty/grails-app/conf/application.yml @@ -0,0 +1,60 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- +grails: + profile: web + codegen: + defaultPackage: issue12688 +info: + app: + name: '@info.app.name@' + version: '@info.app.version@' + grailsVersion: '@info.app.grailsVersion@' +--- +grails: + mime: + types: + all: '*/*' + atom: application/atom+xml + css: text/css + csv: text/csv + form: application/x-www-form-urlencoded + html: + - text/html + - application/xhtml+xml + js: text/javascript + json: + - application/json + - text/json + multipartForm: multipart/form-data + pdf: application/pdf + rss: application/rss+xml + text: text/plain + hal: + - application/hal+json + - application/hal+xml + xml: + - text/xml + - application/xml + views: + gsp: + encoding: UTF-8 + htmlcodec: xml + codecs: + expression: html + scriptlet: html + taglib: none + staticparts: none diff --git a/grails-test-examples/jetty/grails-app/conf/logback-spring.xml b/grails-test-examples/jetty/grails-app/conf/logback-spring.xml new file mode 100644 index 00000000000..489999587fb --- /dev/null +++ b/grails-test-examples/jetty/grails-app/conf/logback-spring.xml @@ -0,0 +1,42 @@ + + + + + + + true + + ${CONSOLE_LOG_THRESHOLD} + + + ${CONSOLE_LOG_PATTERN} + ${CONSOLE_LOG_CHARSET} + + + + + + + + + + diff --git a/grails-test-examples/jetty/grails-app/conf/spring/resources.groovy b/grails-test-examples/jetty/grails-app/conf/spring/resources.groovy new file mode 100644 index 00000000000..f2d41482dbf --- /dev/null +++ b/grails-test-examples/jetty/grails-app/conf/spring/resources.groovy @@ -0,0 +1,22 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +// Place your Spring DSL code here +beans = { +} diff --git a/grails-test-examples/jetty/grails-app/controllers/issue12688/SessionController.groovy b/grails-test-examples/jetty/grails-app/controllers/issue12688/SessionController.groovy new file mode 100644 index 00000000000..21ea31cae02 --- /dev/null +++ b/grails-test-examples/jetty/grails-app/controllers/issue12688/SessionController.groovy @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package issue12688 + +class SessionController { + + static allowedMethods = [store: 'POST'] + + def index() {} + + def store() { + // Store only a plain String extracted from params, not the GrailsParameterMap itself. + // This exercises request param processing on Jetty without causing NotSerializableException. + session.message = params.message?.toString() + redirect action: 'show' + } + + def show() { + [message: session.message] + } +} diff --git a/grails-test-examples/jetty/grails-app/controllers/issue12688/UrlMappings.groovy b/grails-test-examples/jetty/grails-app/controllers/issue12688/UrlMappings.groovy new file mode 100644 index 00000000000..2ca0a5a8841 --- /dev/null +++ b/grails-test-examples/jetty/grails-app/controllers/issue12688/UrlMappings.groovy @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package issue12688 + +class UrlMappings { + static mappings = { + "/$controller/$action?/$id?(.$format)?" { + constraints { + } + } + + "/"(view: "/index") + "500"(view: '/error') + "404"(view: '/notFound') + } +} diff --git a/grails-test-examples/jetty/grails-app/init/issue12688/Application.groovy b/grails-test-examples/jetty/grails-app/init/issue12688/Application.groovy new file mode 100644 index 00000000000..af19eed8a9d --- /dev/null +++ b/grails-test-examples/jetty/grails-app/init/issue12688/Application.groovy @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package issue12688 + +import grails.boot.GrailsApp +import grails.boot.config.GrailsAutoConfiguration +import groovy.transform.CompileStatic + +@CompileStatic +class Application extends GrailsAutoConfiguration { + static void main(String[] args) { + GrailsApp.run(Application, args) + } +} diff --git a/grails-test-examples/jetty/grails-app/init/issue12688/BootStrap.groovy b/grails-test-examples/jetty/grails-app/init/issue12688/BootStrap.groovy new file mode 100644 index 00000000000..cd08f7685fb --- /dev/null +++ b/grails-test-examples/jetty/grails-app/init/issue12688/BootStrap.groovy @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package issue12688 + +class BootStrap { + + def init = { + } + + def destroy = { + } +} diff --git a/grails-test-examples/jetty/grails-app/views/error.gsp b/grails-test-examples/jetty/grails-app/views/error.gsp new file mode 100644 index 00000000000..53b6e733d47 --- /dev/null +++ b/grails-test-examples/jetty/grails-app/views/error.gsp @@ -0,0 +1,29 @@ +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ https://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page contentType="text/html;charset=UTF-8" %> + +Error + + + + diff --git a/grails-test-examples/jetty/grails-app/views/index.gsp b/grails-test-examples/jetty/grails-app/views/index.gsp new file mode 100644 index 00000000000..24cc0923d2a --- /dev/null +++ b/grails-test-examples/jetty/grails-app/views/index.gsp @@ -0,0 +1,28 @@ +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ https://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page contentType="text/html;charset=UTF-8" %> + + + Issue 12688 - Jetty Session Test + + +

Issue 12688 - Jetty Session Test

+

Go to Session Test

+ + diff --git a/grails-test-examples/jetty/grails-app/views/notFound.gsp b/grails-test-examples/jetty/grails-app/views/notFound.gsp new file mode 100644 index 00000000000..047d8d7fdc5 --- /dev/null +++ b/grails-test-examples/jetty/grails-app/views/notFound.gsp @@ -0,0 +1,28 @@ +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ https://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page contentType="text/html;charset=UTF-8" %> + +Page Not Found + + + + diff --git a/grails-test-examples/jetty/grails-app/views/session/index.gsp b/grails-test-examples/jetty/grails-app/views/session/index.gsp new file mode 100644 index 00000000000..39f029d3bb5 --- /dev/null +++ b/grails-test-examples/jetty/grails-app/views/session/index.gsp @@ -0,0 +1,30 @@ +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ https://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page contentType="text/html;charset=UTF-8" %> + + + Session Test + + + + + + + + diff --git a/grails-test-examples/jetty/grails-app/views/session/show.gsp b/grails-test-examples/jetty/grails-app/views/session/show.gsp new file mode 100644 index 00000000000..75c26e44cdb --- /dev/null +++ b/grails-test-examples/jetty/grails-app/views/session/show.gsp @@ -0,0 +1,27 @@ +<%-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ https://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --%> +<%@ page contentType="text/html;charset=UTF-8" %> + + + Session Value + + +

${message}

+ + diff --git a/grails-test-examples/jetty/src/integration-test/groovy/issue12688/JettySessionSpec.groovy b/grails-test-examples/jetty/src/integration-test/groovy/issue12688/JettySessionSpec.groovy new file mode 100644 index 00000000000..afb614c12fb --- /dev/null +++ b/grails-test-examples/jetty/src/integration-test/groovy/issue12688/JettySessionSpec.groovy @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package issue12688 + +import issue12688.pages.SessionFormPage +import issue12688.pages.SessionShowPage + +import grails.plugin.geb.ContainerGebSpec +import grails.testing.mixin.integration.Integration + +/** + * Regression test for https://github.com/apache/grails-core/issues/12688. + * + * Verifies that a Grails application running on Jetty (instead of Tomcat) can process + * request parameters and store values in the HTTP session without serialization errors. + * Jetty's session management checks serializability of session attributes, so this test + * confirms there are no NotSerializableException warnings from GrailsParameterMap. + */ +@Integration +class JettySessionSpec extends ContainerGebSpec { + + void 'request params can be processed and stored in session on a Jetty-backed Grails app'() { + given: 'a user visits the session form' + to(SessionFormPage) + + when: 'they submit a message value' + messageInput.value('hello jetty') + submitButton.click() + + then: 'the value is stored in session and displayed after the redirect' + at(SessionShowPage) + messageParagraph.text() == 'hello jetty' + } +} diff --git a/grails-test-examples/jetty/src/integration-test/groovy/issue12688/pages/SessionFormPage.groovy b/grails-test-examples/jetty/src/integration-test/groovy/issue12688/pages/SessionFormPage.groovy new file mode 100644 index 00000000000..23a5c4a5c6c --- /dev/null +++ b/grails-test-examples/jetty/src/integration-test/groovy/issue12688/pages/SessionFormPage.groovy @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package issue12688.pages + +import geb.Page + +class SessionFormPage extends Page { + + static url = '/session' + static at = { title == 'Session Test' } + static content = { + messageInput { $('input#message') } + submitButton { $('input#submit') } + } +} diff --git a/grails-test-examples/jetty/src/integration-test/groovy/issue12688/pages/SessionShowPage.groovy b/grails-test-examples/jetty/src/integration-test/groovy/issue12688/pages/SessionShowPage.groovy new file mode 100644 index 00000000000..5c0f577cba5 --- /dev/null +++ b/grails-test-examples/jetty/src/integration-test/groovy/issue12688/pages/SessionShowPage.groovy @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package issue12688.pages + +import geb.Page + +class SessionShowPage extends Page { + + static url = '/session/show' + static at = { title == 'Session Value' } + static content = { + messageParagraph { $('p#message') } + } +} diff --git a/settings.gradle b/settings.gradle index df1adbe0a0c..9e438a0d935 100644 --- a/settings.gradle +++ b/settings.gradle @@ -409,7 +409,8 @@ include( 'grails-test-examples-scaffolding', 'grails-test-examples-scaffolding-fields', 'grails-test-examples-views-functional-tests', - 'grails-test-examples-views-functional-tests-plugin' + 'grails-test-examples-views-functional-tests-plugin', + 'grails-test-examples-jetty' ) project(':grails-test-examples-async-events-pubsub-demo').projectDir = file('grails-test-examples/async-events-pubsub-demo') project(':grails-test-examples-app1').projectDir = file('grails-test-examples/app1') @@ -448,6 +449,7 @@ project(':grails-test-examples-scaffolding').projectDir = file('grails-test-exam project(':grails-test-examples-scaffolding-fields').projectDir = file('grails-test-examples/scaffolding-fields') project(':grails-test-examples-views-functional-tests').projectDir = file('grails-test-examples/views-functional-tests') project(':grails-test-examples-views-functional-tests-plugin').projectDir = file('grails-test-examples/views-functional-tests-plugin') +project(':grails-test-examples-jetty').projectDir = file('grails-test-examples/jetty') includeBuild('./grails-gradle') { name = 'grails-gradle'