Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updates to petclinic app-engine sample to use AppEngine

  • Loading branch information...
commit 09dfbe212d17378f71cb5d0d3cb5b2d34a84ee29 1 parent fd3cc14
@graemerocher graemerocher authored
Showing with 131 additions and 176 deletions.
  1. +1 −1  JSP21.iml
  2. +4 −3 grails.ipr
  3. +8 −6 samples/petclinic-appengine/application.properties
  4. +8 −15 samples/petclinic-appengine/grails-app/conf/BootStrap.groovy
  5. +1 −3 samples/petclinic-appengine/grails-app/conf/datastore-indexes.xml
  6. +0 −15 samples/petclinic-appengine/grails-app/conf/jdoconfig.xml
  7. +1 −3 samples/petclinic-appengine/grails-app/controllers/org/grails/samples/ClinicController.groovy
  8. +21 −21 samples/petclinic-appengine/grails-app/controllers/org/grails/samples/OwnerController.groovy
  9. +29 −27 samples/petclinic-appengine/grails-app/controllers/org/grails/samples/PetController.groovy
  10. +7 −16 samples/petclinic-appengine/grails-app/domain/org/grails/samples/Owner.groovy
  11. +9 −13 samples/petclinic-appengine/grails-app/domain/org/grails/samples/Pet.groovy
  12. +5 −8 samples/petclinic-appengine/grails-app/domain/org/grails/samples/PetType.groovy
  13. +6 −8 samples/petclinic-appengine/grails-app/domain/org/grails/samples/Speciality.groovy
  14. +6 −10 samples/petclinic-appengine/grails-app/domain/org/grails/samples/Vet.groovy
  15. +5 −9 samples/petclinic-appengine/grails-app/domain/org/grails/samples/Visit.groovy
  16. +3 −3 samples/petclinic-appengine/grails-app/views/owner/add.gsp
  17. +5 −5 samples/petclinic-appengine/grails-app/views/owner/show.gsp
  18. +10 −8 samples/petclinic-appengine/grails-app/views/pet/add.gsp
  19. +1 −1  samples/petclinic-appengine/src/templates/war/web.xml
  20. +1 −1  samples/petclinic-appengine/web-app/WEB-INF/applicationContext.xml
