├── ext
├── asciidoc
│ ├── .gitignore
│ └── src
│ │ └── main
│ │ └── resources
│ │ └── META-INF
│ │ └── beans.xml
├── pebble
│ ├── src
│ │ ├── test
│ │ │ ├── resources
│ │ │ │ └── pebble.properties
│ │ │ └── java
│ │ │ │ └── org
│ │ │ │ └── mvcspec
│ │ │ │ └── ozark
│ │ │ │ └── ext
│ │ │ │ └── pebble
│ │ │ │ ├── CustomEscapingStrategy.java
│ │ │ │ └── PebbleViewEngineTest.java
│ │ └── main
│ │ │ └── resources
│ │ │ └── META-INF
│ │ │ └── beans.xml
│ └── README.md
├── groovy
│ └── src
│ │ └── main
│ │ ├── resources
│ │ └── META-INF
│ │ │ └── beans.xml
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── ext
│ │ └── groovy
│ │ └── MarkupTemplateEngineProducer.java
├── jade
│ ├── src
│ │ └── main
│ │ │ └── resources
│ │ │ └── META-INF
│ │ │ └── beans.xml
│ └── README.md
├── jtwig
│ └── src
│ │ └── main
│ │ └── resources
│ │ └── META-INF
│ │ └── beans.xml
├── freemarker
│ └── src
│ │ └── main
│ │ └── resources
│ │ └── META-INF
│ │ └── beans.xml
├── handlebars
│ └── src
│ │ └── main
│ │ ├── resources
│ │ └── META-INF
│ │ │ └── beans.xml
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── ext
│ │ └── handlebars
│ │ └── DefaultHandlebarsProducer.java
├── jetbrick
│ └── src
│ │ └── main
│ │ └── resources
│ │ └── META-INF
│ │ └── beans.xml
├── mustache
│ └── src
│ │ └── main
│ │ └── resources
│ │ └── META-INF
│ │ └── beans.xml
├── thymeleaf
│ └── src
│ │ └── main
│ │ └── resources
│ │ └── META-INF
│ │ └── beans.xml
├── velocity
│ └── src
│ │ └── main
│ │ └── resources
│ │ └── META-INF
│ │ └── beans.xml
├── stringtemplate
│ └── src
│ │ └── main
│ │ └── resources
│ │ └── META-INF
│ │ └── beans.xml
└── jsr223
│ └── pom.xml
├── examples
├── asciidoc
│ ├── .gitignore
│ └── src
│ │ └── main
│ │ ├── webapp
│ │ ├── WEB-INF
│ │ │ ├── views
│ │ │ │ └── hello.adoc
│ │ │ └── beans.xml
│ │ └── index.html
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── test
│ │ └── asciidoc
│ │ └── MyApplication.java
├── jsr223
│ └── src
│ │ └── main
│ │ └── webapp
│ │ └── WEB-INF
│ │ ├── views
│ │ ├── index.groovy
│ │ ├── index.js
│ │ └── index.py
│ │ └── beans.xml
├── pebble
│ └── src
│ │ └── main
│ │ ├── resources
│ │ └── pebble.properties
│ │ ├── webapp
│ │ └── WEB-INF
│ │ │ ├── views
│ │ │ ├── filter.peb
│ │ │ └── home.peb
│ │ │ └── beans.xml
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── test
│ │ └── pebble
│ │ ├── PebbleApplication.java
│ │ └── PebbleController.java
├── jade
│ └── src
│ │ └── main
│ │ ├── webapp
│ │ ├── WEB-INF
│ │ │ ├── views
│ │ │ │ ├── includes
│ │ │ │ │ └── footer.jade
│ │ │ │ ├── main.jade
│ │ │ │ ├── helper.jade
│ │ │ │ ├── config.jade
│ │ │ │ └── markdown.jade
│ │ │ └── beans.xml
│ │ └── index.html
│ │ ├── resources
│ │ └── jade.properties
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── test
│ │ └── jade
│ │ ├── MathHelper.java
│ │ └── DummyFilter.java
├── README.txt
├── freemarker
│ └── src
│ │ └── main
│ │ ├── webapp
│ │ ├── WEB-INF
│ │ │ ├── views
│ │ │ │ └── hello.ftl
│ │ │ └── beans.xml
│ │ └── index.html
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── test
│ │ └── freemarker
│ │ └── MyApplication.java
├── velocity
│ └── src
│ │ └── main
│ │ ├── webapp
│ │ ├── WEB-INF
│ │ │ ├── views
│ │ │ │ ├── hello.vm
│ │ │ │ └── hello2.vhtml
│ │ │ └── beans.xml
│ │ └── index.html
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── test
│ │ └── velocity
│ │ └── MyApplication.java
├── mustache
│ └── src
│ │ └── main
│ │ ├── webapp
│ │ ├── WEB-INF
│ │ │ ├── views
│ │ │ │ └── hello.mustache
│ │ │ └── beans.xml
│ │ └── index.html
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── test
│ │ └── mustache
│ │ └── MyApplication.java
├── redirectScope
│ ├── src
│ │ └── main
│ │ │ ├── webapp
│ │ │ ├── index.html
│ │ │ └── WEB-INF
│ │ │ │ ├── views
│ │ │ │ └── redirect.jsp
│ │ │ │ └── beans.xml
│ │ │ └── java
│ │ │ └── org
│ │ │ └── mvcspec
│ │ │ └── ozark
│ │ │ └── test
│ │ │ └── redirectscope
│ │ │ └── MyApplication.java
│ └── pom.xml
├── redirectScope2
│ └── src
│ │ └── main
│ │ └── webapp
│ │ ├── index.html
│ │ └── WEB-INF
│ │ ├── views
│ │ └── redirect.jsp
│ │ └── beans.xml
├── jetbrick
│ └── src
│ │ └── main
│ │ ├── webapp
│ │ ├── WEB-INF
│ │ │ ├── views
│ │ │ │ └── hello.jetx
│ │ │ └── beans.xml
│ │ └── index.html
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── test
│ │ └── jetbrick
│ │ └── MyApplication.java
├── jtwig
│ └── src
│ │ └── main
│ │ ├── webapp
│ │ ├── WEB-INF
│ │ │ ├── views
│ │ │ │ └── hello.twig.html
│ │ │ └── beans.xml
│ │ └── index.html
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── test
│ │ └── jtwig
│ │ ├── MyApplication.java
│ │ └── HelloController.java
├── stringtemplate
│ └── src
│ │ └── main
│ │ ├── webapp
│ │ ├── WEB-INF
│ │ │ ├── views
│ │ │ │ └── hello.st
│ │ │ └── beans.xml
│ │ └── index.html
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── test
│ │ └── stringtemplate
│ │ ├── MyApplication.java
│ │ └── HelloController.java
├── returns
│ └── src
│ │ └── main
│ │ ├── webapp
│ │ ├── WEB-INF
│ │ │ ├── views
│ │ │ │ ├── bye.jsp
│ │ │ │ └── hello.jsp
│ │ │ └── beans.xml
│ │ └── index.html
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── test
│ │ └── returns
│ │ └── MyApplication.java
├── view-annotation
│ └── src
│ │ └── main
│ │ ├── webapp
│ │ ├── error.html
│ │ └── WEB-INF
│ │ │ ├── views
│ │ │ ├── bye.jsp
│ │ │ └── hello.jsp
│ │ │ ├── beans.xml
│ │ │ └── web.xml
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── test
│ │ └── view
│ │ └── MyApplication.java
├── annotations
│ ├── src
│ │ └── main
│ │ │ ├── webapp
│ │ │ ├── WEB-INF
│ │ │ │ ├── views
│ │ │ │ │ ├── error.jsp
│ │ │ │ │ └── success.jsp
│ │ │ │ └── beans.xml
│ │ │ └── index.html
│ │ │ └── java
│ │ │ └── org
│ │ │ └── mvcspec
│ │ │ └── ozark
│ │ │ └── test
│ │ │ └── annotations
│ │ │ └── MyApplication.java
│ └── pom.xml
├── exceptions
│ ├── src
│ │ └── main
│ │ │ ├── webapp
│ │ │ ├── WEB-INF
│ │ │ │ ├── views
│ │ │ │ │ ├── bye.jsp
│ │ │ │ │ └── hello.jsp
│ │ │ │ └── beans.xml
│ │ │ └── index.html
│ │ │ └── java
│ │ │ └── org
│ │ │ └── mvcspec
│ │ │ └── ozark
│ │ │ └── test
│ │ │ └── exceptions
│ │ │ └── MyApplication.java
│ └── pom.xml
├── produces
│ └── src
│ │ └── main
│ │ ├── webapp
│ │ ├── WEB-INF
│ │ │ ├── views
│ │ │ │ └── hello.jsp
│ │ │ └── beans.xml
│ │ └── index.html
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── test
│ │ └── produces
│ │ └── MyApplication.java
├── redirect
│ ├── src
│ │ └── main
│ │ │ ├── webapp
│ │ │ ├── WEB-INF
│ │ │ │ ├── views
│ │ │ │ │ ├── redirect.jsp
│ │ │ │ │ └── error.jsp
│ │ │ │ └── beans.xml
│ │ │ └── index.html
│ │ │ └── java
│ │ │ └── org
│ │ │ └── mvcspec
│ │ │ └── ozark
│ │ │ └── test
│ │ │ └── redirect
│ │ │ └── MyApplication.java
│ └── pom.xml
├── csrf
│ └── src
│ │ └── main
│ │ └── webapp
│ │ ├── WEB-INF
│ │ ├── views
│ │ │ ├── ok.jsp
│ │ │ └── csrf.jsp
│ │ └── beans.xml
│ │ └── index.html
├── csrf-property
│ └── src
│ │ └── main
│ │ └── webapp
│ │ ├── WEB-INF
│ │ ├── views
│ │ │ ├── ok.jsp
│ │ │ ├── error.jsp
│ │ │ └── csrf.jsp
│ │ └── beans.xml
│ │ └── index.html
├── application-path
│ ├── src
│ │ └── main
│ │ │ ├── webapp
│ │ │ ├── WEB-INF
│ │ │ │ ├── views
│ │ │ │ │ ├── book.jsp
│ │ │ │ │ └── book.xhtml
│ │ │ │ └── beans.xml
│ │ │ └── index.html
│ │ │ └── java
│ │ │ └── org
│ │ │ └── mvcspec
│ │ │ └── ozark
│ │ │ └── test
│ │ │ └── applicationpath
│ │ │ ├── Catalog.java
│ │ │ └── MyApplication.java
│ └── pom.xml
├── locale
│ └── src
│ │ └── main
│ │ ├── webapp
│ │ ├── WEB-INF
│ │ │ ├── views
│ │ │ │ └── locale.jsp
│ │ │ └── beans.xml
│ │ ├── index.html
│ │ └── ozark.css
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── test
│ │ └── locale
│ │ ├── LocaleController.java
│ │ └── MyApplication.java
├── handlebars
│ └── src
│ │ └── main
│ │ ├── webapp
│ │ ├── WEB-INF
│ │ │ ├── views
│ │ │ │ └── person.hbs
│ │ │ └── beans.xml
│ │ └── index.html
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── test
│ │ └── handlebars
│ │ └── MyApplication.java
├── validation
│ └── src
│ │ └── main
│ │ ├── webapp
│ │ ├── WEB-INF
│ │ │ ├── views
│ │ │ │ ├── data.jsp
│ │ │ │ ├── binderror.jsp
│ │ │ │ └── error.jsp
│ │ │ └── beans.xml
│ │ ├── ozark.css
│ │ ├── index.html
│ │ └── indexprop.html
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── test
│ │ └── validation
│ │ └── FormControllerBase.java
├── book-models
│ ├── src
│ │ └── main
│ │ │ ├── webapp
│ │ │ ├── WEB-INF
│ │ │ │ ├── views
│ │ │ │ │ └── book.jsp
│ │ │ │ └── beans.xml
│ │ │ └── index.html
│ │ │ └── java
│ │ │ └── org
│ │ │ └── mvcspec
│ │ │ └── ozark
│ │ │ └── test
│ │ │ └── bookmodels
│ │ │ └── MyApplication.java
│ └── pom.xml
├── conversation
│ ├── src
│ │ └── main
│ │ │ ├── webapp
│ │ │ ├── WEB-INF
│ │ │ │ ├── views
│ │ │ │ │ ├── stop.jsp
│ │ │ │ │ ├── tellme.jsp
│ │ │ │ │ └── start.jsp
│ │ │ │ └── beans.xml
│ │ │ └── index.html
│ │ │ └── java
│ │ │ └── org
│ │ │ └── mvcspec
│ │ │ └── ozark
│ │ │ └── test
│ │ │ └── conversation
│ │ │ └── MyApplication.java
│ └── pom.xml
├── book-cdi
│ ├── src
│ │ └── main
│ │ │ ├── webapp
│ │ │ ├── WEB-INF
│ │ │ │ ├── views
│ │ │ │ │ └── book.jsp
│ │ │ │ ├── beans.xml
│ │ │ │ └── web.xml
│ │ │ └── index.html
│ │ │ └── java
│ │ │ └── org
│ │ │ └── mvcspec
│ │ │ └── ozark
│ │ │ └── test
│ │ │ └── bookcdi
│ │ │ └── MyApplication.java
│ └── pom.xml
├── def-ext
│ └── src
│ │ └── main
│ │ └── webapp
│ │ ├── WEB-INF
│ │ ├── views
│ │ │ └── extension.jsp
│ │ └── beans.xml
│ │ └── index.html
├── uri-builder
│ └── src
│ │ └── main
│ │ ├── webapp
│ │ ├── index.html
│ │ └── WEB-INF
│ │ │ └── beans.xml
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── test
│ │ └── uribuilder
│ │ ├── UriBuilderController.java
│ │ └── UriBuilderApplication.java
├── events
│ └── src
│ │ └── main
│ │ ├── webapp
│ │ ├── index.html
│ │ └── WEB-INF
│ │ │ ├── beans.xml
│ │ │ └── views
│ │ │ └── event.jsp
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── test
│ │ └── events
│ │ ├── EventController.java
│ │ └── MyApplication.java
├── groovy
│ └── src
│ │ └── main
│ │ ├── webapp
│ │ ├── index.html
│ │ └── WEB-INF
│ │ │ ├── views
│ │ │ └── hello.tpl
│ │ │ └── beans.xml
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── test
│ │ └── groovy
│ │ ├── MyApplication.java
│ │ └── HelloController.java
├── validation-i18n
│ └── src
│ │ └── main
│ │ ├── webapp
│ │ ├── ozark.css
│ │ ├── index.html
│ │ └── WEB-INF
│ │ │ ├── beans.xml
│ │ │ └── views
│ │ │ └── form.jsp
│ │ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ └── test
│ │ └── validation
│ │ ├── FormBean.java
│ │ └── MyApplication.java
├── facelets
│ ├── src
│ │ └── main
│ │ │ ├── webapp
│ │ │ ├── book.xhtml
│ │ │ ├── index.html
│ │ │ └── WEB-INF
│ │ │ │ └── beans.xml
│ │ │ └── java
│ │ │ └── org
│ │ │ └── mvcspec
│ │ │ └── ozark
│ │ │ └── test
│ │ │ └── facelets
│ │ │ └── Catalog.java
│ └── pom.xml
└── requestDispatcher
│ └── src
│ └── main
│ ├── webapp
│ └── WEB-INF
│ │ └── beans.xml
│ └── java
│ └── org
│ └── mvcspec
│ └── ozark
│ └── test
│ └── requestdispatcher
│ └── RequestDispatcherApplication.java
├── bin
├── gf-password.txt
├── bundle-tests.sh
├── test-integration.sh
├── deploy-tests-gf.sh
├── mirror-git.sh
├── undeploy-tests-gf.sh
└── test-integration-gf-docker.sh
├── resteasy
└── src
│ └── main
│ ├── resources
│ └── META-INF
│ │ └── services
│ │ ├── javax.ws.rs.ext.Providers
│ │ └── org.mvcspec.ozark.bootstrap.ConfigProvider
│ └── java
│ └── org
│ └── mvcspec
│ └── ozark
│ └── resteasy
│ └── bootstrap
│ └── RestEasyConfigProvider.java
├── core
└── src
│ ├── main
│ ├── resources
│ │ ├── META-INF
│ │ │ ├── services
│ │ │ │ ├── javax.enterprise.inject.spi.Extension
│ │ │ │ ├── org.mvcspec.ozark.bootstrap.ConfigProvider
│ │ │ │ └── javax.servlet.ServletContainerInitializer
│ │ │ └── web-fragment.xml
│ │ └── ozark_en.properties
│ └── java
│ │ └── org
│ │ └── mvcspec
│ │ └── ozark
│ │ ├── bootstrap
│ │ └── ConfigProvider.java
│ │ ├── cdi
│ │ └── OzarkInternal.java
│ │ ├── engine
│ │ └── ViewEngineConfig.java
│ │ ├── jaxrs
│ │ └── JaxRsContext.java
│ │ └── security
│ │ └── CsrfTokenStrategy.java
│ └── test
│ ├── resources
│ ├── logging.properties
│ └── META-INF
│ │ └── beans.xml
│ └── java
│ └── org
│ └── mvcspec
│ └── ozark
│ └── binding
│ └── validate
│ └── NotAJavaBean.java
├── jersey
└── src
│ ├── main
│ └── resources
│ │ └── META-INF
│ │ └── services
│ │ ├── org.mvcspec.ozark.bootstrap.ConfigProvider
│ │ └── org.glassfish.jersey.internal.spi.ForcedAutoDiscoverable
│ └── test
│ └── resources
│ └── logging.properties
├── testsuite
└── src
│ ├── test
│ └── resources
│ │ └── payara-truststore.jks
│ └── main
│ ├── resources
│ ├── thymeleaf
│ │ └── views
│ │ │ └── hello.html
│ └── mvc
│ │ └── views
│ │ └── mvc.jsp
│ └── java
│ └── org
│ └── mvcspec
│ └── ozark
│ └── test
│ ├── mvc
│ └── MvcController.java
│ └── thymeleaf
│ ├── Greeting.java
│ ├── MyApplication.java
│ └── HelloController.java
├── .github
├── issue_template.md
└── pull_request_template.md
├── .gitignore
├── .travis
├── docker-payara.sh
├── docker-wildfly.sh
├── deploy.xml
└── wlp-server-template.xml
├── README.md
├── CONTRIBUTING.md
├── .editorconfig
└── tck
└── src
└── main
└── java
└── org
└── mvcspec
└── ozark
└── tck
├── tomee
└── TomeeArchiveProvider.java
├── liberty
└── LibertyArchiveProvider.java
├── wildfly
└── WildflyArchiveProvider.java
└── glassfish
└── GlassfishArchiveProvider.java
/ext/asciidoc/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 |
--------------------------------------------------------------------------------
/examples/asciidoc/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 |
--------------------------------------------------------------------------------
/bin/gf-password.txt:
--------------------------------------------------------------------------------
1 | AS_ADMIN_PASSWORD=ozark
2 |
--------------------------------------------------------------------------------
/ext/pebble/src/test/resources/pebble.properties:
--------------------------------------------------------------------------------
1 | org.mvcspec.ozark.ext.pebble.autoEscaping=true
2 |
--------------------------------------------------------------------------------
/examples/asciidoc/src/main/webapp/WEB-INF/views/hello.adoc:
--------------------------------------------------------------------------------
1 | = AsciiDoc Test
2 |
3 | == Hello {user}
4 |
--------------------------------------------------------------------------------
/examples/jsr223/src/main/webapp/WEB-INF/views/index.groovy:
--------------------------------------------------------------------------------
1 | "Hello " + models.mvc.encoders.html(models.name);
--------------------------------------------------------------------------------
/examples/jsr223/src/main/webapp/WEB-INF/views/index.js:
--------------------------------------------------------------------------------
1 | 'Hello ' + models.mvc.encoders.html(models['name']);
--------------------------------------------------------------------------------
/examples/jsr223/src/main/webapp/WEB-INF/views/index.py:
--------------------------------------------------------------------------------
1 | 'Hello ' + models['mvc'].encoders.html(models['name'])
--------------------------------------------------------------------------------
/examples/pebble/src/main/resources/pebble.properties:
--------------------------------------------------------------------------------
1 | org.mvcspec.ozark.ext.pebble.autoEscaping=false
2 |
--------------------------------------------------------------------------------
/examples/jade/src/main/webapp/WEB-INF/views/includes/footer.jade:
--------------------------------------------------------------------------------
1 | #footer
2 | p.footer Copyright (c) Ivar Grimstad
--------------------------------------------------------------------------------
/resteasy/src/main/resources/META-INF/services/javax.ws.rs.ext.Providers:
--------------------------------------------------------------------------------
1 | org.mvcspec.ozark.bootstrap.OzarkCoreFeature
2 |
--------------------------------------------------------------------------------
/core/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension:
--------------------------------------------------------------------------------
1 | org.mvcspec.ozark.cdi.OzarkCdiExtension
2 |
3 |
--------------------------------------------------------------------------------
/core/src/main/resources/META-INF/services/org.mvcspec.ozark.bootstrap.ConfigProvider:
--------------------------------------------------------------------------------
1 | org.mvcspec.ozark.bootstrap.DefaultConfigProvider
2 |
--------------------------------------------------------------------------------
/examples/pebble/src/main/webapp/WEB-INF/views/filter.peb:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ text | upper }}
4 |
5 |
--------------------------------------------------------------------------------
/core/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer:
--------------------------------------------------------------------------------
1 | org.mvcspec.ozark.servlet.OzarkContainerInitializer
2 |
--------------------------------------------------------------------------------
/bin/bundle-tests.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Tar all war files accessible from current dir
4 | tar cvf tests.tar `find . -name '*.war' -print`
5 |
--------------------------------------------------------------------------------
/jersey/src/main/resources/META-INF/services/org.mvcspec.ozark.bootstrap.ConfigProvider:
--------------------------------------------------------------------------------
1 | org.mvcspec.ozark.jersey.bootstrap.JerseyConfigProvider
2 |
--------------------------------------------------------------------------------
/resteasy/src/main/resources/META-INF/services/org.mvcspec.ozark.bootstrap.ConfigProvider:
--------------------------------------------------------------------------------
1 | org.mvcspec.ozark.resteasy.bootstrap.RestEasyConfigProvider
2 |
--------------------------------------------------------------------------------
/testsuite/src/test/resources/payara-truststore.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mvc-spec/ozark/HEAD/testsuite/src/test/resources/payara-truststore.jks
--------------------------------------------------------------------------------
/jersey/src/main/resources/META-INF/services/org.glassfish.jersey.internal.spi.ForcedAutoDiscoverable:
--------------------------------------------------------------------------------
1 | org.mvcspec.ozark.jersey.bootstrap.OzarkJerseyFeature
2 |
--------------------------------------------------------------------------------
/.github/issue_template.md:
--------------------------------------------------------------------------------
1 | Please do NOT create new issues here! Instead, use the new Eclipse Krazo issue tracker:
2 |
3 | https://github.com/eclipse-ee4j/krazo/issues
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .classpath
2 | .project
3 | .settings
4 | .metadata
5 | .idea
6 | target
7 | *~
8 | *.iml
9 | *.swp
10 | nb-configuration.xml
11 | .DS_Store
12 |
13 |
--------------------------------------------------------------------------------
/bin/test-integration.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | BASEDIR=$(dirname $0)
4 |
5 | source $BASEDIR/deploy-tests-gf.sh
6 |
7 | cd $BASEDIR/../test
8 | mvn -Pintegration verify
9 |
--------------------------------------------------------------------------------
/.travis/docker-payara.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | set -eu
4 |
5 | docker pull payara/server-web:5.183
6 | docker run --name=payara -d -p 8080:8080 -p 4848:4848 -it payara/server-web:5.183
7 |
--------------------------------------------------------------------------------
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 | Please don't create new pull requests. We are currently migrating the source code to the Eclipse Krazo project. Please watch the mailing list about the current status.
--------------------------------------------------------------------------------
/examples/pebble/src/main/webapp/WEB-INF/views/home.peb:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ websiteTitle }}
4 |
5 |
6 | {{ content }}
7 |
8 |
--------------------------------------------------------------------------------
/examples/README.txt:
--------------------------------------------------------------------------------
1 |
2 | Running Tests
3 | -------------
4 |
5 | (1) Startup container and deploy all war files under this directory
6 |
7 | (2) mvn -Pintegration -Dintegration.serverPort=XXXX verify
8 |
9 |
--------------------------------------------------------------------------------
/bin/deploy-tests-gf.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | BASEDIR=$(dirname $0)
4 |
5 | WARS=`find . -name '*.war' -print`
6 |
7 | for i in $WARS
8 | do
9 | asadmin --passwordfile $BASEDIR/gf-password.txt deploy --force $i
10 | done
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | **Important:**
2 |
3 | This repository has been archived.
4 |
5 | Ozark is now [Eclipse Krazo](https://projects.eclipse.org/projects/ee4j.krazo)
6 | and developed in [this repository](https://github.com/eclipse-ee4j/krazo).
7 |
--------------------------------------------------------------------------------
/bin/mirror-git.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | cd /tmp
4 | git clone --bare ssh://spericas@git.java.net/ozark~sources
5 | cd ozark~sources.git
6 | git push --mirror https://github.com/spericas/ozark.git
7 | cd ..
8 | rm -rf ozark~sources.git
9 |
10 |
--------------------------------------------------------------------------------
/bin/undeploy-tests-gf.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | BASEDIR=$(dirname $0)
4 |
5 | WARS=`find . -name '*.war' -print`
6 |
7 | for i in $WARS
8 | do
9 | asadmin --passwordfile $BASEDIR/gf-password.txt undeploy `basename $i .war`
10 | done
11 |
--------------------------------------------------------------------------------
/examples/jade/src/main/webapp/WEB-INF/views/main.jade:
--------------------------------------------------------------------------------
1 | doctype html
2 | html
3 | head
4 | title= pageName
5 | link(rel='stylesheet', href='#{request.contextPath}/ozark.css')
6 | body
7 | h1 Hello #{user}
8 | include includes/footer.jade
--------------------------------------------------------------------------------
/examples/jade/src/main/webapp/WEB-INF/views/helper.jade:
--------------------------------------------------------------------------------
1 | doctype html
2 | html
3 | head
4 | title= pageName
5 | link(rel='stylesheet', href='#{request.contextPath}/ozark.css')
6 | body
7 | h1 Hello Helper
8 | p.result= math.round(3.14159)
9 | include includes/footer.jade
--------------------------------------------------------------------------------
/examples/jade/src/main/webapp/WEB-INF/views/config.jade:
--------------------------------------------------------------------------------
1 | doctype html
2 | html
3 | head
4 | title= pageName
5 | link(rel='stylesheet', href='#{request.contextPath}/ozark.css')
6 | body
7 | :systemProperties
8 | SystemProperties
9 | :configFile
10 | ConfigFile
--------------------------------------------------------------------------------
/examples/freemarker/src/main/webapp/WEB-INF/views/hello.ftl:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello There
4 |
5 |
6 |
7 | Hello ${user?html}!
8 |
9 |
--------------------------------------------------------------------------------
/examples/velocity/src/main/webapp/WEB-INF/views/hello.vm:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello
4 |
5 |
6 |
7 | Hello $mvc.encoders.html($user)!
8 |
9 |
--------------------------------------------------------------------------------
/examples/mustache/src/main/webapp/WEB-INF/views/hello.mustache:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello
4 |
5 |
6 |
7 | Hello {{user}}!
8 |
9 |
10 |
--------------------------------------------------------------------------------
/examples/redirectScope/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Start Page
5 |
6 |
7 |
8 | Hello World!
9 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/redirectScope2/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Start Page
5 |
6 |
7 |
8 | Hello World!
9 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/velocity/src/main/webapp/WEB-INF/views/hello2.vhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello
4 |
5 |
6 |
7 | Hello $mvc.encoders.html($user2)!
8 |
9 |
--------------------------------------------------------------------------------
/.travis/docker-wildfly.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | set -eu
4 |
5 | docker pull jboss/wildfly:14.0.1.Final
6 | docker run --name=wildfly -d -p 8080:8080 -p 9990:9990 -it jboss/wildfly /opt/jboss/wildfly/bin/standalone.sh -bmanagement 0.0.0.0 -b 0.0.0.0
7 | docker exec wildfly /opt/jboss/wildfly/bin/add-user.sh admin wildfly
8 |
--------------------------------------------------------------------------------
/examples/jetbrick/src/main/webapp/WEB-INF/views/hello.jetx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Hello
6 |
7 |
8 |
9 | Hello ${user}!
10 |
11 |
--------------------------------------------------------------------------------
/examples/jtwig/src/main/webapp/WEB-INF/views/hello.twig.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Hello
6 |
7 |
8 |
9 | Hello {{ user }}
10 |
11 |
--------------------------------------------------------------------------------
/examples/jade/src/main/resources/jade.properties:
--------------------------------------------------------------------------------
1 | org.mvcspec.ozark.ext.jade.prettyPrint=true
2 | org.mvcspec.ozark.ext.jade.filter.configFile=org.mvcspec.ozark.test.jade.DummyFilter
3 | org.mvcspec.ozark.ext.jade.filter.markdown=de.neuland.jade4j.filter.MarkdownFilter
4 | org.mvcspec.ozark.ext.jade.helper.math=org.mvcspec.ozark.test.jade.MathHelper
5 |
--------------------------------------------------------------------------------
/examples/stringtemplate/src/main/webapp/WEB-INF/views/hello.st:
--------------------------------------------------------------------------------
1 | hello(user, mvc) ::= <<
2 |
3 |
4 |
5 | Hello
6 |
7 |
8 |
9 | Hello $user; format="xml-encode"$!
10 |
11 |
12 |
13 | >>
--------------------------------------------------------------------------------
/core/src/main/resources/ozark_en.properties:
--------------------------------------------------------------------------------
1 | NoViewEngine=Unable to find suitable view engine for ''{0}''
2 | VoidControllerNoView=Void controller and no @View annotation in ''{0}''?
3 | UnableValidateCsrf=Unable to validate CSRF with media type ''{0}''
4 | CsrfFailed=Validation of CSRF failed due to {0}
5 | EntityToStringNull=Entity conversion to string return null in ''{0}''
--------------------------------------------------------------------------------
/examples/returns/src/main/webapp/WEB-INF/views/bye.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | Bye World
6 |
7 |
8 |
9 | Bye World
10 |
11 |
12 |
--------------------------------------------------------------------------------
/examples/view-annotation/src/main/webapp/error.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | General Error Page
5 |
6 |
7 |
8 |
9 | Hello Error
10 |
11 |
12 |
--------------------------------------------------------------------------------
/examples/annotations/src/main/webapp/WEB-INF/views/error.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | Error
6 |
7 |
8 |
9 | Error
10 |
11 |
12 |
--------------------------------------------------------------------------------
/examples/exceptions/src/main/webapp/WEB-INF/views/bye.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | Bye World
6 |
7 |
8 |
9 | Bye World
10 |
11 |
12 |
--------------------------------------------------------------------------------
/examples/returns/src/main/webapp/WEB-INF/views/hello.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | Hello World
6 |
7 |
8 |
9 | Hello World
10 |
11 |
12 |
--------------------------------------------------------------------------------
/examples/annotations/src/main/webapp/WEB-INF/views/success.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | Success
6 |
7 |
8 |
9 | Success
10 |
11 |
12 |
--------------------------------------------------------------------------------
/examples/exceptions/src/main/webapp/WEB-INF/views/hello.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | Hello World
6 |
7 |
8 |
9 | Hello World
10 |
11 |
12 |
--------------------------------------------------------------------------------
/examples/produces/src/main/webapp/WEB-INF/views/hello.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | Hello World
6 |
7 |
8 |
9 | Hello World
10 |
11 |
12 |
--------------------------------------------------------------------------------
/examples/view-annotation/src/main/webapp/WEB-INF/views/bye.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | Bye World
6 |
7 |
8 |
9 | Bye World
10 |
11 |
12 |
--------------------------------------------------------------------------------
/examples/redirect/src/main/webapp/WEB-INF/views/redirect.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | Redirect
6 |
7 |
8 |
9 | Redirect Works!
10 |
11 |
12 |
--------------------------------------------------------------------------------
/examples/view-annotation/src/main/webapp/WEB-INF/views/hello.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | Hello World
6 |
7 |
8 |
9 | Hello World
10 |
11 |
12 |
--------------------------------------------------------------------------------
/examples/csrf/src/main/webapp/WEB-INF/views/ok.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | CSRF Protection OK
6 |
7 |
8 |
9 | CSRF Protection OK
10 |
11 |
12 |
--------------------------------------------------------------------------------
/testsuite/src/main/resources/thymeleaf/views/hello.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello
4 |
5 |
6 |
7 | Hello !
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/examples/annotations/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Annotation Inheritance
5 |
6 |
7 |
8 |
9 | Annotation Inheritance
10 |
11 |
12 |
--------------------------------------------------------------------------------
/examples/redirect/src/main/webapp/WEB-INF/views/error.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | Redirect
6 |
7 |
8 |
9 | Redirect Event not reported!
10 |
11 |
12 |
--------------------------------------------------------------------------------
/examples/csrf-property/src/main/webapp/WEB-INF/views/ok.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | CSRF Protection OK
6 |
7 |
8 |
9 | CSRF Protection OK
10 |
11 |
12 |
--------------------------------------------------------------------------------
/examples/jade/src/main/webapp/WEB-INF/views/markdown.jade:
--------------------------------------------------------------------------------
1 | doctype html
2 | html
3 | head
4 | title= pageName
5 | link(rel='stylesheet', href='#{request.contextPath}/ozark.css')
6 | body
7 | :markdown
8 | # Mardown introduction
9 |
10 | This is **bold** and this _italic_ text.
11 |
12 | ## This is how you make a list
13 | * one
14 | * two
15 | * three
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Source Code Submissions
2 | We welcome your contributions and look forward to collaborating with you. We can only accept source code repository
3 | submissions from users who have signed the [MVC 1.0 Contributor License Agreement](https://gist.github.com/ivargrimstad/e82172b9078040e721ce3628651b7df2).
4 |
5 | You will will be automatically instructed to sign the CLA when submitting your first Pull Request.
6 |
--------------------------------------------------------------------------------
/examples/application-path/src/main/webapp/WEB-INF/views/book.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | Book Information
6 |
7 |
8 | Book Information
9 | Title: ${book.title}
10 | Author(s): ${book.author}
11 | ISBN: ${book.isbn}
12 |
13 |
--------------------------------------------------------------------------------
/examples/redirectScope/src/main/webapp/WEB-INF/views/redirect.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | Redirect
6 |
7 |
8 |
9 | Redirect Works!
10 | ${redirectBean.value}
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/redirectScope2/src/main/webapp/WEB-INF/views/redirect.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | Redirect
6 |
7 |
8 |
9 | Redirect Works!
10 | ${redirectBean.value}
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/locale/src/main/webapp/WEB-INF/views/locale.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 |
6 | Request Locale
7 |
8 |
9 | Request Locale
10 | Locale: ${mvc.locale}
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/csrf-property/src/main/webapp/WEB-INF/views/error.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | CSRF Protection Error
6 |
7 |
8 |
9 | CSRF Protection Failed
10 | ${message}
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # Configuration file for EditorConfig: http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | end_of_line = lf
7 | indent_style = space
8 | indent_size = 4
9 | insert_final_newline = true
10 | trim_trailing_whitespace = true
11 |
12 | [*.{txt,md}]
13 | trim_trailing_whitespace = false
14 |
15 | [*.properties]
16 | charset = latin1
17 |
18 | [*.yml]
19 | indent_size = 2
20 | indent_style = space
21 |
22 |
--------------------------------------------------------------------------------
/examples/handlebars/src/main/webapp/WEB-INF/views/person.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Person View
6 |
7 |
8 |
9 | Person
10 | {{person.name}}
11 | {{person.surname}}
12 | {{person.age}}
13 |
14 |
--------------------------------------------------------------------------------
/examples/validation/src/main/webapp/WEB-INF/views/data.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 |
6 | Form Validation
7 |
8 |
9 | Form Validation
10 | Name: ${mvc.encoders.html(data.name)}
11 | Age: ${data.age}
12 |
13 |
14 |
--------------------------------------------------------------------------------
/examples/book-models/src/main/webapp/WEB-INF/views/book.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | Book Information
6 |
7 |
8 |
9 | Book Information
10 | Title: ${book.title}
11 | Author(s): ${book.author}
12 | ISBN: ${book.isbn}
13 |
14 |
--------------------------------------------------------------------------------
/examples/conversation/src/main/webapp/WEB-INF/views/stop.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | Stopping Conversation
6 |
7 |
8 |
9 | Stopping Conversation
10 | Our Secret: ${secret}
11 | Start New Conversation
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.travis/deploy.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 | ossrh
7 | ${env.SONATYPE_USERNAME}
8 | ${env.SONATYPE_PASSWORD}
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/book-cdi/src/main/webapp/WEB-INF/views/book.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | Book Information
6 |
7 |
8 |
9 | Book Information
10 | Title: ${book.title}
11 | Author(s): ${book.author}
12 | ISBN: ${book.isbn}
13 |
14 |
--------------------------------------------------------------------------------
/examples/validation/src/main/webapp/WEB-INF/views/binderror.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 |
6 | Form Binding Error
7 |
8 |
9 | Binding Error
10 | Property: ${error.property}
11 | Param: ${error.param}
12 | Message: ${error.message}
13 |
14 |
15 |
--------------------------------------------------------------------------------
/examples/validation/src/main/webapp/WEB-INF/views/error.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 |
6 | Form Validation
7 |
8 |
9 | Form Error
10 | Property: ${error.property}
11 | Param: ${error.param}
12 | Value: ${error.value}
13 | Message: ${error.message}
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/conversation/src/main/webapp/WEB-INF/views/tellme.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | In Conversation
6 |
7 |
8 |
9 | In Conversation
10 | Our Secret: ${bean.secret}
11 | Continue Conversation
12 | Stop Conversation
13 |
14 |
--------------------------------------------------------------------------------
/examples/def-ext/src/main/webapp/WEB-INF/views/extension.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | Default Extension Test
6 |
7 |
8 |
9 | Default Extension Test
10 | ${mvc.basePath}
11 | ${mvc.config.properties.get("org.mvcspec.ozark.defaultViewFileExtension")}
12 |
13 |
14 |
--------------------------------------------------------------------------------
/examples/csrf/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Csrf
5 |
6 |
7 |
8 |
9 | Csrf
10 |
13 |
14 | Source Code
15 |
16 |
17 |
--------------------------------------------------------------------------------
/examples/conversation/src/main/webapp/WEB-INF/views/start.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | Starting Conversation
6 |
7 |
8 |
9 | Starting Conversation
10 | Our Secret: ${bean.secret}
11 | Continue Conversation
12 | Stop Conversation
13 |
14 |
15 |
--------------------------------------------------------------------------------
/core/src/test/resources/logging.properties:
--------------------------------------------------------------------------------
1 | .handlers=java.util.logging.ConsoleHandler
2 | java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
3 | java.util.logging.SimpleFormatter.format=%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS %4$-6s %2$s %5$s%6$s%n
4 |
5 | .level=INFO
6 | # setting everything to WARNING as deltaspike test-control changes the log level...
7 | # see: https://issues.apache.org/jira/browse/DELTASPIKE-1133
8 | java.util.logging.ConsoleHandler.level=WARNING
9 |
10 | #org.apache.deltaspike.level=WARNING
11 | org.jboss.weld.level=SEVERE
12 |
--------------------------------------------------------------------------------
/jersey/src/test/resources/logging.properties:
--------------------------------------------------------------------------------
1 | .handlers=java.util.logging.ConsoleHandler
2 | java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
3 | java.util.logging.SimpleFormatter.format=%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS %4$-6s %2$s %5$s%6$s%n
4 |
5 | .level=INFO
6 | # setting everything to WARNING as deltaspike test-control changes the log level...
7 | # see: https://issues.apache.org/jira/browse/DELTASPIKE-1133
8 | java.util.logging.ConsoleHandler.level=WARNING
9 |
10 | #org.apache.deltaspike.level=WARNING
11 | org.jboss.weld.level=SEVERE
12 |
--------------------------------------------------------------------------------
/testsuite/src/main/resources/mvc/views/mvc.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | Mvc Test
6 |
7 |
8 |
9 | Mvc Test
10 | ${mvc.basePath}
11 | ${mvc.csrf.name}
12 | ${mvc.encoders.html("<&>")}
13 | ${mvc.config.properties.get("myproperty")}
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/redirect/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Redirect
5 |
6 |
7 |
8 |
9 | Redirect
10 |
13 |
14 | Source Code
15 |
16 |
17 |
--------------------------------------------------------------------------------
/examples/csrf/src/main/webapp/WEB-INF/views/csrf.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | CSRF Protection Test
6 |
7 |
8 |
9 | CSRF Protection Test
10 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/application-path/src/main/webapp/WEB-INF/views/book.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 | Book Information
7 |
8 |
9 | Book Information
10 | Title: ${book.title}
11 | Author(s): ${book.author}
12 | ISBN: ${book.isbn}
13 |
14 |
15 |
--------------------------------------------------------------------------------
/examples/csrf-property/src/main/webapp/WEB-INF/views/csrf.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | CSRF Protection Test
6 |
7 |
8 |
9 | CSRF Protection Test
10 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/uri-builder/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | UriBuilder test
5 |
6 |
7 |
8 |
9 | UriBuilder test
10 |
13 |
14 | Source Code
15 |
16 |
17 |
--------------------------------------------------------------------------------
/examples/jtwig/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello Controller using Jtwig
5 |
6 |
7 |
8 |
9 | Hello Controller using Jtwig
10 |
13 |
14 | Source Code
15 |
16 |
17 |
--------------------------------------------------------------------------------
/examples/locale/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Request Locale
6 |
7 |
8 |
9 | Request Locale
10 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/examples/events/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Event Information
5 |
6 |
7 |
8 |
9 | Event Information
10 | Event Information
11 |
12 | Source Code
13 |
14 |
15 |
--------------------------------------------------------------------------------
/examples/groovy/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello Controller using Groovy
5 |
6 |
7 |
8 |
9 | Hello Controller using Groovy
10 |
13 |
14 | Source Code
15 |
16 |
17 |
--------------------------------------------------------------------------------
/examples/exceptions/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exceptions in Hello Controller
5 |
6 |
7 |
8 |
9 | Exceptions in Hello Controller
10 |
13 |
14 | Source Code
15 |
16 |
17 |
--------------------------------------------------------------------------------
/examples/asciidoc/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello Controller using Asciidoc
5 |
6 |
7 |
8 |
9 | Hello Controller using Asciidoc
10 |
13 |
14 | Source Code
15 |
16 |
17 |
--------------------------------------------------------------------------------
/examples/handlebars/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Person Controller using Handlebars
5 |
6 |
7 |
8 |
9 | Person Controller using Handlebars
10 |
13 |
14 | Source Code
15 |
16 |
17 |
--------------------------------------------------------------------------------
/examples/jetbrick/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello Controller using Jetbrick
5 |
6 |
7 |
8 |
9 | Hello Controller using Jetbrick
10 |
13 |
14 | Source Code
15 |
16 |
17 |
--------------------------------------------------------------------------------
/examples/mustache/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello Controller using Mustache
5 |
6 |
7 |
8 |
9 | Hello Controller using Mustache
10 |
13 |
14 | Source Code
15 |
16 |
17 |
--------------------------------------------------------------------------------
/examples/freemarker/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello Controller using FreeMarker
5 |
6 |
7 |
8 |
9 | Hello Controller using FreeMarker
10 |
13 |
14 | Source Code
15 |
16 |
17 |
--------------------------------------------------------------------------------
/examples/produces/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello Controller with @Produces
5 |
6 |
7 |
8 |
9 | Hello Controller with @Produces
10 |
13 |
14 | Source Code
15 |
16 |
17 |
--------------------------------------------------------------------------------
/examples/returns/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello Controller with @Produces
5 |
6 |
7 |
8 |
9 | Hello Controller with @Produces
10 |
13 |
14 | Source Code
15 |
16 |
17 |
--------------------------------------------------------------------------------
/examples/locale/src/main/webapp/ozark.css:
--------------------------------------------------------------------------------
1 | h1 {
2 | color: steelblue;
3 | font-size: 30px;
4 | }
5 |
6 | h2 {
7 | color: steelblue;
8 | font-size: 24px;
9 | margin-top: 20px;
10 | }
11 |
12 | input {
13 | width: 200px;
14 | display: block;
15 | border: 1px solid #999;
16 | height: 25px;
17 | margin-bottom: 5px;
18 | }
19 |
20 | input[type=submit] {
21 | width: 150px;
22 | padding: 5px 5px;
23 | background: steelblue;
24 | color: white;
25 | border: 0 none;
26 | cursor: pointer;
27 | -webkit-border-radius: 5px;
28 | border-radius: 5px;
29 | margin-bottom: 15px;
30 | margin-top: 15px;
31 | }
--------------------------------------------------------------------------------
/examples/conversation/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Start Page
5 |
6 |
7 |
8 |
9 | Conversation Scope
10 | Start New Conversation
11 |
12 | Source Code
13 |
14 |
15 |
--------------------------------------------------------------------------------
/examples/validation/src/main/webapp/ozark.css:
--------------------------------------------------------------------------------
1 | h1 {
2 | color: steelblue;
3 | font-size: 30px;
4 | }
5 |
6 | h2 {
7 | color: steelblue;
8 | font-size: 24px;
9 | margin-top: 20px;
10 | }
11 |
12 | input {
13 | width: 200px;
14 | display: block;
15 | border: 1px solid #999;
16 | height: 25px;
17 | margin-bottom: 5px;
18 | }
19 |
20 | input[type=submit] {
21 | width: 150px;
22 | padding: 5px 5px;
23 | background: steelblue;
24 | color: white;
25 | border: 0 none;
26 | cursor: pointer;
27 | -webkit-border-radius: 5px;
28 | border-radius: 5px;
29 | margin-bottom: 15px;
30 | margin-top: 15px;
31 | }
--------------------------------------------------------------------------------
/examples/csrf-property/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Csrf
5 |
6 |
7 |
8 |
9 | Csrf
10 |
14 |
15 | Source Code
16 |
17 |
18 |
--------------------------------------------------------------------------------
/examples/stringtemplate/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello Controller using StringTemplate
5 |
6 |
7 |
8 |
9 | Hello Controller using StringTemplate
10 |
13 |
14 | Source Code
15 |
16 |
17 |
--------------------------------------------------------------------------------
/examples/validation-i18n/src/main/webapp/ozark.css:
--------------------------------------------------------------------------------
1 | h1 {
2 | color: steelblue;
3 | font-size: 30px;
4 | }
5 |
6 | h2 {
7 | color: steelblue;
8 | font-size: 24px;
9 | margin-top: 20px;
10 | }
11 |
12 | input {
13 | width: 200px;
14 | display: block;
15 | border: 1px solid #999;
16 | height: 25px;
17 | margin-bottom: 5px;
18 | }
19 |
20 | input[type=submit] {
21 | width: 150px;
22 | padding: 5px 5px;
23 | background: steelblue;
24 | color: white;
25 | border: 0 none;
26 | cursor: pointer;
27 | -webkit-border-radius: 5px;
28 | border-radius: 5px;
29 | margin-bottom: 15px;
30 | margin-top: 15px;
31 | }
--------------------------------------------------------------------------------
/examples/facelets/src/main/webapp/book.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 | Book Information
7 |
8 |
9 |
10 | Book Information
11 | Title: ${book.title}
12 | Author(s): ${book.author}
13 | ISBN: ${book.isbn}
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/book-models/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Book Controllers using Models
5 |
6 |
7 |
8 |
9 | Book Controllers using Models
10 |
14 |
15 | Source Code
16 |
17 |
18 |
--------------------------------------------------------------------------------
/examples/jade/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Jade Exmaple
6 |
7 |
8 |
9 | Jade Example
10 |
16 |
17 | Source Code
20 |
21 |
22 |
--------------------------------------------------------------------------------
/examples/application-path/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Book Controllers using Facelets
5 |
6 |
7 |
8 | Book Controllers using Facelets
9 |
13 |
14 | Source Code
15 |
16 |
17 |
--------------------------------------------------------------------------------
/examples/velocity/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello Controller using Velocity
5 |
6 |
7 |
8 |
9 | Hello Controller using Velocity
10 |
14 |
15 | Source Code
16 |
17 |
18 |
--------------------------------------------------------------------------------
/examples/validation/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Form Validation
6 |
7 |
8 |
9 | Form Validation
10 | An empty name or an age less than 18 will result in a 400 (validation error)
11 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/examples/validation/src/main/webapp/indexprop.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Form Validation
6 |
7 |
8 |
9 | Form Validation
10 | An empty name or an age less than 18 will result in a 400 (validation error)
11 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/examples/book-cdi/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Book Controllers using CDI
5 |
6 |
7 |
8 |
9 | Book Controllers using CDI
10 |
14 |
15 | Source Code
16 |
17 |
18 |
--------------------------------------------------------------------------------
/examples/def-ext/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Default extension
5 |
6 |
7 |
8 |
9 | Default extension
10 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/examples/validation-i18n/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Validation
6 |
7 |
8 |
9 | Request Locale
10 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/examples/facelets/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Book Controllers using Facelets
5 |
6 |
7 |
8 |
9 | Book Controllers using Facelets
10 |
14 |
15 | Source Code
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.travis/wlp-server-template.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | webProfile-7.0
7 |
8 |
9 | jsp-2.2
10 | localConnector-1.0
11 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/bin/test-integration-gf-docker.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Builds the whole project, starts a dockered nightly glassfish, deploys all test-projects and runs the integration tests.
4 | # Expects a installed docker and a /etc/hosts entry named 'docker' pointing to your docker host.
5 |
6 | ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd )"
7 | DEPLOYMENTS=${ROOT_DIR}/test/target/deployments
8 | DOCKER_CONTAINER=ozark_gf5
9 |
10 | cd ${ROOT_DIR}
11 | mvn clean install
12 | mkdir -p ${DEPLOYMENTS}
13 | cd ./test
14 | find . -name \*.war -exec cp {} ${DEPLOYMENTS}/ \;
15 | docker run --name ${DOCKER_CONTAINER} -dit -p 4848:4848 -p 8080:8080 \
16 | -v ${DEPLOYMENTS}:/glassfish4/glassfish/domains/domain1/autodeploy glassfish/nightly
17 | sleep 120
18 | mvn -Pintegration -Dintegration.serverName=docker verify
19 | docker stop ${DOCKER_CONTAINER}
20 | docker rm -fv ${DOCKER_CONTAINER}
21 |
--------------------------------------------------------------------------------
/examples/groovy/src/main/webapp/WEB-INF/views/hello.tpl:
--------------------------------------------------------------------------------
1 | yieldUnescaped ''
2 | html(lang:'en') {
3 | head {
4 | meta('http-equiv':'"Content-Type" content="text/html; charset=utf-8"')
5 | link(rel: "stylesheet", href: "${request.contextPath}/ozark.css")
6 | title('Hello')
7 | }
8 | body {
9 | h1("Hello $user")
10 | }
11 | }
--------------------------------------------------------------------------------
/examples/pebble/src/main/java/org/mvcspec/ozark/test/pebble/PebbleApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.pebble;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 |
21 | @ApplicationPath("pebble")
22 | public class PebbleApplication extends Application {
23 | }
24 |
--------------------------------------------------------------------------------
/examples/jade/src/main/java/org/mvcspec/ozark/test/jade/MathHelper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.jade;
17 |
18 | /**
19 | * A MathHelper (registered via jade.properties)
20 | *
21 | * @author Florian Hirsch
22 | */
23 | public class MathHelper {
24 |
25 | public long round(double number) {
26 | return Math.round(number);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/ext/pebble/src/test/java/org/mvcspec/ozark/ext/pebble/CustomEscapingStrategy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.ext.pebble;
17 |
18 | import com.mitchellbosecke.pebble.extension.escaper.EscapingStrategy;
19 |
20 | public class CustomEscapingStrategy implements EscapingStrategy {
21 |
22 | @Override
23 | public String escape(String string) {
24 | return string;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/core/src/test/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
--------------------------------------------------------------------------------
/examples/csrf/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
23 |
24 |
--------------------------------------------------------------------------------
/examples/def-ext/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
23 |
24 |
--------------------------------------------------------------------------------
/examples/facelets/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
23 |
24 |
--------------------------------------------------------------------------------
/examples/jade/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/jtwig/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/uri-builder/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
23 |
24 |
--------------------------------------------------------------------------------
/ext/groovy/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/ext/jade/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/ext/jtwig/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/ext/pebble/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/application-path/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
23 |
24 |
--------------------------------------------------------------------------------
/examples/asciidoc/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/book-cdi/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/csrf-property/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
23 |
24 |
--------------------------------------------------------------------------------
/examples/events/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/exceptions/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/freemarker/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/groovy/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/handlebars/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/jetbrick/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/jsr223/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/locale/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/mustache/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/pebble/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/produces/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/redirect/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/returns/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/validation-i18n/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
23 |
24 |
--------------------------------------------------------------------------------
/examples/validation/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/velocity/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/ext/asciidoc/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/ext/freemarker/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/ext/handlebars/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/ext/jetbrick/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/ext/mustache/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/ext/thymeleaf/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/ext/velocity/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/annotations/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/book-models/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/conversation/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/redirectScope/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/redirectScope2/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/stringtemplate/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/view-annotation/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/ext/stringtemplate/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/requestDispatcher/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/core/src/main/java/org/mvcspec/ozark/bootstrap/ConfigProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.bootstrap;
17 |
18 | import javax.ws.rs.core.FeatureContext;
19 |
20 | /**
21 | * SPI used to register providers when Ozark is initialized. Implementations are discovered
22 | * using the JDK's ServiceLoader mechanism.
23 | *
24 | * @author Christian Kaltepoth
25 | */
26 | public interface ConfigProvider {
27 |
28 | void configure(FeatureContext context);
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/testsuite/src/main/java/org/mvcspec/ozark/test/mvc/MvcController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.mvc;
17 |
18 | import javax.mvc.Controller;
19 | import javax.ws.rs.GET;
20 | import javax.ws.rs.Path;
21 |
22 | /**
23 | * MvcController test.
24 | *
25 | * @author Santiago Pericas-Geertsen
26 | */
27 | @Path("mvc")
28 | @Controller
29 | public class MvcController {
30 |
31 | @GET
32 | public String get() {
33 | return "mvc.jsp";
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/examples/validation-i18n/src/main/webapp/WEB-INF/views/form.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
3 |
4 |
5 |
6 |
7 | Validation
8 |
9 |
10 | Validation
11 |
12 |
13 |
14 | ${error}
15 |
16 |
17 |
18 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/examples/events/src/main/webapp/WEB-INF/views/event.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 | MVC Events
6 |
7 |
8 |
9 | Event Information
10 |
11 |
BeforeControllerEvent
12 |
Request URI: ${bean.beforeControllerEvent.uriInfo.requestUri}
13 |
Controller Method: ${bean.beforeControllerEvent.resourceInfo.resourceMethod}
14 |
15 |
16 |
AfterControllerEvent
17 |
Request URI: ${bean.afterControllerEvent.uriInfo.requestUri}
18 |
Controller Method: ${bean.afterControllerEvent.resourceInfo.resourceMethod}
19 |
20 |
21 |
BeforeProcessViewEvent
22 |
View: ${bean.beforeProcessViewEvent.view}
23 |
View Engine: ${bean.beforeProcessViewEvent.engine.name}
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/examples/view-annotation/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
24 |
25 | /error.html
26 |
27 |
28 |
--------------------------------------------------------------------------------
/examples/locale/src/main/java/org/mvcspec/ozark/test/locale/LocaleController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.locale;
17 |
18 | import javax.mvc.Controller;
19 | import javax.ws.rs.GET;
20 | import javax.ws.rs.Path;
21 |
22 | /**
23 | * Class LocaleController.
24 | *
25 | * @author Christian Kaltepoth
26 | */
27 | @Controller
28 | @Path("/locale")
29 | public class LocaleController {
30 |
31 | @GET
32 | public String get() {
33 | return "locale.jsp";
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/ext/pebble/src/test/java/org/mvcspec/ozark/ext/pebble/PebbleViewEngineTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.ext.pebble;
17 |
18 | import static org.junit.Assert.*;
19 | import org.junit.Test;
20 |
21 | public class PebbleViewEngineTest {
22 |
23 | @Test
24 | public void shouldSupportOnlyFilesWithExtensionPeb() {
25 | PebbleViewEngine engine = new PebbleViewEngine(null);
26 |
27 | assertTrue(engine.supports("view.peb"));
28 | assertFalse(engine.supports("view.txt"));
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/examples/book-cdi/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
24 |
25 |
26 | 30
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/testsuite/src/main/java/org/mvcspec/ozark/test/thymeleaf/Greeting.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.thymeleaf;
17 |
18 | import javax.enterprise.context.RequestScoped;
19 | import javax.inject.Named;
20 |
21 | /**
22 | * @author Gregor Tudan
23 | */
24 | @RequestScoped
25 | @Named("greeting")
26 | public class Greeting {
27 |
28 | private String user;
29 |
30 | public String getUser() {
31 | return user;
32 | }
33 |
34 | public void setUser(String user) {
35 | this.user = user;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/core/src/main/java/org/mvcspec/ozark/cdi/OzarkInternal.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.cdi;
17 |
18 | import javax.inject.Qualifier;
19 | import java.lang.annotation.*;
20 |
21 | /**
22 | * CDI qualifier used by Ozark internally to prevent clashes with the Default qualifier
23 | *
24 | * @author Christian Kaltepoth
25 | */
26 | @Qualifier
27 | @Documented
28 | @Retention(RetentionPolicy.RUNTIME)
29 | @Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD, ElementType.TYPE})
30 | public @interface OzarkInternal {
31 | }
32 |
--------------------------------------------------------------------------------
/examples/uri-builder/src/main/java/org/mvcspec/ozark/test/uribuilder/UriBuilderController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.uribuilder;
17 |
18 | import javax.mvc.Controller;
19 | import javax.mvc.UriRef;
20 | import javax.ws.rs.GET;
21 | import javax.ws.rs.Path;
22 |
23 | /**
24 | * @author Florian Hirsch
25 | */
26 | @Controller
27 | @Path("uri-builder")
28 | public class UriBuilderController {
29 |
30 | @GET
31 | @UriRef("some-ref")
32 | public String get() {
33 | return "uri-builder.jsp";
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/ext/groovy/src/main/java/org/mvcspec/ozark/ext/groovy/MarkupTemplateEngineProducer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.ext.groovy;
17 |
18 | import javax.enterprise.inject.Produces;
19 |
20 | import org.mvcspec.ozark.engine.ViewEngineConfig;
21 |
22 | import groovy.text.markup.MarkupTemplateEngine;
23 |
24 | /**
25 | * @author Daniel Dias
26 | */
27 | public class MarkupTemplateEngineProducer {
28 |
29 | @Produces
30 | @ViewEngineConfig
31 | public MarkupTemplateEngine getMarkupTemplateEngine() {
32 | return new MarkupTemplateEngine();
33 | }
34 | }
--------------------------------------------------------------------------------
/examples/events/src/main/java/org/mvcspec/ozark/test/events/EventController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.events;
17 |
18 | import javax.mvc.Controller;
19 | import javax.ws.rs.GET;
20 | import javax.ws.rs.Path;
21 | import javax.ws.rs.Produces;
22 |
23 | /**
24 | * HelloController test.
25 | *
26 | * @author Santiago Pericas-Geertsen
27 | */
28 | @Path("event")
29 | public class EventController {
30 |
31 | @GET
32 | @Controller
33 | @Produces("text/html")
34 | public String get() {
35 | return "event.jsp";
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/examples/facelets/src/main/java/org/mvcspec/ozark/test/facelets/Catalog.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.facelets;
17 |
18 | import javax.enterprise.context.ApplicationScoped;
19 |
20 | /**
21 | * Class Catalog.
22 | *
23 | * @author Santiago Pericas-Geertsen
24 | */
25 | @ApplicationScoped
26 | public class Catalog {
27 |
28 | public Book getBook(String id) {
29 | final Book b = new Book();
30 | b.setAuthor("Some author");
31 | b.setTitle("Some title");
32 | b.setIsbn("Some ISBN");
33 | return b;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/examples/application-path/src/main/java/org/mvcspec/ozark/test/applicationpath/Catalog.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.applicationpath;
17 |
18 | import javax.enterprise.context.ApplicationScoped;
19 |
20 | /**
21 | * Class Catalog.
22 | *
23 | * @author Santiago Pericas-Geertsen
24 | */
25 | @ApplicationScoped
26 | public class Catalog {
27 |
28 | public Book getBook(String id) {
29 | final Book b = new Book();
30 | b.setAuthor("Some author");
31 | b.setTitle("Some title");
32 | b.setIsbn("Some ISBN");
33 | return b;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/examples/jtwig/src/main/java/org/mvcspec/ozark/test/jtwig/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.jtwig;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.Collections;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Daniel Dias
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | return Collections.singleton(HelloController.class);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/examples/groovy/src/main/java/org/mvcspec/ozark/test/groovy/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.groovy;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.Collections;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Daniel Dias
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | return Collections.singleton(HelloController.class);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/examples/jetbrick/src/main/java/org/mvcspec/ozark/test/jetbrick/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.jetbrick;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.Collections;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Daniel Dias
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | return Collections.singleton(HelloController.class);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/testsuite/src/main/java/org/mvcspec/ozark/test/thymeleaf/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.thymeleaf;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.Collections;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Rodrigo Turini
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | return Collections.singleton(HelloController.class);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/examples/asciidoc/src/main/java/org/mvcspec/ozark/test/asciidoc/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.asciidoc;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.Collections;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Ricardo Arguello
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | return Collections.singleton(HelloController.class);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/examples/mustache/src/main/java/org/mvcspec/ozark/test/mustache/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.mustache;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.Collections;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Rodrigo Turini
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | return Collections.singleton(HelloController.class);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/examples/velocity/src/main/java/org/mvcspec/ozark/test/velocity/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.velocity;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.Collections;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Rodrigo Turini
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | return Collections.singleton(HelloController.class);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/core/src/main/java/org/mvcspec/ozark/engine/ViewEngineConfig.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.engine;
17 |
18 | import javax.inject.Qualifier;
19 | import java.lang.annotation.*;
20 |
21 | /**
22 | * Qualifier used for beans representing the configuration of a template engine used by a
23 | * {@link javax.mvc.engine.ViewEngine} implementation
24 | *
25 | * @author Christian Kaltepoth
26 | */
27 | @Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD, ElementType.TYPE})
28 | @Retention(RetentionPolicy.RUNTIME)
29 | @Documented
30 | @Qualifier
31 | public @interface ViewEngineConfig {
32 | }
33 |
--------------------------------------------------------------------------------
/examples/book-cdi/src/main/java/org/mvcspec/ozark/test/bookcdi/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.bookcdi;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.Collections;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Santiago Pericas-Geertsen
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | return Collections.singleton(BookController.class);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/examples/events/src/main/java/org/mvcspec/ozark/test/events/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.events;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.Collections;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Santiago Pericas-Geertsen
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | return Collections.singleton(EventController.class);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/examples/handlebars/src/main/java/org/mvcspec/ozark/test/handlebars/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.handlebars;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.Collections;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Rahman Usta
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | return Collections.singleton(PersonController.class);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/examples/returns/src/main/java/org/mvcspec/ozark/test/returns/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.returns;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.Collections;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Santiago Pericas-Geertsen
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | return Collections.singleton(HelloController.class);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/core/src/main/resources/META-INF/web-fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
22 |
23 | ozark
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/examples/produces/src/main/java/org/mvcspec/ozark/test/produces/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.produces;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.Collections;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Santiago Pericas-Geertsen
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | return Collections.singleton(HelloController.class);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/examples/view-annotation/src/main/java/org/mvcspec/ozark/test/view/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.view;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.Collections;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Santiago Pericas-Geertsen
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | return Collections.singleton(HelloController.class);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/examples/book-models/src/main/java/org/mvcspec/ozark/test/bookmodels/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.bookmodels;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.Collections;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Santiago Pericas-Geertsen
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | return Collections.singleton(BookController.class);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/examples/freemarker/src/main/java/org/mvcspec/ozark/test/freemarker/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.freemarker;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.Collections;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Santiago Pericas-Geertsen
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | return Collections.singleton(HelloController.class);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/examples/stringtemplate/src/main/java/org/mvcspec/ozark/test/stringtemplate/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.stringtemplate;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.Collections;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Rodrigo Turini
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | return Collections.singleton(HelloController.class);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/core/src/main/java/org/mvcspec/ozark/jaxrs/JaxRsContext.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.jaxrs;
17 |
18 | import javax.inject.Qualifier;
19 | import java.lang.annotation.ElementType;
20 | import java.lang.annotation.Retention;
21 | import java.lang.annotation.RetentionPolicy;
22 | import java.lang.annotation.Target;
23 |
24 | /**
25 | * Qualifier used for JAX-RS context objects
26 | *
27 | * @author Christian Kaltepoth
28 | */
29 | @Qualifier
30 | @Retention(RetentionPolicy.RUNTIME)
31 | @Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE})
32 | public @interface JaxRsContext {
33 | }
34 |
--------------------------------------------------------------------------------
/examples/annotations/src/main/java/org/mvcspec/ozark/test/annotations/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.annotations;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.Collections;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Santiago Pericas-Geertsen
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | return Collections.singleton(AnnotationsController.class);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/examples/conversation/src/main/java/org/mvcspec/ozark/test/conversation/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.conversation;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.Collections;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Santiago Pericas-Geertsen
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | return Collections.singleton(ConversationController.class);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/examples/validation-i18n/src/main/java/org/mvcspec/ozark/test/validation/FormBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.validation;
17 |
18 | import javax.mvc.binding.MvcBinding;
19 | import javax.validation.constraints.Size;
20 | import javax.ws.rs.FormParam;
21 |
22 | /**
23 | * @author Christian Kaltepoth
24 | */
25 | public class FormBean {
26 |
27 | @MvcBinding
28 | @FormParam("name")
29 | @Size(min = 5, max = 10)
30 | private String name;
31 |
32 | public String getName() {
33 | return name;
34 | }
35 |
36 | public void setName(String name) {
37 | this.name = name;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/ext/handlebars/src/main/java/org/mvcspec/ozark/ext/handlebars/DefaultHandlebarsProducer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.ext.handlebars;
17 |
18 | import com.github.jknack.handlebars.Handlebars;
19 | import org.mvcspec.ozark.engine.ViewEngineConfig;
20 |
21 | import javax.enterprise.inject.Produces;
22 |
23 | /**
24 | * Producer for the Handlebars instance used by HandlebarsViewEngine.
25 | *
26 | * @author Christian Kaltepoth
27 | */
28 | public class DefaultHandlebarsProducer {
29 |
30 | @Produces
31 | @ViewEngineConfig
32 | public Handlebars getHandlebars() {
33 | return new Handlebars();
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/examples/application-path/src/main/java/org/mvcspec/ozark/test/applicationpath/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.applicationpath;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.Collections;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication. Note empty application path.
25 | *
26 | * @author Santiago Pericas-Geertsen
27 | */
28 | @ApplicationPath("/")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | return Collections.singleton(BookController.class);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/examples/locale/src/main/java/org/mvcspec/ozark/test/locale/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.locale;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.HashSet;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Christian Kaltepoth
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | final Set> set = new HashSet<>();
34 | set.add(LocaleController.class);
35 | return set;
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/examples/requestDispatcher/src/main/java/org/mvcspec/ozark/test/requestdispatcher/RequestDispatcherApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.requestdispatcher;
17 |
18 | import java.util.Collections;
19 | import java.util.Set;
20 | import javax.ws.rs.ApplicationPath;
21 | import javax.ws.rs.core.Application;
22 |
23 | /**
24 | * Application class.
25 | *
26 | * @author Manfred Riem
27 | */
28 | @ApplicationPath("resources")
29 | public class RequestDispatcherApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | return Collections.singleton(RequestDispatcherController.class);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/examples/validation/src/main/java/org/mvcspec/ozark/test/validation/FormControllerBase.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.validation;
17 |
18 | import javax.inject.Inject;
19 | import javax.mvc.binding.BindingResult;
20 |
21 | /**
22 | * Class FormControllerBase. Base class for controllers that inherit a BindingResult
23 | * property.
24 | *
25 | * @author Santiago Pericas-Geertsen
26 | */
27 | public class FormControllerBase {
28 |
29 | private BindingResult br;
30 |
31 | public BindingResult getVr() {
32 | return br;
33 | }
34 |
35 | @Inject
36 | public void setVr(BindingResult br) {
37 | this.br = br;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/ext/jsr223/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 | 4.0.0
22 |
23 | org.mvc-spec.ozark.ext
24 | ozark-parent-ext
25 | 1.0.0-SNAPSHOT
26 |
27 | ozark-jsr223
28 | jar
29 | Ozark JSR-223 Extension
30 |
31 |
--------------------------------------------------------------------------------
/examples/redirect/src/main/java/org/mvcspec/ozark/test/redirect/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.redirect;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.HashSet;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Santiago Pericas-Geertsen
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | final Set> set = new HashSet<>();
34 | set.add(RedirectController.class);
35 | return set;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/examples/jade/src/main/java/org/mvcspec/ozark/test/jade/DummyFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.jade;
17 |
18 | import de.neuland.jade4j.filter.Filter;
19 | import de.neuland.jade4j.parser.node.Attr;
20 | import java.util.List;
21 |
22 | import java.util.Map;
23 |
24 | /**
25 | * Used to test if configuration works.
26 | *
27 | * @author Florian Hirsch
28 | */
29 | public class DummyFilter implements Filter {
30 |
31 | @Override
32 | public String convert(String source, List attributes, Map model) {
33 | String content = source.trim();
34 | return String.format("%s
", content, content);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/resteasy/src/main/java/org/mvcspec/ozark/resteasy/bootstrap/RestEasyConfigProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.resteasy.bootstrap;
17 |
18 | import org.mvcspec.ozark.bootstrap.ConfigProvider;
19 | import org.mvcspec.ozark.resteasy.validation.OzarkValidationResolver;
20 |
21 | import javax.ws.rs.core.FeatureContext;
22 |
23 | /**
24 | * Implementation of ConfigProvider for the RESTEasy module.
25 | *
26 | * @author Christian Kaltepoth
27 | */
28 | public class RestEasyConfigProvider implements ConfigProvider {
29 |
30 | @Override
31 | public void configure(FeatureContext context) {
32 | context.register(OzarkValidationResolver.class);
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/examples/redirectScope/src/main/java/org/mvcspec/ozark/test/redirectscope/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.redirectscope;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.HashSet;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Santiago Pericas-Geertsen
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | final Set> set = new HashSet<>();
34 | set.add(RedirectController.class);
35 | return set;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/examples/validation-i18n/src/main/java/org/mvcspec/ozark/test/validation/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.validation;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.HashMap;
21 | import java.util.HashSet;
22 | import java.util.Map;
23 | import java.util.Set;
24 |
25 | /**
26 | * @author Christian Kaltepoth
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | Set> set = new HashSet<>();
34 | set.add(ValidationController.class);
35 | return set;
36 | }
37 | }
--------------------------------------------------------------------------------
/tck/src/main/java/org/mvcspec/ozark/tck/tomee/TomeeArchiveProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.tck.tomee;
17 |
18 | import org.jboss.shrinkwrap.api.ShrinkWrap;
19 | import org.jboss.shrinkwrap.api.spec.WebArchive;
20 | import org.mvcspec.ozark.tck.AbstractArchiveProvider;
21 |
22 | /**
23 | * BaseArchiveProvider implementation for running TCK against TomEE
24 | */
25 | public class TomeeArchiveProvider extends AbstractArchiveProvider {
26 |
27 | @Override
28 | public WebArchive getBaseArchive() {
29 | return ShrinkWrap.create(WebArchive.class)
30 | .addAsLibraries(resolveMvcSpecJar())
31 | .addAsLibraries(resolveOzarkCore());
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/examples/uri-builder/src/main/java/org/mvcspec/ozark/test/uribuilder/UriBuilderApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.uribuilder;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.HashSet;
21 | import java.util.Set;
22 |
23 | /**
24 | * @author Florian Hirsch
25 | */
26 | @ApplicationPath("resources")
27 | public class UriBuilderApplication extends Application {
28 |
29 | @Override
30 | public Set> getClasses() {
31 | Set> classes = new HashSet<>();
32 | classes.add(UriBuilderController.class);
33 | classes.add(ParameterController.class);
34 | return classes;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/mvcspec/ozark/tck/liberty/LibertyArchiveProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.tck.liberty;
17 |
18 | import org.jboss.shrinkwrap.api.ShrinkWrap;
19 | import org.jboss.shrinkwrap.api.spec.WebArchive;
20 | import org.mvcspec.ozark.tck.AbstractArchiveProvider;
21 |
22 | /**
23 | * BaseArchiveProvider implementation for running TCK against Liberty
24 | */
25 | public class LibertyArchiveProvider extends AbstractArchiveProvider {
26 |
27 | @Override
28 | public WebArchive getBaseArchive() {
29 | return ShrinkWrap.create(WebArchive.class)
30 | .addAsLibraries(resolveMvcSpecJar())
31 | .addAsLibraries(resolveOzarkCxf());
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/mvcspec/ozark/tck/wildfly/WildflyArchiveProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.tck.wildfly;
17 |
18 | import org.jboss.shrinkwrap.api.ShrinkWrap;
19 | import org.jboss.shrinkwrap.api.spec.WebArchive;
20 | import org.mvcspec.ozark.tck.AbstractArchiveProvider;
21 |
22 | /**
23 | * BaseArchiveProvider implementation for running TCK against Wildfly
24 | */
25 | public class WildflyArchiveProvider extends AbstractArchiveProvider {
26 |
27 | @Override
28 | public WebArchive getBaseArchive() {
29 | return ShrinkWrap.create(WebArchive.class)
30 | .addAsLibraries(resolveMvcSpecJar())
31 | .addAsLibraries(resolveOzarkRestEasy());
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/examples/stringtemplate/src/main/java/org/mvcspec/ozark/test/stringtemplate/HelloController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.stringtemplate;
17 |
18 | import javax.inject.Inject;
19 | import javax.mvc.Controller;
20 | import javax.mvc.Models;
21 | import javax.mvc.View;
22 | import javax.ws.rs.*;
23 |
24 | /**
25 | * HelloController test.
26 | *
27 | * @author Rodrigo Turini
28 | */
29 | @Path("hello")
30 | public class HelloController {
31 |
32 | @Inject
33 | private Models models;
34 |
35 | @GET
36 | @Controller
37 | @Produces("text/html")
38 | @View("hello.st")
39 | public void hello(@QueryParam("user") String user) {
40 | models.put("user", user);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/mvcspec/ozark/tck/glassfish/GlassfishArchiveProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.tck.glassfish;
17 |
18 | import org.jboss.shrinkwrap.api.ShrinkWrap;
19 | import org.jboss.shrinkwrap.api.spec.WebArchive;
20 | import org.mvcspec.ozark.tck.AbstractArchiveProvider;
21 |
22 | /**
23 | * BaseArchiveProvider implementation for running TCK against Glassfish
24 | */
25 | public class GlassfishArchiveProvider extends AbstractArchiveProvider {
26 |
27 | @Override
28 | public WebArchive getBaseArchive() {
29 | return ShrinkWrap.create(WebArchive.class)
30 | .addAsLibraries(resolveMvcSpecJar())
31 | .addAsLibraries(resolveOzarkJersey());
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/ext/jade/README.md:
--------------------------------------------------------------------------------
1 | # Jade View Engine
2 |
3 | A Ozark Extension for the [Jade Template Engine][jade] using [Jade4J][jade4j].
4 |
5 | The extension can be configured via SystemProperties or a configuration file named "jade.properties" in the classpath (SystemProperties win).
6 | The default values are:
7 |
8 | org.mvcspec.ozark.ext.jade.mode=XHML
9 | org.mvcspec.ozark.ext.jade.caching=true
10 | org.mvcspec.ozark.ext.jade.prettyPrint=false
11 | org.mvcspec.ozark.ext.jade.encoding=UTF-8
12 |
13 | [Filters][filters] and [Helpers][helpers] can be registered with their fully qualified class name:
14 |
15 | org.mvcspec.ozark.ext.jade.filters.myFilter=com.foo.bar.MyFilter
16 | org.mvcspec.ozark.ext.jade.helpers.myHelper=com.foo.bar.MyHelper
17 |
18 | This extension does not register any Filter or Helper. Jade4j registers 3 filters per default:
19 |
20 | css=de.neuland.jade4j.filter.CssFilter
21 | js=de.neuland.jade4j.filter.JsFilter
22 | cdata=de.neuland.jade4j.filter.CDATAFilter
23 |
24 | ## TODOs
25 |
26 | * The combination of filters and includes does not seem to work. See [jade4j #100][100].
27 |
28 |
29 | [jade]: http://jade-lang.com/
30 | [jade4j]: https://github.com/neuland/jade4j
31 | [filters]: https://github.com/neuland/jade4j#api-filters
32 | [helpers]: https://github.com/neuland/jade4j#api-helpers
33 | [100]: https://github.com/neuland/jade4j/issues/100
34 |
--------------------------------------------------------------------------------
/examples/exceptions/src/main/java/org/mvcspec/ozark/test/exceptions/MyApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.exceptions;
17 |
18 | import javax.ws.rs.ApplicationPath;
19 | import javax.ws.rs.core.Application;
20 | import java.util.HashSet;
21 | import java.util.Set;
22 |
23 | /**
24 | * Class MyApplication.
25 | *
26 | * @author Santiago Pericas-Geertsen
27 | */
28 | @ApplicationPath("resources")
29 | public class MyApplication extends Application {
30 |
31 | @Override
32 | public Set> getClasses() {
33 | final Set> set = new HashSet<>();
34 | set.add(HelloController.class);
35 | set.add(HelloController.GlobalExceptionMapper.class);
36 | return set;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/examples/facelets/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 | 4.0.0
21 |
22 | org.mvc-spec.ozark.test
23 | ozark-parent-test
24 | 1.0.0-SNAPSHOT
25 |
26 | facelets
27 | war
28 | Ozark Facelets Tests
29 |
30 | test-facelets
31 |
32 |
33 |
--------------------------------------------------------------------------------
/examples/redirect/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 | 4.0.0
21 |
22 | org.mvc-spec.ozark.test
23 | ozark-parent-test
24 | 1.0.0-SNAPSHOT
25 |
26 | redirect
27 | war
28 | Ozark Redirect Tests
29 |
30 | test-redirect
31 |
32 |
33 |
--------------------------------------------------------------------------------
/core/src/test/java/org/mvcspec/ozark/binding/validate/NotAJavaBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.binding.validate;
17 |
18 | import javax.mvc.binding.MvcBinding;
19 | import javax.validation.constraints.NotNull;
20 | import javax.validation.constraints.Size;
21 | import javax.ws.rs.FormParam;
22 |
23 | /**
24 | * A java class that is not a valid java bean.
25 | */
26 | public class NotAJavaBean {
27 |
28 | @FormParam("name")
29 | @NotNull
30 | @Size(max = 10)
31 | private String name;
32 |
33 | public NotAJavaBean(String name) {
34 | this.name = name;
35 | }
36 |
37 | // invalid getter name per java beans spec
38 | @MvcBinding
39 | public String name() {
40 | return name;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/examples/book-cdi/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 | 4.0.0
22 |
23 | org.mvc-spec.ozark.test
24 | ozark-parent-test
25 | 1.0.0-SNAPSHOT
26 |
27 | book-cdi
28 | war
29 | Ozark Book CDI tests
30 |
31 | test-book-cdi
32 |
33 |
34 |
--------------------------------------------------------------------------------
/examples/groovy/src/main/java/org/mvcspec/ozark/test/groovy/HelloController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.groovy;
17 |
18 | import javax.inject.Inject;
19 | import javax.mvc.Controller;
20 | import javax.mvc.Models;
21 | import javax.mvc.View;
22 | import javax.ws.rs.GET;
23 | import javax.ws.rs.Path;
24 | import javax.ws.rs.Produces;
25 | import javax.ws.rs.QueryParam;
26 |
27 | /**
28 | * HelloController test.
29 | *
30 | * @author Daniel Dias
31 | */
32 | @Path("hello")
33 | public class HelloController {
34 |
35 | @Inject
36 | private Models models;
37 |
38 | @GET
39 | @Controller
40 | @View("hello.tpl")
41 | public void hello(@QueryParam("user") String user) {
42 | models.put("user", user);
43 | }
44 | }
--------------------------------------------------------------------------------
/examples/annotations/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 | 4.0.0
21 |
22 | org.mvc-spec.ozark.test
23 | ozark-parent-test
24 | 1.0.0-SNAPSHOT
25 |
26 | annotations
27 | war
28 | Ozark Annotations Tests
29 |
30 | test-annotations
31 |
32 |
33 |
--------------------------------------------------------------------------------
/examples/exceptions/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 | 4.0.0
21 |
22 | org.mvc-spec.ozark.test
23 | ozark-parent-test
24 | 1.0.0-SNAPSHOT
25 |
26 | exceptions
27 | war
28 | Ozark Exceptions Tests
29 |
30 | test-exceptions
31 |
32 |
33 |
--------------------------------------------------------------------------------
/examples/jtwig/src/main/java/org/mvcspec/ozark/test/jtwig/HelloController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.jtwig;
17 |
18 | import javax.inject.Inject;
19 | import javax.mvc.Controller;
20 | import javax.mvc.Models;
21 | import javax.mvc.View;
22 | import javax.ws.rs.GET;
23 | import javax.ws.rs.Path;
24 | import javax.ws.rs.Produces;
25 | import javax.ws.rs.QueryParam;
26 |
27 | /**
28 | * HelloController test.
29 | *
30 | * @author Daniel Dias
31 | */
32 | @Path("hello")
33 | public class HelloController {
34 |
35 | @Inject
36 | private Models models;
37 |
38 | @GET
39 | @Controller
40 | @View("hello.twig.html")
41 | public void hello(@QueryParam("user") String user) {
42 | models.put("user", user);
43 | }
44 | }
--------------------------------------------------------------------------------
/core/src/main/java/org/mvcspec/ozark/security/CsrfTokenStrategy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.security;
17 |
18 | import javax.servlet.http.HttpServletRequest;
19 | import javax.servlet.http.HttpServletResponse;
20 | import java.util.Optional;
21 |
22 | /**
23 | * SPI to support different ways to store the CSRF token
24 | *
25 | * @author Christian Kaltepoth
26 | */
27 | public interface CsrfTokenStrategy {
28 |
29 | /**
30 | * @param request The current request
31 | * @param response The current response
32 | * @param create Whether to create a token if there is none
33 | * @return The token
34 | */
35 | Optional getToken(HttpServletRequest request, HttpServletResponse response, boolean create);
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/examples/book-models/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 | 4.0.0
22 |
23 | org.mvc-spec.ozark.test
24 | ozark-parent-test
25 | 1.0.0-SNAPSHOT
26 |
27 | book-models
28 | war
29 | Ozark Book Models Tests
30 |
31 | test-book-models
32 |
33 |
34 |
--------------------------------------------------------------------------------
/examples/pebble/src/main/java/org/mvcspec/ozark/test/pebble/PebbleController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.pebble;
17 |
18 | import javax.inject.Inject;
19 | import javax.mvc.Models;
20 | import javax.mvc.Controller;
21 | import javax.mvc.View;
22 | import javax.ws.rs.GET;
23 | import javax.ws.rs.Path;
24 |
25 | @Path("")
26 | @Controller
27 | public class PebbleController {
28 |
29 | @Inject
30 | Models models;
31 |
32 | @GET
33 | @View("home.peb")
34 | public void home() {
35 | models.put("websiteTitle", "Pebble's home page");
36 | models.put("content", "Rock solid!");
37 | }
38 |
39 | @GET
40 | @Path("filter")
41 | @View("filter.peb")
42 | public void filter() {
43 | models.put("text", "To be filtered");
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/examples/redirectScope/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 | 4.0.0
21 |
22 | org.mvc-spec.ozark.test
23 | ozark-parent-test
24 | 1.0.0-SNAPSHOT
25 |
26 | redirectScope
27 | war
28 | Ozark RedirectScope Tests
29 |
30 | test-redirectscope
31 |
32 |
33 |
--------------------------------------------------------------------------------
/ext/pebble/README.md:
--------------------------------------------------------------------------------
1 | # Pebble View Engine
2 |
3 | An Ozark extension for the [Pebble Template Engine][pebble].
4 |
5 | Pebble extension can be configured either by setting system properties or by creating a configuration file named "pebble.properties" on the project's classpath. System properties have higher priority and will override values set in the properties file.
6 |
7 | Available properties:
8 |
9 | org.mvcspec.ozark.ext.pebble.autoEscaping // true or false
10 | org.mvcspec.ozark.ext.pebble.cacheActive // true or false
11 | org.mvcspec.ozark.ext.pebble.escapingStrategy // fully qualified class name
12 | org.mvcspec.ozark.ext.pebble.defaultLocale // e.q. de
13 | org.mvcspec.ozark.ext.pebble.newLineTrimming // true or false
14 | org.mvcspec.ozark.ext.pebble.strictVariables // true or false
15 | org.mvcspec.ozark.ext.pebble.executorService // comma separated, fully qualified class names
16 | org.mvcspec.ozark.ext.pebble.tagCacheMax // e.q. 150
17 | org.mvcspec.ozark.ext.pebble.templateCacheMax // e.q. 150
18 |
19 |
20 | Properties with value equal to empty string will be ignored.
21 | All the default values are the same as described in Pebble's documentation except one:
22 |
23 | loader is forced to ServletLoader as it is recommended for application server usage
24 |
25 | [pebble]: http://www.mitchellbosecke.com/pebble/home
26 |
--------------------------------------------------------------------------------
/testsuite/src/main/java/org/mvcspec/ozark/test/thymeleaf/HelloController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright © 2017 Ivar Grimstad (ivar.grimstad@gmail.com)
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.mvcspec.ozark.test.thymeleaf;
17 |
18 | import javax.inject.Inject;
19 | import javax.mvc.Controller;
20 | import javax.mvc.View;
21 | import javax.ws.rs.GET;
22 | import javax.ws.rs.Path;
23 | import javax.ws.rs.Produces;
24 | import javax.ws.rs.QueryParam;
25 |
26 | /**
27 | * HelloController test.
28 | *
29 | * @author Rodrigo Turini
30 | */
31 | @Path("hello")
32 | public class HelloController {
33 |
34 | @Inject
35 | private Greeting greeting;
36 |
37 | @GET
38 | @Controller
39 | @Produces("text/html")
40 | @View("hello.html")
41 | public void hello(@QueryParam("user") String user) {
42 | greeting.setUser(user);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/examples/conversation/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 | 4.0.0
22 |
23 | org.mvc-spec.ozark.test
24 | ozark-parent-test
25 | 1.0.0-SNAPSHOT
26 |
27 | conversation
28 | war
29 | Ozark CDI Conversation Tests
30 |
31 | test-conversation
32 |
33 |
34 |
--------------------------------------------------------------------------------
/examples/application-path/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 | 4.0.0
21 |
22 | org.mvc-spec.ozark.test
23 | ozark-parent-test
24 | 1.0.0-SNAPSHOT
25 |
26 | application-path
27 | war
28 | Ozark Application Path Tests
29 |
30 | test-application-path
31 |
32 |
33 |
--------------------------------------------------------------------------------