Skip to content
Browse files

Initial checkin

  • Loading branch information...
0 parents commit 672799ddfa889c8a9a19dc3390a3a79273b95327 @boatmeme committed Jun 16, 2011
5 .gitignore
@@ -0,0 +1,5 @@
+target
+.classpath
+.project
+.settings
+*.log
178 LICENSE.txt
@@ -0,0 +1,178 @@
+/*
+* Apache License
+* Version 2.0, January 2004
+* http://www.apache.org/licenses/
+*
+* TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+*
+* 1. Definitions.
+*
+* "License" shall mean the terms and conditions for use, reproduction,
+* and distribution as defined by Sections 1 through 9 of this document.
+*
+* "Licensor" shall mean the copyright owner or entity authorized by
+* the copyright owner that is granting the License.
+*
+* "Legal Entity" shall mean the union of the acting entity and all
+* other entities that control, are controlled by, or are under common
+* control with that entity. For the purposes of this definition,
+* "control" means (i) the power, direct or indirect, to cause the
+* direction or management of such entity, whether by contract or
+* otherwise, or (ii) ownership of fifty percent (50%) or more of the
+* outstanding shares, or (iii) beneficial ownership of such entity.
+*
+* "You" (or "Your") shall mean an individual or Legal Entity
+* exercising permissions granted by this License.
+*
+* "Source" form shall mean the preferred form for making modifications,
+* including but not limited to software source code, documentation
+* source, and configuration files.
+*
+* "Object" form shall mean any form resulting from mechanical
+* transformation or translation of a Source form, including but
+* not limited to compiled object code, generated documentation,
+* and conversions to other media types.
+*
+* "Work" shall mean the work of authorship, whether in Source or
+* Object form, made available under the License, as indicated by a
+* copyright notice that is included in or attached to the work
+* (an example is provided in the Appendix below).
+*
+* "Derivative Works" shall mean any work, whether in Source or Object
+* form, that is based on (or derived from) the Work and for which the
+* editorial revisions, annotations, elaborations, or other modifications
+* represent, as a whole, an original work of authorship. For the purposes
+* of this License, Derivative Works shall not include works that remain
+* separable from, or merely link (or bind by name) to the interfaces of,
+* the Work and Derivative Works thereof.
+*
+* "Contribution" shall mean any work of authorship, including
+* the original version of the Work and any modifications or additions
+* to that Work or Derivative Works thereof, that is intentionally
+* submitted to Licensor for inclusion in the Work by the copyright owner
+* or by an individual or Legal Entity authorized to submit on behalf of
+* the copyright owner. For the purposes of this definition, "submitted"
+* means any form of electronic, verbal, or written communication sent
+* to the Licensor or its representatives, including but not limited to
+* communication on electronic mailing lists, source code control systems,
+* and issue tracking systems that are managed by, or on behalf of, the
+* Licensor for the purpose of discussing and improving the Work, but
+* excluding communication that is conspicuously marked or otherwise
+* designated in writing by the copyright owner as "Not a Contribution."
+*
+* "Contributor" shall mean Licensor and any individual or Legal Entity
+* on behalf of whom a Contribution has been received by Licensor and
+* subsequently incorporated within the Work.
+*
+* 2. Grant of Copyright License. Subject to the terms and conditions of
+* this License, each Contributor hereby grants to You a perpetual,
+* worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+* copyright license to reproduce, prepare Derivative Works of,
+* publicly display, publicly perform, sublicense, and distribute the
+* Work and such Derivative Works in Source or Object form.
+*
+* 3. Grant of Patent License. Subject to the terms and conditions of
+* this License, each Contributor hereby grants to You a perpetual,
+* worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+* (except as stated in this section) patent license to make, have made,
+* use, offer to sell, sell, import, and otherwise transfer the Work,
+* where such license applies only to those patent claims licensable
+* by such Contributor that are necessarily infringed by their
+* Contribution(s) alone or by combination of their Contribution(s)
+* with the Work to which such Contribution(s) was submitted. If You
+* institute patent litigation against any entity (including a
+* cross-claim or counterclaim in a lawsuit) alleging that the Work
+* or a Contribution incorporated within the Work constitutes direct
+* or contributory patent infringement, then any patent licenses
+* granted to You under this License for that Work shall terminate
+* as of the date such litigation is filed.
+*
+* 4. Redistribution. You may reproduce and distribute copies of the
+* Work or Derivative Works thereof in any medium, with or without
+* modifications, and in Source or Object form, provided that You
+* meet the following conditions:
+*
+* (a) You must give any other recipients of the Work or
+* Derivative Works a copy of this License; and
+*
+* (b) You must cause any modified files to carry prominent notices
+* stating that You changed the files; and
+*
+* (c) You must retain, in the Source form of any Derivative Works
+* that You distribute, all copyright, patent, trademark, and
+* attribution notices from the Source form of the Work,
+* excluding those notices that do not pertain to any part of
+* the Derivative Works; and
+*
+* (d) If the Work includes a "NOTICE" text file as part of its
+* distribution, then any Derivative Works that You distribute must
+* include a readable copy of the attribution notices contained
+* within such NOTICE file, excluding those notices that do not
+* pertain to any part of the Derivative Works, in at least one
+* of the following places: within a NOTICE text file distributed
+* as part of the Derivative Works; within the Source form or
+* documentation, if provided along with the Derivative Works; or,
+* within a display generated by the Derivative Works, if and
+* wherever such third-party notices normally appear. The contents
+* of the NOTICE file are for informational purposes only and
+* do not modify the License. You may add Your own attribution
+* notices within Derivative Works that You distribute, alongside
+* or as an addendum to the NOTICE text from the Work, provided
+* that such additional attribution notices cannot be construed
+* as modifying the License.
+*
+* You may add Your own copyright statement to Your modifications and
+* may provide additional or different license terms and conditions
+* for use, reproduction, or distribution of Your modifications, or
+* for any such Derivative Works as a whole, provided Your use,
+* reproduction, and distribution of the Work otherwise complies with
+* the conditions stated in this License.
+*
+* 5. Submission of Contributions. Unless You explicitly state otherwise,
+* any Contribution intentionally submitted for inclusion in the Work
+* by You to the Licensor shall be under the terms and conditions of
+* this License, without any additional terms or conditions.
+* Notwithstanding the above, nothing herein shall supersede or modify
+* the terms of any separate license agreement you may have executed
+* with Licensor regarding such Contributions.
+*
+* 6. Trademarks. This License does not grant permission to use the trade
+* names, trademarks, service marks, or product names of the Licensor,
+* except as required for reasonable and customary use in describing the
+* origin of the Work and reproducing the content of the NOTICE file.
+*
+* 7. Disclaimer of Warranty. Unless required by applicable law or
+* agreed to in writing, Licensor provides the Work (and each
+* Contributor provides its Contributions) on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+* implied, including, without limitation, any warranties or conditions
+* of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+* PARTICULAR PURPOSE. You are solely responsible for determining the
+* appropriateness of using or redistributing the Work and assume any
+* risks associated with Your exercise of permissions under this License.
+*
+* 8. Limitation of Liability. In no event and under no legal theory,
+* whether in tort (including negligence), contract, or otherwise,
+* unless required by applicable law (such as deliberate and grossly
+* negligent acts) or agreed to in writing, shall any Contributor be
+* liable to You for damages, including any direct, indirect, special,
+* incidental, or consequential damages of any character arising as a
+* result of this License or out of the use or inability to use the
+* Work (including but not limited to damages for loss of goodwill,
+* work stoppage, computer failure or malfunction, or any and all
+* other commercial damages or losses), even if such Contributor
+* has been advised of the possibility of such damages.
+*
+* 9. Accepting Warranty or Additional Liability. While redistributing
+* the Work or Derivative Works thereof, You may choose to offer,
+* and charge a fee for, acceptance of support, warranty, indemnity,
+* or other liability obligations and/or rights consistent with this
+* License. However, in accepting such obligations, You may act only
+* on Your own behalf and on Your sole responsibility, not on behalf
+* of any other Contributor, and only if You agree to indemnify,
+* defend, and hold each Contributor harmless for any liability
+* incurred by, or claims asserted against, such Contributor by reason
+* of your accepting any such warranty or additional liability.
+*
+* END OF TERMS AND CONDITIONS
+*/
3 README.md
@@ -0,0 +1,3 @@
+# Grails Random
+
+Plugin that wraps the Uncommons Maths Pseudo-Random Number Generators in convenient, easy-to-use services and taglibs
50 RandomGrailsPlugin.groovy
@@ -0,0 +1,50 @@
+class RandomGrailsPlugin {
+ // the plugin version
+ def version = "0.1"
+ // the version or versions of Grails the plugin is designed for
+ def grailsVersion = "1.3.7 > *"
+ // the other plugins this plugin depends on
+ def dependsOn = [:]
+ // resources that are excluded from plugin packaging
+ def pluginExcludes = [
+ "grails-app/views/error.gsp"
+ ]
+
+ // TODO Fill in these fields
+ def author = "Your name"
+ def authorEmail = ""
+ def title = "Plugin summary/headline"
+ def description = '''\\
+Brief description of the plugin.
+'''
+
+ // URL to the plugin's documentation
+ def documentation = "http://grails.org/plugin/random"
+
+ def doWithWebDescriptor = { xml ->
+ // TODO Implement additions to web.xml (optional), this event occurs before
+ }
+
+ def doWithSpring = {
+ // TODO Implement runtime spring config (optional)
+ }
+
+ def doWithDynamicMethods = { ctx ->
+ // TODO Implement registering dynamic methods to classes (optional)
+ }
+
+ def doWithApplicationContext = { applicationContext ->
+ // TODO Implement post initialization spring config (optional)
+ }
+
+ def onChange = { event ->
+ // TODO Implement code that is executed when any artefact that this plugin is
+ // watching is modified and reloaded. The event contains: event.source,
+ // event.application, event.manager, event.ctx, and event.plugin.
+ }
+
+ def onConfigChange = { event ->
+ // TODO Implement code that is executed when the project configuration changes.
+ // The event is the same as for 'onChange'.
+ }
+}
5 application.properties
@@ -0,0 +1,5 @@
+#Grails Metadata file
+#Thu Jun 16 15:01:24 MDT 2011
+app.grails.version=1.3.7
+app.name=random
+plugins.tomcat=1.3.7
31 grails-app/conf/BuildConfig.groovy
@@ -0,0 +1,31 @@
+grails.project.class.dir = "target/classes"
+grails.project.test.class.dir = "target/test-classes"
+grails.project.test.reports.dir = "target/test-reports"
+//grails.project.war.file = "target/${appName}-${appVersion}.war"
+grails.project.dependency.resolution = {
+ // inherit Grails' default dependencies
+ inherits("global") {
+ // uncomment to disable ehcache
+ // excludes 'ehcache'
+ }
+ log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
+ repositories {
+ grailsPlugins()
+ grailsHome()
+ grailsCentral()
+
+ // uncomment the below to enable remote dependency resolution
+ // from public Maven repositories
+ //mavenLocal()
+ //mavenCentral()
+ //mavenRepo "http://snapshots.repository.codehaus.org"
+ //mavenRepo "http://repository.codehaus.org"
+ //mavenRepo "http://download.java.net/maven/2/"
+ //mavenRepo "http://repository.jboss.com/maven2/"
+ }
+ dependencies {
+ // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
+
+ // runtime 'mysql:mysql-connector-java:5.1.13'
+ }
+}
24 grails-app/conf/Config.groovy
@@ -0,0 +1,24 @@
+// configuration for plugin testing - will not be included in the plugin zip
+
+log4j = {
+ // Example of changing the log pattern for the default console
+ // appender:
+ //
+ //appenders {
+ // console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
+ //}
+
+ error 'org.codehaus.groovy.grails.web.servlet', // controllers
+ 'org.codehaus.groovy.grails.web.pages', // GSP
+ 'org.codehaus.groovy.grails.web.sitemesh', // layouts
+ 'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
+ 'org.codehaus.groovy.grails.web.mapping', // URL mapping
+ 'org.codehaus.groovy.grails.commons', // core / classloading
+ 'org.codehaus.groovy.grails.plugins', // plugins
+ 'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
+ 'org.springframework',
+ 'org.hibernate',
+ 'net.sf.ehcache.hibernate'
+
+ warn 'org.mortbay.log'
+}
32 grails-app/conf/DataSource.groovy
@@ -0,0 +1,32 @@
+dataSource {
+ pooled = true
+ driverClassName = "org.hsqldb.jdbcDriver"
+ username = "sa"
+ password = ""
+}
+hibernate {
+ cache.use_second_level_cache = true
+ cache.use_query_cache = true
+ cache.provider_class = 'net.sf.ehcache.hibernate.EhCacheProvider'
+}
+// environment specific settings
+environments {
+ development {
+ dataSource {
+ dbCreate = "create-drop" // one of 'create', 'create-drop','update'
+ url = "jdbc:hsqldb:mem:devDB"
+ }
+ }
+ test {
+ dataSource {
+ dbCreate = "update"
+ url = "jdbc:hsqldb:mem:testDb"
+ }
+ }
+ production {
+ dataSource {
+ dbCreate = "update"
+ url = "jdbc:hsqldb:file:prodDb;shutdown=true"
+ }
+ }
+}
13 grails-app/conf/UrlMappings.groovy
@@ -0,0 +1,13 @@
+class UrlMappings {
+
+ static mappings = {
+ "/$controller/$action?/$id?"{
+ constraints {
+ // apply constraints here
+ }
+ }
+
+ "/"(view:"/index")
+ "500"(view:'/error')
+ }
+}
165 grails-app/services/com/memetix/random/RandomService.groovy
@@ -0,0 +1,165 @@
+/**
+*
+* Copyright 2011 Jonathan Griggs
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+**/
+package com.memetix.random
+
+import org.uncommons.maths.random.*
+import org.springframework.beans.factory.InitializingBean
+/**
+ * RandomService
+ *
+ * Provides services for getting random numbers based off of the Pseudorandom Number Generators
+ * in the Uncommons Maths library.
+ *
+ * Also provides services for acting upon lists in a random way, including shuffle() and draw()
+ *
+ * @author Jonathan Griggs <jonathan.griggs @ gmail.com>
+ * @version 0.1 2011.06.16
+ * @since 0.1 2011.06.16
+ */
+class RandomService implements InitializingBean {
+ def grailsApplication
+ def defaultRNG
+
+ static transactional = true
+
+ void afterPropertiesSet() {
+ defaultRNG = grailsApplication?.config?.random?.default?.generator ?: RandomNumberGenerator.MERSENNE_TWISTER
+ }
+
+ def nextInteger() {
+ return nextInteger(defaultRNG)
+ }
+
+ def nextInteger(RandomNumberGenerator rng) {
+ return rng.getRNG().nextInt()
+ }
+
+ def nextInteger(int ceiling) {
+ return nextInteger(ceiling, defaultRNG)
+ }
+
+ def nextInteger(int ceiling, RandomNumberGenerator rng) {
+ return rng.getRNG().nextInt(ceiling)
+ }
+
+ def nextInteger(int floor, int ceiling) {
+ return nextInteger(floor, ceiling, defaultRNG)
+ }
+
+ def nextInteger(int floor, int ceiling, RandomNumberGenerator rng) {
+ return floor + (int)(rng.getRNG().nextDouble()*(ceiling-floor));
+ }
+
+ def nextLong() {
+ return nextLong(defaultRNG)
+ }
+
+ def nextLong(RandomNumberGenerator rng) {
+ return rng.getRNG().nextLong()
+ }
+
+ def nextLong(long ceiling) {
+ return nextLong(ceiling, defaultRNG)
+ }
+
+ def nextLong(long ceiling, RandomNumberGenerator rng) {
+ return nextLong(0, ceiling, rng)
+ }
+
+ def nextLong(long floor, long ceiling) {
+ return nextLong(floor, ceiling, defaultRNG)
+ }
+
+ def nextLong(long floor, long ceiling, RandomNumberGenerator rng) {
+ return floor +(long)(rng.getRNG().nextDouble()*(ceiling-floor));
+ }
+
+ def nextFloat() {
+ return nextFloat(defaultRNG)
+ }
+
+ def nextFloat(RandomNumberGenerator rng) {
+ return rng.getRNG().nextFloat()
+ }
+
+ def nextDouble() {
+ return nextDouble(defaultRNG)
+ }
+
+ def nextDouble(RandomNumberGenerator rng) {
+ return rng.getRNG().nextDouble()
+ }
+
+ def nextBoolean() {
+ return nextBoolean(defaultRNG)
+ }
+
+ def nextBoolean(RandomNumberGenerator rng) {
+ return rng.getRNG().nextBoolean()
+ }
+
+ def nextGaussian() {
+ return nextGaussian(defaultRNG)
+ }
+
+ def nextGaussian(RandomNumberGenerator rng) {
+ return rng.getRNG().nextGaussian()
+ }
+
+ def draw(List list) {
+ return draw(list,defaultRNG)
+ }
+
+ def draw(List list, RandomNumberGenerator rng) {
+ return list.get(nextInteger(list.size(),rng))
+ }
+
+ def shuffle(List list) {
+ return shuffle(list,defaultRNG)
+ }
+
+ def shuffle(List list, RandomNumberGenerator rng) {
+ return Collections.shuffle(list,rng.getRNG())
+ }
+}
+
+public enum RandomNumberGenerator {
+ MERSENNE_TWISTER(new MersenneTwisterRNG()),
+ XOR_SHIFT(new XORShiftRNG()),
+ COMPLEMENTARY_MULTIPLY_WITH_CARRY(new CMWC4096RNG()),
+ AES_COUNTER(new AESCounterRNG()),
+ CELLULAR_AUTOMATON(new CellularAutomatonRNG());
+
+ private final java.util.Random rng;
+
+ RandomNumberGenerator(java.util.Random rng) {
+ this.rng = rng;
+ }
+
+ public java.util.Random getRNG() {
+ return rng;
+ }
+
+ public static RandomNumberGenerator fromString(final String pRandom) {
+ for (RandomNumberGenerator r : values()) {
+ if (r.toString().equalsIgnoreCase(pRandom)) {
+ return r;
+ }
+ }
+ return null;
+ }
+}
19 grails-app/taglib/com/memetix/random/RandomTagLib.groovy
@@ -0,0 +1,19 @@
+package com.memetix.random
+/**
+ * RandomTagLib
+ *
+ * namespace:random
+ *
+ * tags: expandAndLinkUrls
+ * expandUrls
+ * unshortenUrl
+ * unshortenAndLinkUrl
+ *
+ *
+ * @author Jonathan Griggs <twitcaps.developer @ gmail.com>
+ * @version 1.0 2011.05.17
+ * @since 1.0 2011.05.17
+ */
+class RandomTagLib {
+
+}
54 grails-app/views/error.gsp
@@ -0,0 +1,54 @@
+<html>
+ <head>
+ <title>Grails Runtime Exception</title>
+ <style type="text/css">
+ .message {
+ border: 1px solid black;
+ padding: 5px;
+ background-color:#E9E9E9;
+ }
+ .stack {
+ border: 1px solid black;
+ padding: 5px;
+ overflow:auto;
+ height: 300px;
+ }
+ .snippet {
+ padding: 5px;
+ background-color:white;
+ border:1px solid black;
+ margin:3px;
+ font-family:courier;
+ }
+ </style>
+ </head>
+
+ <body>
+ <h1>Grails Runtime Exception</h1>
+ <h2>Error Details</h2>
+
+ <div class="message">
+ <strong>Error ${request.'javax.servlet.error.status_code'}:</strong> ${request.'javax.servlet.error.message'.encodeAsHTML()}<br/>
+ <strong>Servlet:</strong> ${request.'javax.servlet.error.servlet_name'}<br/>
+ <strong>URI:</strong> ${request.'javax.servlet.error.request_uri'}<br/>
+ <g:if test="${exception}">
+ <strong>Exception Message:</strong> ${exception.message?.encodeAsHTML()} <br />
+ <strong>Caused by:</strong> ${exception.cause?.message?.encodeAsHTML()} <br />
+ <strong>Class:</strong> ${exception.className} <br />
+ <strong>At Line:</strong> [${exception.lineNumber}] <br />
+ <strong>Code Snippet:</strong><br />
+ <div class="snippet">
+ <g:each var="cs" in="${exception.codeSnippet}">
+ ${cs?.encodeAsHTML()}<br />
+ </g:each>
+ </div>
+ </g:if>
+ </div>
+ <g:if test="${exception}">
+ <h2>Stack Trace</h2>
+ <div class="stack">
+ <pre><g:each in="${exception.stackTraceLines}">${it.encodeAsHTML()}<br/></g:each></pre>
+ </div>
+ </g:if>
+ </body>
+</html>
BIN lib/uncommons-maths-1.2.2.jar
Binary file not shown.
10 scripts/_Install.groovy
@@ -0,0 +1,10 @@
+//
+// This script is executed by Grails after plugin was installed to project.
+// This script is a Gant script so you can use all special variables provided
+// by Gant (such as 'baseDir' which points on project base dir). You can
+// use 'ant' to access a global instance of AntBuilder
+//
+// For example you can create directory under project tree:
+//
+// ant.mkdir(dir:"${basedir}/grails-app/jobs")
+//
5 scripts/_Uninstall.groovy
@@ -0,0 +1,5 @@
+//
+// This script is executed by Grails when the plugin is uninstalled from project.
+// Use this script if you intend to do any additional clean-up on uninstall, but
+// beware of messing up SVN directories!
+//
10 scripts/_Upgrade.groovy
@@ -0,0 +1,10 @@
+//
+// This script is executed by Grails during application upgrade ('grails upgrade'
+// command). This script is a Gant script so you can use all special variables
+// provided by Gant (such as 'baseDir' which points on project base dir). You can
+// use 'ant' to access a global instance of AntBuilder
+//
+// For example you can create directory under project tree:
+//
+// ant.mkdir(dir:"${basedir}/grails-app/jobs")
+//
452 test/unit/com/memetix/random/RandomServiceTests.groovy
@@ -0,0 +1,452 @@
+package com.memetix.random
+
+import grails.test.*
+import org.uncommons.maths.random.*
+
+class RandomServiceTests extends GrailsUnitTestCase {
+ def randomService
+
+ protected void setUp() {
+ super.setUp()
+ randomService = new RandomService()
+ randomService.afterPropertiesSet()
+ }
+
+ protected void tearDown() {
+ super.tearDown()
+ }
+
+ void testRandomNumberGeneratorEnum_Get() {
+ def random = RandomNumberGenerator.fromString("MERSENNE_TWISTER")
+ assertEquals "MERSENNE_TWISTER",random.toString()
+ random = RandomNumberGenerator.fromString("AES_COUNTER")
+ assertEquals "AES_COUNTER",random.toString()
+ random = RandomNumberGenerator.fromString("aes_counter")
+ assertEquals "AES_COUNTER",random.toString()
+ random = RandomNumberGenerator.fromString("broken")
+ assertNull random
+ }
+
+ void testShuffle() {
+ List list = new ArrayList()
+ for(int i = 0; i<100; i++) {
+ list.add(i);
+ }
+
+ assertEquals 100, list.size()
+ randomService.shuffle(list)
+ assertEquals 100, list.size()
+
+ for(iter in list) {
+ assertTrue iter >= 0;
+ assertTrue iter < 100;
+ }
+
+ }
+
+ void testDraw() {
+ List list = new ArrayList()
+ for(int i = 1500; i<2500; i++) {
+ list.add(i);
+ }
+
+ def pick = randomService.draw(list)
+ assertTrue list.contains(pick)
+ assertTrue pick >= 1500
+ assertTrue pick < 2500
+ }
+
+ /* Test getInteger, all algorithms
+
+ MERSENNE_TWISTER,
+ XOR_SHIFT,
+ COMPLEMENTARY_MULTIPLY_WITH_CARRY,
+ AES_COUNTER,
+ CELLULAR_AUTOMATON;
+
+ */
+
+ void testGetInteger_DEFAULT() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextInteger(10)
+ assertTrue result < 10;
+ }
+
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextInteger(10,20)
+ assertTrue result >= 10;
+ assertTrue result < 20;
+ }
+ }
+
+ void testGetInteger_MERSENNE_TWISTER() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextInteger(10, RandomNumberGenerator.MERSENNE_TWISTER)
+ assertTrue result < 10;
+ }
+
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextInteger(10,20, RandomNumberGenerator.MERSENNE_TWISTER)
+ assertTrue result >= 10;
+ assertTrue result < 20;
+ }
+ }
+
+ void testGetInteger_XOR_SHIFT() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextInteger(10, RandomNumberGenerator.XOR_SHIFT)
+ assertTrue result < 10;
+ }
+
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextInteger(10,20, RandomNumberGenerator.XOR_SHIFT)
+ assertTrue result >= 10;
+ assertTrue result < 20;
+ }
+ }
+
+ void testGetInteger_COMPLEMENTARY_MULTIPLY_WITH_CARRY() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextInteger(10, RandomNumberGenerator.COMPLEMENTARY_MULTIPLY_WITH_CARRY)
+ assertTrue result < 10;
+ }
+
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextInteger(10,20, RandomNumberGenerator.COMPLEMENTARY_MULTIPLY_WITH_CARRY)
+ assertTrue result >= 10;
+ assertTrue result < 20;
+ }
+ }
+
+ void testGetInteger_AES_COUNTER() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextInteger(10, RandomNumberGenerator.AES_COUNTER)
+ assertTrue result < 10;
+ }
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextInteger(10,20, RandomNumberGenerator.AES_COUNTER)
+ assertTrue result >= 10;
+ assertTrue result < 20;
+ }
+ }
+
+ void testGetInteger_CELLULAR_AUTOMATON() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextInteger(10, RandomNumberGenerator.CELLULAR_AUTOMATON)
+ assertTrue result < 10;
+ }
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextInteger(10,20, RandomNumberGenerator.CELLULAR_AUTOMATON)
+ assertTrue result >= 10;
+ assertTrue result < 20;
+ }
+ }
+
+ /* Test getLong, all algorithms
+
+ MERSENNE_TWISTER,
+ XOR_SHIFT,
+ COMPLEMENTARY_MULTIPLY_WITH_CARRY,
+ AES_COUNTER,
+ CELLULAR_AUTOMATON;
+
+ */
+
+ void testGetLong_DEFAULT() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextLong(10)
+ assertTrue result < 10;
+ }
+
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextLong(1000, 2000)
+ assertTrue result < 2000;
+ assertTrue result >= 1000;
+ }
+ }
+
+ void testGetLong_MERSENNE_TWISTER() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextLong(10, RandomNumberGenerator.MERSENNE_TWISTER)
+ assertTrue result < 10;
+ }
+
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextLong(1000, 2000, RandomNumberGenerator.MERSENNE_TWISTER)
+ assertTrue result < 2000;
+ assertTrue result >= 1000;
+ }
+ }
+
+ void testGetLong_XOR_SHIFT() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextLong(10, RandomNumberGenerator.XOR_SHIFT)
+ assertTrue result < 10;
+ }
+
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextLong(1000, 2000, RandomNumberGenerator.XOR_SHIFT)
+ assertTrue result < 2000;
+ assertTrue result >= 1000;
+ }
+ }
+
+ void testGetLong_COMPLEMENTARY_MULTIPLY_WITH_CARRY() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextLong(10, RandomNumberGenerator.COMPLEMENTARY_MULTIPLY_WITH_CARRY)
+ assertTrue result < 10;
+ }
+
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextLong(1000, 2000, RandomNumberGenerator.COMPLEMENTARY_MULTIPLY_WITH_CARRY)
+ assertTrue result < 2000;
+ assertTrue result >= 1000;
+ }
+ }
+
+ void testGetLong_AES_COUNTER() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextLong(10, RandomNumberGenerator.AES_COUNTER)
+ assertTrue result < 10;
+ }
+
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextLong(1000, 2000, RandomNumberGenerator.AES_COUNTER)
+ assertTrue result < 2000;
+ assertTrue result >= 1000;
+ }
+ }
+
+ void testGetLong_CELLULAR_AUTOMATON() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextLong(10, RandomNumberGenerator.CELLULAR_AUTOMATON)
+ assertTrue result < 10;
+ }
+
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextLong(1000, 2000, RandomNumberGenerator.CELLULAR_AUTOMATON)
+ assertTrue result < 2000;
+ assertTrue result >= 1000;
+ }
+ }
+
+ /* Test getDouble, all algorithms
+
+ MERSENNE_TWISTER,
+ XOR_SHIFT,
+ COMPLEMENTARY_MULTIPLY_WITH_CARRY,
+ AES_COUNTER,
+ CELLULAR_AUTOMATON;
+
+ */
+
+ void testGetDouble_DEFAULT() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextDouble()
+ assertTrue result < 1.0;
+ assertTrue result >= 0.0;
+ }
+ }
+
+ void testGetDouble_MERSENNE_TWISTER() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextDouble(RandomNumberGenerator.MERSENNE_TWISTER)
+ assertTrue result < 1.0;
+ assertTrue result >= 0.0;
+ }
+ }
+
+ void testGetDouble_XOR_SHIFT() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextDouble(RandomNumberGenerator.XOR_SHIFT)
+ assertTrue result < 1.0;
+ assertTrue result >= 0.0;
+ }
+ }
+
+ void testGetDouble_COMPLEMENTARY_MULTIPLY_WITH_CARRY() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextDouble(RandomNumberGenerator.COMPLEMENTARY_MULTIPLY_WITH_CARRY)
+ assertTrue result < 1.0;
+ assertTrue result >= 0.0;
+ }
+ }
+
+ void testGetDouble_AES_COUNTER() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextDouble(RandomNumberGenerator.AES_COUNTER)
+ assertTrue result < 1.0;
+ assertTrue result >= 0.0;
+ }
+ }
+
+ void testGetDouble_CELLULAR_AUTOMATON() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextDouble(RandomNumberGenerator.CELLULAR_AUTOMATON)
+ assertTrue result < 1.0;
+ assertTrue result >= 0.0;
+ }
+ }
+
+ /* Test getFloat, all algorithms
+
+ MERSENNE_TWISTER,
+ XOR_SHIFT,
+ COMPLEMENTARY_MULTIPLY_WITH_CARRY,
+ AES_COUNTER,
+ CELLULAR_AUTOMATON;
+
+ */
+
+ void testGetFloat_DEFAULT() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextFloat()
+ assertTrue result < 1.0;
+ assertTrue result >= 0.0;
+ }
+ }
+
+ void testGetFloat_MERSENNE_TWISTER() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextFloat(RandomNumberGenerator.MERSENNE_TWISTER)
+ assertTrue result < 1.0;
+ assertTrue result >= 0.0;
+ }
+ }
+
+ void testGetFloat_XOR_SHIFT() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextFloat(RandomNumberGenerator.XOR_SHIFT)
+ assertTrue result < 1.0;
+ assertTrue result >= 0.0;
+ }
+ }
+
+ void testGetFloat_COMPLEMENTARY_MULTIPLY_WITH_CARRY() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextFloat(RandomNumberGenerator.COMPLEMENTARY_MULTIPLY_WITH_CARRY)
+ assertTrue result < 1.0;
+ assertTrue result >= 0.0;
+ }
+ }
+
+ void testGetFloat_AES_COUNTER() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextFloat(RandomNumberGenerator.AES_COUNTER)
+ assertTrue result < 1.0;
+ assertTrue result >= 0.0;
+ }
+ }
+
+ void testGetFloat_CELLULAR_AUTOMATON() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextFloat(RandomNumberGenerator.CELLULAR_AUTOMATON)
+ assertTrue result < 1.0;
+ assertTrue result >= 0.0;
+ }
+ }
+
+ /* Test getGaussian, all algorithms
+
+ MERSENNE_TWISTER,
+ XOR_SHIFT,
+ COMPLEMENTARY_MULTIPLY_WITH_CARRY,
+ AES_COUNTER,
+ CELLULAR_AUTOMATON;
+
+ */
+
+ void testGetGaussian_DEFAULT() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextGaussian()
+ assert result
+ }
+ }
+
+ void testGetGaussian_MERSENNE_TWISTER() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextGaussian(RandomNumberGenerator.MERSENNE_TWISTER)
+ assert result
+ }
+ }
+
+ void testGetGaussian_XOR_SHIFT() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextGaussian(RandomNumberGenerator.XOR_SHIFT)
+ assert result
+ }
+ }
+
+ void testGetGaussian_COMPLEMENTARY_MULTIPLY_WITH_CARRY() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextGaussian(RandomNumberGenerator.COMPLEMENTARY_MULTIPLY_WITH_CARRY)
+ assert result
+ }
+ }
+
+ void testGetGaussian_AES_COUNTER() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextGaussian(RandomNumberGenerator.AES_COUNTER)
+ assert result
+ }
+ }
+
+ void testGetGaussian_CELLULAR_AUTOMATON() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextGaussian(RandomNumberGenerator.CELLULAR_AUTOMATON)
+ assert result
+ }
+ }
+
+ /* Test getBoolean, all algorithms
+
+ MERSENNE_TWISTER,
+ XOR_SHIFT,
+ COMPLEMENTARY_MULTIPLY_WITH_CARRY,
+ AES_COUNTER,
+ CELLULAR_AUTOMATON;
+
+ */
+
+ void testGetBoolean_DEFAULT() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextBoolean()
+ assertTrue result == new Boolean(true) || result == new Boolean(false);
+ }
+ }
+
+ void testGetBoolean_MERSENNE_TWISTER() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextBoolean(RandomNumberGenerator.MERSENNE_TWISTER)
+ assertTrue result == new Boolean(true) || result == new Boolean(false);
+ }
+ }
+
+ void testGetBoolean_XOR_SHIFT() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextBoolean(RandomNumberGenerator.XOR_SHIFT)
+ assertTrue result == new Boolean(true) || result == new Boolean(false);
+ }
+ }
+
+ void testGetBoolean_COMPLEMENTARY_MULTIPLY_WITH_CARRY() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextBoolean(RandomNumberGenerator.COMPLEMENTARY_MULTIPLY_WITH_CARRY)
+ assertTrue result == new Boolean(true) || result == new Boolean(false);
+ }
+ }
+
+ void testGetBoolean_AES_COUNTER() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextBoolean(RandomNumberGenerator.AES_COUNTER)
+ assertTrue result == new Boolean(true) || result == new Boolean(false);
+ }
+ }
+
+ void testGetBoolean_CELLULAR_AUTOMATON() {
+ for(int i = 0; i<1000;i++) {
+ def result = randomService.nextBoolean(RandomNumberGenerator.CELLULAR_AUTOMATON)
+ assertTrue result == new Boolean(true) || result == new Boolean(false);
+ }
+ }
+}
17 test/unit/com/memetix/random/RandomTagLibTests.groovy
@@ -0,0 +1,17 @@
+package com.memetix.random
+
+import grails.test.*
+
+class RandomTagLibTests extends TagLibUnitTestCase {
+ protected void setUp() {
+ super.setUp()
+ }
+
+ protected void tearDown() {
+ super.tearDown()
+ }
+
+ void testSomething() {
+
+ }
+}
42 web-app/WEB-INF/applicationContext.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+ <bean id="grailsApplication" class="org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean">
+ <description>Grails application factory bean</description>
+ <property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
+ <property name="grailsResourceLoader" ref="grailsResourceLoader" />
+ </bean>
+
+ <bean id="pluginManager" class="org.codehaus.groovy.grails.plugins.GrailsPluginManagerFactoryBean">
+ <description>A bean that manages Grails plugins</description>
+ <property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
+ <property name="application" ref="grailsApplication" />
+ </bean>
+
+ <bean id="grailsConfigurator" class="org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator">
+ <constructor-arg>
+ <ref bean="grailsApplication" />
+ </constructor-arg>
+ <property name="pluginManager" ref="pluginManager" />
+ </bean>
+
+ <bean id="grailsResourceLoader" class="org.codehaus.groovy.grails.commons.GrailsResourceLoaderFactoryBean">
+ <property name="grailsResourceHolder" ref="grailsResourceHolder" />
+ </bean>
+
+ <bean id="grailsResourceHolder" scope="prototype" class="org.codehaus.groovy.grails.commons.spring.GrailsResourceHolder">
+ <property name="resources">
+ <value>classpath*:**/grails-app/**/*.groovy</value>
+ </property>
+ </bean>
+
+ <bean id="characterEncodingFilter"
+ class="org.springframework.web.filter.CharacterEncodingFilter">
+ <property name="encoding">
+ <value>utf-8</value>
+ </property>
+ </bean>
+</beans>
14 web-app/WEB-INF/sitemesh.xml
@@ -0,0 +1,14 @@
+<sitemesh>
+ <page-parsers>
+ <parser content-type="text/html"
+ class="org.codehaus.groovy.grails.web.sitemesh.GrailsHTMLPageParser" />
+ <parser content-type="text/html;charset=ISO-8859-1"
+ class="org.codehaus.groovy.grails.web.sitemesh.GrailsHTMLPageParser" />
+ <parser content-type="text/html;charset=UTF-8"
+ class="org.codehaus.groovy.grails.web.sitemesh.GrailsHTMLPageParser" />
+ </page-parsers>
+
+ <decorator-mappers>
+ <mapper class="org.codehaus.groovy.grails.web.sitemesh.GrailsLayoutDecoratorMapper" />
+ </decorator-mappers>
+</sitemesh>
563 web-app/WEB-INF/tld/c.tld
@@ -0,0 +1,563 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ version="2.0">
+
+ <description>JSTL 1.1 core library</description>
+ <display-name>JSTL core</display-name>
+ <tlib-version>1.1</tlib-version>
+ <short-name>c</short-name>
+ <uri>http://java.sun.com/jsp/jstl/core</uri>
+
+ <validator>
+ <description>
+ Provides core validation features for JSTL tags.
+ </description>
+ <validator-class>
+ org.apache.taglibs.standard.tlv.JstlCoreTLV
+ </validator-class>
+ </validator>
+
+ <tag>
+ <description>
+ Catches any Throwable that occurs in its body and optionally
+ exposes it.
+ </description>
+ <name>catch</name>
+ <tag-class>org.apache.taglibs.standard.tag.common.core.CatchTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+exception thrown from a nested action. The type of the
+scoped variable is the type of the exception thrown.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Simple conditional tag that establishes a context for
+ mutually exclusive conditional operations, marked by
+ &lt;when&gt; and &lt;otherwise&gt;
+ </description>
+ <name>choose</name>
+ <tag-class>org.apache.taglibs.standard.tag.common.core.ChooseTag</tag-class>
+ <body-content>JSP</body-content>
+ </tag>
+
+ <tag>
+ <description>
+ Simple conditional tag, which evalutes its body if the
+ supplied condition is true and optionally exposes a Boolean
+ scripting variable representing the evaluation of this condition
+ </description>
+ <name>if</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.IfTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+The test condition that determines whether or
+not the body content should be processed.
+ </description>
+ <name>test</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>boolean</type>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+resulting value of the test condition. The type
+of the scoped variable is Boolean.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope for var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Retrieves an absolute or relative URL and exposes its contents
+ to either the page, a String in 'var', or a Reader in 'varReader'.
+ </description>
+ <name>import</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.ImportTag</tag-class>
+ <tei-class>org.apache.taglibs.standard.tei.ImportTEI</tei-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+The URL of the resource to import.
+ </description>
+ <name>url</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+resource's content. The type of the scoped
+variable is String.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope for var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+resource's content. The type of the scoped
+variable is Reader.
+ </description>
+ <name>varReader</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the context when accessing a relative
+URL resource that belongs to a foreign
+context.
+ </description>
+ <name>context</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Character encoding of the content at the input
+resource.
+ </description>
+ <name>charEncoding</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ The basic iteration tag, accepting many different
+ collection types and supporting subsetting and other
+ functionality
+ </description>
+ <name>forEach</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.ForEachTag</tag-class>
+ <tei-class>org.apache.taglibs.standard.tei.ForEachTEI</tei-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Collection of items to iterate over.
+ </description>
+ <name>items</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>java.lang.Object</type>
+ </attribute>
+ <attribute>
+ <description>
+If items specified:
+Iteration begins at the item located at the
+specified index. First item of the collection has
+index 0.
+If items not specified:
+Iteration begins with index set at the value
+specified.
+ </description>
+ <name>begin</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+If items specified:
+Iteration ends at the item located at the
+specified index (inclusive).
+If items not specified:
+Iteration ends when index reaches the value
+specified.
+ </description>
+ <name>end</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+Iteration will only process every step items of
+the collection, starting with the first one.
+ </description>
+ <name>step</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+current item of the iteration. This scoped
+variable has nested visibility. Its type depends
+on the object of the underlying collection.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+status of the iteration. Object exported is of type
+javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested
+visibility.
+ </description>
+ <name>varStatus</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Iterates over tokens, separated by the supplied delimeters
+ </description>
+ <name>forTokens</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.ForTokensTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+String of tokens to iterate over.
+ </description>
+ <name>items</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description>
+The set of delimiters (the characters that
+separate the tokens in the string).
+ </description>
+ <name>delims</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description>
+Iteration begins at the token located at the
+specified index. First token has index 0.
+ </description>
+ <name>begin</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+Iteration ends at the token located at the
+specified index (inclusive).
+ </description>
+ <name>end</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+Iteration will only process every step tokens
+of the string, starting with the first one.
+ </description>
+ <name>step</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+current item of the iteration. This scoped
+variable has nested visibility.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+status of the iteration. Object exported is of
+type
+javax.servlet.jsp.jstl.core.LoopTag
+Status. This scoped variable has nested
+visibility.
+ </description>
+ <name>varStatus</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Like &lt;%= ... &gt;, but for expressions.
+ </description>
+ <name>out</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.OutTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Expression to be evaluated.
+ </description>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Default value if the resulting value is null.
+ </description>
+ <name>default</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Determines whether characters &lt;,&gt;,&amp;,'," in the
+resulting string should be converted to their
+corresponding character entity codes. Default value is
+true.
+ </description>
+ <name>escapeXml</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+
+ <tag>
+ <description>
+ Subtag of &lt;choose&gt; that follows &lt;when&gt; tags
+ and runs only if all of the prior conditions evaluated to
+ 'false'
+ </description>
+ <name>otherwise</name>
+ <tag-class>org.apache.taglibs.standard.tag.common.core.OtherwiseTag</tag-class>
+ <body-content>JSP</body-content>
+ </tag>
+
+ <tag>
+ <description>
+ Adds a parameter to a containing 'import' tag's URL.
+ </description>
+ <name>param</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.ParamTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Name of the query string parameter.
+ </description>
+ <name>name</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Value of the parameter.
+ </description>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Redirects to a new URL.
+ </description>
+ <name>redirect</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.RedirectTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+The URL of the resource to redirect to.
+ </description>
+ <name>url</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the context when redirecting to a relative URL
+resource that belongs to a foreign context.
+ </description>
+ <name>context</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Removes a scoped variable (from a particular scope, if specified).
+ </description>
+ <name>remove</name>
+ <tag-class>org.apache.taglibs.standard.tag.common.core.RemoveTag</tag-class>
+ <body-content>empty</body-content>
+ <attribute>
+ <description>
+Name of the scoped variable to be removed.
+ </description>
+ <name>var</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope for var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Sets the result of an expression evaluation in a 'scope'
+ </description>
+ <name>set</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.SetTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Name of the exported scoped variable to hold the value
+specified in the action. The type of the scoped variable is
+whatever type the value expression evaluates to.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Expression to be evaluated.
+ </description>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Target object whose property will be set. Must evaluate to
+a JavaBeans object with setter property property, or to a
+java.util.Map object.
+ </description>
+ <name>target</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the property to be set in the target object.
+ </description>
+ <name>property</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope for var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Creates a URL with optional query parameters.
+ </description>
+ <name>url</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.UrlTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+processed url. The type of the scoped variable is
+String.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope for var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+URL to be processed.
+ </description>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the context when specifying a relative URL
+resource that belongs to a foreign context.
+ </description>
+ <name>context</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Subtag of &lt;choose&gt; that includes its body if its
+ condition evalutes to 'true'
+ </description>
+ <name>when</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.WhenTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+The test condition that determines whether or not the
+body content should be processed.
+ </description>
+ <name>test</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>boolean</type>
+ </attribute>
+ </tag>
+
+</taglib>
671 web-app/WEB-INF/tld/fmt.tld
@@ -0,0 +1,671 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ version="2.0">
+
+ <description>JSTL 1.1 i18n-capable formatting library</description>
+ <display-name>JSTL fmt</display-name>
+ <tlib-version>1.1</tlib-version>
+ <short-name>fmt</short-name>
+ <uri>http://java.sun.com/jsp/jstl/fmt</uri>
+
+ <validator>
+ <description>
+ Provides core validation features for JSTL tags.
+ </description>
+ <validator-class>
+ org.apache.taglibs.standard.tlv.JstlFmtTLV
+ </validator-class>
+ </validator>
+
+ <tag>
+ <description>
+ Sets the request character encoding
+ </description>
+ <name>requestEncoding</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.RequestEncodingTag</tag-class>
+ <body-content>empty</body-content>
+ <attribute>
+ <description>
+Name of character encoding to be applied when
+decoding request parameters.
+ </description>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Stores the given locale in the locale configuration variable
+ </description>
+ <name>setLocale</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag</tag-class>
+ <body-content>empty</body-content>
+ <attribute>
+ <description>
+A String value is interpreted as the
+printable representation of a locale, which
+must contain a two-letter (lower-case)
+language code (as defined by ISO-639),
+and may contain a two-letter (upper-case)
+country code (as defined by ISO-3166).
+Language and country codes must be
+separated by hyphen (-) or underscore
+(_).
+ </description>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Vendor- or browser-specific variant.
+See the java.util.Locale javadocs for
+more information on variants.
+ </description>
+ <name>variant</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope of the locale configuration variable.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Specifies the time zone for any time formatting or parsing actions
+ nested in its body
+ </description>
+ <name>timeZone</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.TimeZoneTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+The time zone. A String value is interpreted as
+a time zone ID. This may be one of the time zone
+IDs supported by the Java platform (such as
+"America/Los_Angeles") or a custom time zone
+ID (such as "GMT-8"). See
+java.util.TimeZone for more information on
+supported time zone formats.
+ </description>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Stores the given time zone in the time zone configuration variable
+ </description>
+ <name>setTimeZone</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.SetTimeZoneTag</tag-class>
+ <body-content>empty</body-content>
+ <attribute>
+ <description>
+The time zone. A String value is interpreted as
+a time zone ID. This may be one of the time zone
+IDs supported by the Java platform (such as
+"America/Los_Angeles") or a custom time zone
+ID (such as "GMT-8"). See java.util.TimeZone for
+more information on supported time zone
+formats.
+ </description>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable which
+stores the time zone of type
+java.util.TimeZone.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope of var or the time zone configuration
+variable.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Loads a resource bundle to be used by its tag body
+ </description>
+ <name>bundle</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.BundleTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Resource bundle base name. This is the bundle's
+fully-qualified resource name, which has the same
+form as a fully-qualified class name, that is, it uses
+"." as the package component separator and does not
+have any file type (such as ".class" or ".properties")
+suffix.
+ </description>
+ <name>basename</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Prefix to be prepended to the value of the message
+key of any nested &lt;fmt:message&gt; action.
+ </description>
+ <name>prefix</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Loads a resource bundle and stores it in the named scoped variable or
+ the bundle configuration variable
+ </description>
+ <name>setBundle</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.SetBundleTag</tag-class>
+ <body-content>empty</body-content>
+ <attribute>
+ <description>
+Resource bundle base name. This is the bundle's
+fully-qualified resource name, which has the same
+form as a fully-qualified class name, that is, it uses
+"." as the package component separator and does not
+have any file type (such as ".class" or ".properties")
+suffix.
+ </description>
+ <name>basename</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable which stores
+the i18n localization context of type
+javax.servlet.jsp.jstl.fmt.LocalizationC
+ontext.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope of var or the localization context
+configuration variable.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Maps key to localized message and performs parametric replacement
+ </description>
+ <name>message</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.MessageTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Message key to be looked up.
+ </description>
+ <name>key</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Localization context in whose resource
+bundle the message key is looked up.
+ </description>
+ <name>bundle</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable
+which stores the localized message.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope of var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Supplies an argument for parametric replacement to a containing
+ &lt;message&gt; tag
+ </description>
+ <name>param</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.ParamTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Argument used for parametric replacement.
+ </description>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Formats a numeric value as a number, currency, or percentage
+ </description>
+ <name>formatNumber</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.FormatNumberTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Numeric value to be formatted.
+ </description>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Specifies whether the value is to be
+formatted as number, currency, or
+percentage.
+ </description>
+ <name>type</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Custom formatting pattern.
+ </description>
+ <name>pattern</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+ISO 4217 currency code. Applied only
+when formatting currencies (i.e. if type is
+equal to "currency"); ignored otherwise.
+ </description>
+ <name>currencyCode</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Currency symbol. Applied only when
+formatting currencies (i.e. if type is equal
+to "currency"); ignored otherwise.
+ </description>
+ <name>currencySymbol</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Specifies whether the formatted output
+will contain any grouping separators.
+ </description>
+ <name>groupingUsed</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Maximum number of digits in the integer
+portion of the formatted output.
+ </description>
+ <name>maxIntegerDigits</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Minimum number of digits in the integer
+portion of the formatted output.
+ </description>
+ <name>minIntegerDigits</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Maximum number of digits in the
+fractional portion of the formatted output.
+ </description>
+ <name>maxFractionDigits</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Minimum number of digits in the
+fractional portion of the formatted output.
+ </description>
+ <name>minFractionDigits</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable
+which stores the formatted result as a
+String.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope of var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Parses the string representation of a number, currency, or percentage
+ </description>
+ <name>parseNumber</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.ParseNumberTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+String to be parsed.
+ </description>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Specifies whether the string in the value
+attribute should be parsed as a number,
+currency, or percentage.
+ </description>
+ <name>type</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Custom formatting pattern that determines
+how the string in the value attribute is to be
+parsed.
+ </description>
+ <name>pattern</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Locale whose default formatting pattern (for
+numbers, currencies, or percentages,
+respectively) is to be used during the parse
+operation, or to which the pattern specified
+via the pattern attribute (if present) is
+applied.
+ </description>
+ <name>parseLocale</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Specifies whether just the integer portion of
+the given value should be parsed.
+ </description>
+ <name>integerOnly</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable which
+stores the parsed result (of type
+java.lang.Number).
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope of var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Formats a date and/or time using the supplied styles and pattern
+ </description>
+ <name>formatDate</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag</tag-class>
+ <body-content>empty</body-content>
+ <attribute>
+ <description>
+Date and/or time to be formatted.
+ </description>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Specifies whether the time, the date, or both
+the time and date components of the given
+date are to be formatted.
+ </description>
+ <name>type</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Predefined formatting style for dates. Follows
+the semantics defined in class
+java.text.DateFormat. Applied only
+when formatting a date or both a date and
+time (i.e. if type is missing or is equal to
+"date" or "both"); ignored otherwise.
+ </description>
+ <name>dateStyle</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Predefined formatting style for times. Follows
+the semantics defined in class
+java.text.DateFormat. Applied only
+when formatting a time or both a date and
+time (i.e. if type is equal to "time" or "both");
+ignored otherwise.
+ </description>
+ <name>timeStyle</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Custom formatting style for dates and times.
+ </description>
+ <name>pattern</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Time zone in which to represent the formatted
+time.
+ </description>
+ <name>timeZone</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable which
+stores the formatted result as a String.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope of var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Parses the string representation of a date and/or time
+ </description>
+ <name>parseDate</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.ParseDateTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Date string to be parsed.
+ </description>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Specifies whether the date string in the
+value attribute is supposed to contain a
+time, a date, or both.
+ </description>
+ <name>type</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Predefined formatting style for days
+which determines how the date
+component of the date string is to be
+parsed. Applied only when formatting a
+date or both a date and time (i.e. if type
+is missing or is equal to "date" or "both");
+ignored otherwise.
+ </description>
+ <name>dateStyle</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Predefined formatting styles for times
+which determines how the time
+component in the date string is to be
+parsed. Applied only when formatting a
+time or both a date and time (i.e. if type
+is equal to "time" or "both"); ignored
+otherwise.
+ </description>
+ <name>timeStyle</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Custom formatting pattern which
+determines how the date string is to be
+parsed.
+ </description>
+ <name>pattern</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Time zone in which to interpret any time
+information in the date string.
+ </description>
+ <name>timeZone</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Locale whose predefined formatting styles
+for dates and times are to be used during
+the parse operation, or to which the
+pattern specified via the pattern
+attribute (if present) is applied.
+ </description>
+ <name>parseLocale</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable in
+which the parsing result (of type
+java.util.Date) is stored.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope of var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+</taglib>
550 web-app/WEB-INF/tld/grails.tld
@@ -0,0 +1,550 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ version="2.0">
+ <description>The Grails custom tag library</description>
+ <tlib-version>0.2</tlib-version>
+ <short-name>grails</short-name>
+ <uri>http://grails.codehaus.org/tags</uri>
+
+ <tag>
+ <name>link</name>
+ <tag-class>org.codehaus.groovy.grails.web.taglib.jsp.JspLinkTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <name>action</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>controller</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>id</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>url</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>params</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <dynamic-attributes>true</dynamic-attributes>
+ </tag>
+ <tag>
+ <name>form</name>
+ <tag-class>org.codehaus.groovy.grails.web.taglib.jsp.JspFormTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <name>action</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>controller</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>id</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>url</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>method</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <dynamic-attributes>true</dynamic-attributes>
+ </tag>
+ <tag>
+ <name>select</name>
+ <tag-class>org.codehaus.groovy.grails.web.taglib.jsp.JspSelectTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <name>name</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>optionKey</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>optionValue</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <dynamic-attributes>true</dynamic-attributes>
+ </tag>
+ <tag>
+ <name>datePicker</name>
+ <tag-class>org.codehaus.groovy.grails.web.taglib.jsp.JspDatePickerTag</tag-class>
+ <body-content>empty</body-content>
+ <attribute>
+ <name>name</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>precision</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <dynamic-attributes>false</dynamic-attributes>
+ </tag>
+ <tag>
+ <name>currencySelect</name>
+ <tag-class>org.codehaus.groovy.grails.web.taglib.jsp.JspCurrencySelectTag</tag-class>
+ <body-content>empty</body-content>
+ <attribute>
+ <name>name</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>