View
2  JSP21.iml
@@ -10,7 +10,7 @@
<content url="file://$MODULE_DIR$/src/jsp21">
<sourceFolder url="file://$MODULE_DIR$/src/jsp21" isTestSource="false" />
</content>
- <orderEntry type="inheritedJdk" />
+ <orderEntry type="jdk" jdkName="1.6" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library>
View
7 grails.ipr
@@ -512,12 +512,11 @@
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/antlr-2.7.6.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/cglib-nodep-2.1_3.jar!/" />
- <root url="jar://$PROJECT_DIR$/lib/oscache-2.4.1.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/jta-1.1.jar!/" />
- <root url="jar://$PROJECT_DIR$/lib/javassist-3.4.GA.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/hibernate-core-3.3.1.GA.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/hibernate-annotations-3.4.0.GA.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/hibernate-commons-annotations-3.3.0.ga.jar!/" />
+ <root url="jar://$PROJECT_DIR$/lib/javassist-3.8.0.GA.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
@@ -594,7 +593,9 @@
<root url="jar://$PROJECT_DIR$/lib/groovy-all-1.6.5.jar!/" />
</CLASSES>
<JAVADOC />
- <SOURCES />
+ <SOURCES>
+ <root url="file://$PROJECT_DIR$/../../../../groovy-dev/releases/groovy-1.6.4/src/main" />
+ </SOURCES>
</library>
<library name="GParallelizer">
<CLASSES>
View
14 samples/petclinic-appengine/application.properties
@@ -1,7 +1,9 @@
-#utf-8
-#Thu May 07 16:06:33 BST 2009
-app.version=7
-app.servlet.version=2.4
-app.grails.version=1.2-M1
-plugins.app-engine=0.8.2
+#Grails Metadata file
+#Fri Nov 20 14:38:31 CET 2009
+app.grails.version=1.2.0.BUILD-SNAPSHOT
app.name=petclinic
+app.servlet.version=2.4
+app.version=12
+appengine.persistence=jpa
+plugins.app-engine=0.8.6
+plugins.gorm-jpa=0.6
View
23 samples/petclinic-appengine/grails-app/conf/BootStrap.groovy
@@ -2,36 +2,29 @@ import org.grails.samples.*
class BootStrap {
- def persistenceManagerFactory
def init = { servletContext ->
- def persistenceManager = persistenceManagerFactory.getPersistenceManager()
-
- def query = persistenceManager.newQuery(Speciality)
- query.setResult("count(name)")
- def count = query.execute()
+ def count = Speciality.count()
if(!count) {
- persistenceManager.makePersistent( new Vet(firstName:"James", lastName:"Carter") )
+ new Vet(firstName:"James", lastName:"Carter").save()
def v1 = new Vet(firstName:"Helen", lastName:"Leary")
v1.specialities << new Speciality(name:"radiology")
- persistenceManager.makePersistent( v1 )
+ v1.save()
def v2 = new Vet(firstName:"Linda", lastName:"Douglas")
v2.specialities << new Speciality(name:"surgery")
v2.specialities << new Speciality(name:"dentistry")
- persistenceManager.makePersistent(v2)
+ v2.save()
def v3 = new Vet(firstName:"Rafael", lastName:"Ortega")
v3.specialities << new Speciality(name:"surgery")
- persistenceManager.makePersistent(v3)
+ v3.save()
def v4 = new Vet(firstName:"Henry", lastName:"Stevens")
v4.specialities << new Speciality(name:"radiology")
- persistenceManager.makePersistent( v4 )
- persistenceManager.makePersistent( new Vet(firstName:"Sharon", lastName:"Jenkins") )
+ v4.save()
+ new Vet(firstName:"Sharon", lastName:"Jenkins").save()
['dog', 'lizard','cat', 'snake','bird', 'hamster'].each {
- persistenceManager.makePersistent(new PetType(name:it))
+ new PetType(name:it).save(flush:true)
}
-
- persistenceManager.close()
}
View
4 samples/petclinic-appengine/grails-app/conf/datastore-indexes.xml
@@ -1,5 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
-<datastore-indexes
- xmlns="http://appengine.google.com/ns/datastore-indexes/1.0"
- autoGenerate="true">
+<datastore-indexes autoGenerate="true" xmlns="http://appengine.google.com/ns/datastore-indexes/1.0">
</datastore-indexes>
View
15 samples/petclinic-appengine/grails-app/conf/jdoconfig.xml
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">
-
- <persistence-manager-factory name="transactions-optional">
- <property name="javax.jdo.PersistenceManagerFactoryClass"
- value="org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory"/>
- <property name="javax.jdo.option.ConnectionURL" value="appengine"/>
- <property name="javax.jdo.option.NontransactionalRead" value="true"/>
- <property name="javax.jdo.option.NontransactionalWrite" value="true"/>
- <property name="javax.jdo.option.RetainValues" value="true"/>
- <property name="datanucleus.appengine.autoCreateDatastoreTxns" value="true"/>
- </persistence-manager-factory>
-</jdoconfig>
View
4 ...les/petclinic-appengine/grails-app/controllers/org/grails/samples/ClinicController.groovy
@@ -4,10 +4,8 @@ class ClinicController {
def index = {}
- def persistenceManager
def vets = {
- def query = persistenceManager.newQuery(Vet)
- [vets: query.execute() ]
+ [vets: Vet.list() ]
}
}
View
42 samples/petclinic-appengine/grails-app/controllers/org/grails/samples/OwnerController.groovy
@@ -3,8 +3,6 @@ package org.grails.samples
import com.google.appengine.api.datastore.*
class OwnerController {
-
- def persistenceManager
def add = {
if(request.method == 'GET') {
@@ -13,8 +11,10 @@ class OwnerController {
else {
def owner = new Owner(params['owner'])
if(owner.validate()) {
- persistenceManager.makePersistent(owner)
- redirect action:'show', id:owner.key.id
+ Owner.withTransaction {
+ owner.save()
+ }
+ redirect action:'show', id:owner.id.id
}
else {
render view:'add', model:[ownerBean:owner]
@@ -23,8 +23,7 @@ class OwnerController {
}
def show = {
- Key k = KeyFactory.createKey(Owner.simpleName, params.id.toInteger())
- def owner = persistenceManager.getObjectById(Owner, k)
+ def owner = Owner.get(params.id.toLong())
if(owner)
[ownerBean:owner]
else
@@ -32,35 +31,36 @@ class OwnerController {
}
def edit = {
- Key k = KeyFactory.createKey(Owner.simpleName, params.id.toInteger())
- def owner = persistenceManager.getObjectById(Owner, k)
- owner = persistenceManager.detachCopy(owner)
+ def owner = Owner.get(params.id)
if(request.method == 'GET') {
render view:'add',model:[ownerBean: owner]
}
else {
- owner.properties = params['owner']
- if(owner.validate()) {
- persistenceManager.makePersistent owner
- redirect action:'show', id:owner.key.id
- }
- else {
- render view:'add', model:[ownerBean: owner]
+ Owner.withTransaction { status ->
+ owner.properties = params['owner']
+ if(owner.validate()) {
+ owner.save()
+ redirect action:'show', id:owner.key.id
+ }
+ else {
+ status.setRollbackOnly()
+ render view:'add', model:[ownerBean: owner]
+ }
}
+
}
}
def find = {
+ println "LIST = ${Owner.list().lastName}"
if(request.method == 'POST') {
- def query = persistenceManager.newQuery(Owner)
- query.setFilter("lastName == lastNameParam")
- query.declareParameters("String lastNameParam")
- def owners = query.execute(params.lastName?.trim())
+
+ def owners = Owner.findAllByLastName(params.lastName)
if(owners) {
if(owners.size()>1)
render view:'selection', model:[owners:owners]
else
- redirect action:'show', id:owners[0].key.id
+ redirect action:'show', id:owners[0].id.id
}
else {
[message:'owners.not.found']
View
56 samples/petclinic-appengine/grails-app/controllers/org/grails/samples/PetController.groovy
@@ -3,66 +3,68 @@ package org.grails.samples;
import com.google.appengine.api.datastore.*
class PetController {
-
- def persistenceManager
def add = {
if(request.method == 'GET') {
def p = new Pet()
if(params['owner']?.id) {
- Key k = KeyFactory.createKey(Owner.simpleName, params['owner']?.id.toInteger())
- p.owner = persistenceManager.getObjectById(Owner, k)
+ p.owner = Owner.get(params['owner']?.id)
}
- [pet: p, types: persistenceManager.newQuery(PetType).execute() ]
+ [pet: p, types: PetType.list() ]
}
else {
- def pet = new Pet(params['pet'])
- Key k = KeyFactory.createKey(Owner.simpleName, params.'pet.owner.id'.toInteger())
- def owner = persistenceManager.getObjectById(Owner, k)
+
+ def args = params['pet']
+ def owner = Owner.get(args.remove('owner.id'))
+ def type = PetType.get(args.remove('type.id'))
+ def pet = new Pet(args)
+
pet.owner = owner
+ pet.type = type
if(pet.validate()) {
owner.pets << pet
- persistenceManager.makePersistent(pet)
- redirect controller:'owner',action:'show', id:pet.owner.key.id
+ pet.save flush:true
+ redirect controller:'owner',action:'show', id:pet.owner.id.id
}
else {
- render view:'add', model: [pet: pet, types: persistenceManager.newQuery(PetType).execute() ]
+ render view:'add', model: [pet: pet, types: PetType.list() ]
}
}
}
def edit = {
- Key k = KeyFactory.createKey(Pet.simpleName, params.id.toInteger())
if(request.method == 'GET') {
- render view:'add',model:[pet: persistenceManager.getObjectById(Pet, k),
- types: persistenceManager.newQuery(PetType).execute() ]
+ render view:'add',model:[pet: Pet.get(params.id.toLong()),
+ types: PetType.list() ]
}
else {
- def pet = persistenceManager.getObjectById(Pet, k)
- pet.properties = params['pet']
- if(pet.validate()) {
- persistenceManager.makePersistent pet
- redirect controller:'owner', action:'show', id:pet.owner.key.id
- }
- else {
- persistenceManager.evict(pet)
- render view:'add', model:[pet: pet, types: persistenceManager.newQuery(PetType).execute() ]
+ Pet.withTransaction { status ->
+ def pet = Pet.get(params.id)
+ pet.properties = params['pet']
+ if(pet.validate()) {
+ pet.save()
+ redirect controller:'owner', action:'show', id:pet.owner.key.id
+ }
+ else {
+ status.setRollbackOnly()
+ render view:'add', model:[pet: pet, types: PetType.list() ]
+ }
}
}
}
def addVisit = {
- Key k = KeyFactory.createKey(Pet.simpleName, params.'visit.pet.id' ? params.'visit.pet.id'.toInteger() : params.id.toInteger())
+ def id = params.'visit.pet.id' ? params.'visit.pet.id'.toInteger() : params.id.toInteger()
if(request.method == 'GET') {
- [visit: new Visit(pet: persistenceManager.getObjectById(Pet, k))]
+ [visit: new Visit(pet: Pet.get(id))]
}
else {
def visit = new Visit(params['visit'])
- def pet = persistenceManager.getObjectById(Pet, k)
+ def pet = Pet.get(id)
visit.pet = pet
if(visit.validate()) {
- persistenceManager.makePersistent visit
+ visit.save flush:true
pet.visits << visit
redirect controller:'owner', action:'show', id:visit.pet.owner.key.id
}
View
23 samples/petclinic-appengine/grails-app/domain/org/grails/samples/Owner.groovy
@@ -1,41 +1,32 @@
package org.grails.samples;
-import javax.jdo.annotations.*
+import javax.persistence.*
import com.google.appengine.api.datastore.Key;
/**
* Simple domain object representing an owner.
*
* @author Graeme Rocher
*/
-@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable="true")
+@Entity
class Owner {
- @PrimaryKey
- @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
- Key key
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ Key id
- @Persistent
String firstName
-
- @Persistent
String lastName
-
- @Persistent
String address
-
- @Persistent
String city
-
- @Persistent
String telephone
- @Persistent(mappedBy = "owner")
+ @OneToMany(mappedBy = "owner")
List<Pet> pets = new ArrayList<Pet>()
static constraints = {
- key nullable:true
firstName blank:false
lastName blank:false
address blank:false
View
22 samples/petclinic-appengine/grails-app/domain/org/grails/samples/Pet.groovy
@@ -1,37 +1,33 @@
package org.grails.samples;
-import javax.jdo.annotations.*
+import javax.persistence.*
import com.google.appengine.api.datastore.Key;
/**
* Simple domain object representing a pet.
*
* @author Graeme Rocher
*/
-@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable="true")
+@Entity
class Pet {
- @PrimaryKey
- @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
- Key key
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ Key id
- @Persistent
String name
-
- @Persistent
Date birthDate
-
- @Persistent
+
+ @OneToOne
PetType type
- @Persistent
+ @ManyToOne
Owner owner
- @Persistent(mappedBy = "pet")
+ @OneToMany(mappedBy = "pet")
List<Visit> visits = new ArrayList<Visit>()
static constraints = {
- key nullable:true
name blank:false, validator: { val, obj ->
if(!obj.id && obj.owner?.pets?.find { it.name == val } ) return "pet.duplicate"
}
View
13 samples/petclinic-appengine/grails-app/domain/org/grails/samples/PetType.groovy
@@ -1,23 +1,20 @@
package org.grails.samples;
-import javax.jdo.annotations.*
+import javax.persistence.*
import com.google.appengine.api.datastore.Key;
/**
* @author Graeme Rocher
*/
-@PersistenceCapable(identityType = IdentityType.APPLICATION)
+@Entity
class PetType {
- @PrimaryKey
- @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
- Key key
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ Key id
-
- @Persistent
String name
static constraints = {
name blank:false
- key nullable:true
}
}
View
14 samples/petclinic-appengine/grails-app/domain/org/grails/samples/Speciality.groovy
@@ -1,27 +1,25 @@
package org.grails.samples;
-import javax.jdo.annotations.*
+import javax.persistence.*
import com.google.appengine.api.datastore.Key;
/**
* @author Graeme Rocher
*/
-@PersistenceCapable(identityType = IdentityType.APPLICATION)
+@Entity
class Speciality {
- @PrimaryKey
- @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
- Key key
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ Key id
- @Persistent
String name
- @Persistent
+ @ManyToOne
Vet vet
static constraints = {
name blank:false
- key nullable:true
}
}
View
16 samples/petclinic-appengine/grails-app/domain/org/grails/samples/Vet.groovy
@@ -1,29 +1,25 @@
package org.grails.samples;
-import javax.jdo.annotations.*
+import javax.persistence.*
import com.google.appengine.api.datastore.Key;
/**
* @author Graeme Rocher
*/
-@PersistenceCapable(identityType = IdentityType.APPLICATION)
+@Entity
class Vet {
- @PrimaryKey
- @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
- Key key
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ Key id
- @Persistent
String firstName
-
- @Persistent
String lastName
- @Persistent(mappedBy = "vet")
+ @OneToMany(mappedBy = "vet")
List<Speciality> specialities = new ArrayList<Speciality>()
static constraints = {
- key nullable:true
firstName blank:false
lastName blank:false
View
14 samples/petclinic-appengine/grails-app/domain/org/grails/samples/Visit.groovy
@@ -1,35 +1,31 @@
package org.grails.samples
-import javax.jdo.annotations.*
+import javax.persistence.*
import com.google.appengine.api.datastore.Key;
/**
* Simple domain object representing a visit.
*
* @author Graeme Rocher
*/
-@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable="true")
+@Entity
class Visit {
- @PrimaryKey
- @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
- Key key
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ Key id
/** Holds value of property date. */
- @Persistent
Date date = new Date()
/** Holds value of property description. */
- @Persistent
String description
/** Holds value of property pet. */
- @Persistent
Pet pet
static constraints = {
description blank:false
- key nullable:true
}
}
View
6 samples/petclinic-appengine/grails-app/views/owner/add.gsp
@@ -7,8 +7,8 @@
</head>
<body id="add">
- <h2><g:if test="${!ownerBean.key}">New </g:if>Owner:</h2>
- <g:form action="${ ownerBean.key ? 'edit' : 'add'}" id="${ownerBean?.key?.id}">
+ <h2><g:if test="${!ownerBean.id}">New </g:if>Owner:</h2>
+ <g:form action="${ ownerBean.id ? 'edit' : 'add'}" id="${ownerBean?.id}">
<table>
<tr>
<th>
@@ -43,7 +43,7 @@
</tr>
<tr>
<td>
- <p class="submit"><input type="submit" value="${ ownerBean?.key ? 'Update' : 'Add'} Owner"/></p>
+ <p class="submit"><input type="submit" value="${ ownerBean?.id ? 'Update' : 'Add'} Owner"/></p>
</td>
</tr>
</table>
View
10 samples/petclinic-appengine/grails-app/views/owner/show.gsp
@@ -30,13 +30,13 @@
<table class="table-buttons">
<tr>
<td colspan="2" align="center">
- <g:form method="GET" url="[action:'edit', id:ownerBean.key.id]">
+ <g:form method="GET" url="[action:'edit', id:ownerBean.id.id]">
<p class="submit"><input type="submit" value="Edit Owner"/></p>
</g:form>
</td>
<td>
<g:form method="GET" url="[controller:'pet', action:'add']" name="formAddPet">
- <input type="hidden" name="owner.id" value="${ownerBean.key.id}"/>
+ <input type="hidden" name="owner.id" value="${ownerBean.id.id}"/>
<p class="submit"><input type="submit" value="Add New Pet"/></p>
</g:form>
</td>
@@ -60,7 +60,7 @@
</tr>
<tr>
<th>Type</th>
- <td>${pet.type.name}</td>
+ <td>${pet.type?.name}</td>
</tr>
</table>
</td>
@@ -85,13 +85,13 @@
<table class="table-buttons">
<tr>
<td>
- <g:form method="GET" url="[controller:'pet', action:'edit', id:pet.key.id]"
+ <g:form method="GET" url="[controller:'pet', action:'edit', id:pet.id.id]"
name="formEditPet${pet.id}">
<p class="submit"><input type="submit" value="Edit Pet"/></p>
</g:form>
</td>
<td>
- <g:form method="GET" url="[controller:'pet', action:'addVisit', id:pet.key.id]"
+ <g:form method="GET" url="[controller:'pet', action:'addVisit', id:pet.id.id]"
name="formVisitPet${pet.id}">
<p class="submit"><input type="submit" value="Add Visit"/></p>
</g:form>
View
18 samples/petclinic-appengine/grails-app/views/pet/add.gsp
@@ -3,19 +3,21 @@
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta name="layout" content="main">
- <title>${ !pet.id ? 'Add' : 'Update'} Pet</title>
+ <title>${ !pet?.id ? 'Add' : 'Update'} Pet</title>
</head>
<body id="add">
- <h2><g:if test="${!pet.key}">New </g:if>Pet</h2>
+ <h2><g:if test="${!pet?.id}">New </g:if>Pet</h2>
<b>Owner:</b> ${pet.owner?.firstName} ${pet.owner?.lastName}
<br/>
+
+ <g:renderErrors bean="${pet}"></g:renderErrors>
- <g:form action="${pet.key ? 'edit' : 'add'}">
- <g:if test="${pet.key}">
- <g:hiddenField name="id" value="${pet.key.id}" />
+ <g:form action="${pet?.id ? 'edit' : 'add'}">
+ <g:if test="${pet?.id}">
+ <g:hiddenField name="id" value="${pet.id.id}" />
</g:if>
- <g:hiddenField name="pet.owner.id" value="${pet.owner.key.id}"></g:hiddenField>
+ <g:hiddenField name="pet.owner.id" value="${pet.owner.id.id}"></g:hiddenField>
<table>
<tr>
<th>
@@ -35,7 +37,7 @@
<th>
Type: <span class="errors"><g:fieldError bean="${pet}" field="type" /></span>
<br/>
- <g:select optionKey="${{it.key.id}}"
+ <g:select optionKey="${{it.id.id}}"
optionValue="name"
name="pet.type.id"
from="${types}"
@@ -44,7 +46,7 @@
</tr>
<tr>
<td>
- <p class="submit"><input type="submit" value="${pet.key ? 'Update' : 'Add' } Pet"/></p>
+ <p class="submit"><input type="submit" value="${pet?.id ? 'Update' : 'Add' } Pet"/></p>
</td>
</tr>
</table>
View
2  samples/petclinic-appengine/src/templates/war/web.xml
@@ -68,7 +68,7 @@
<servlet-mapping>
<servlet-name>gsp</servlet-name>
<url-pattern>*.gsp</url-pattern>
- </servlet-mapping>
+ </servlet-mapping>
<jsp-config>
<taglib>
View
2  samples/petclinic-appengine/web-app/WEB-INF/applicationContext.xml
@@ -34,7 +34,7 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schem
<bean id="grailsResourceHolder" scope="prototype" class="org.codehaus.groovy.grails.commons.spring.GrailsResourceHolder">
<property name="resources">
- <value>classpath*:**/grails-app/**/*.groovy</value>
+ <value>/WEB-INF/**/grails-app/**/*.groovy</value>
</property>
</bean>
Please sign in to comment.
Something went wrong with that request. Please try again.