grails

Grails: enterprise level Grails

Hello; I am trying to persuade my boss about using Grails. I tell him it is the most productive way to implement our shopping web site. But he has doubts about its scalability when traffic gets higher and higher. So can you give examples of enterprise level web sites with notable traffic implemented in grails. Also is there anything ...

Avoiding .gsp extention in a GSP Page Without a Controller

Using grails 1.2.1 this should be very simple, but still I can't get it to work. In my application /grails-app/views I've added mypage.gsp Plus "/mypage"(view:"mypage") to the mappings block of my URLMapping class. while http://server-name:8080/myapp/mypage.gsp works I'm still getting 404 - page not found when I try to open h...

Grails custom binding of Edit control with Calendar class

Hi all, I am trying to bind an Edit control with the Calendar object. I referred to the link below and decided to use custom binding. http://grails.1312388.n4.nabble.com/Grails-1-1-1-change-in-binding-date-properties-td1323105.html#a1323105 However the link explains how to bind with Date class as there's a ready CustomDateEditor class...

Do I need to use C3P0 pooling library in my (grails) web application?

Hi, I am not familiar at all with connection pooling library. I've just discovered it through this blog article) and I am not sure that I should use one in my web application based on grails/hibernate/mysql. So my question is simple : in which situations would you suggest to integrate a connection pooling library into a grails applica...

Grails batch insertion

Hi, My requirement needs to insert thousands of records and when inserting each new record it was taking more time to finish the job. Could any one please suggest how to use batches in grails ? thanks in advance, sri ...

[Grails] Can i run a grails war under tomcat ina machine without JDK ( Only JRE ) ?

question: Can i run a grails war under tomcat ina machine without JDK ( Only JRE ) ? i have a grails app that works fine in: grails run war. also in a separate tomcat server in the same computer. when i deploy this .war on a server, That has JDK, i have no problem. when I try to do this in a server that only has JRE, the aplication ...

Grails - Simple hasMany Problem - Using CheckBoxes rather than HTML Select in create.gsp

My problem is this: I want to create a grails domain instance, defining the 'Many' instances of another domain that it has. I have the actual source in a Google Code Project but the following should illustrate the problem. class Person { String name static hasMany[skills:Skill] static constraints = { id (visible:false) s...

Grails fixtures

Hello, I was trying to use fixtures plugin for initial (seed)data loading.. the documentation seems very short.. can anyone give some details about 1. where to define all the data, and in which order 2. how to give complex data type (joda time, currency etc) 3. how to load the fixure data only once for the initial data thanks, ...

Set thread priority for job in grails

I have a job running on a grails app that I need to run with lower priority. Is there a configuration to set that? ...

take performance as the only criterion for a smal site, which framework should I choose on a shared hosting?

Dear friends, I'm trying to set up a small full functional website for a small community on a shared hosting. Scientific computing is quite heavy. Scalability is not important. The only criterion is performance. Which framework would you suggest among the following:(or more) from your list) 1)Ruby on Rails 2) Grails 3) asp.net 4) ...

Grails build-test-data

Hello, Is it advisable to use the build-test-data plugin to load the bootstrap (seed/initial) data for an application. The plugin tutorial is excellent at http://bitbucket.org/tednaleid/grails-test-data/wiki/Home , but only mention about loading test data. There is a section about TestDataConfig , which allows to set default data. But is...

How to make my URL mapping case insensitive?

Grails, by default, is case-sensitive when mapping URL to controller actions or views. For instance, www.mywebsite.com/book/list will work BUT www.mywebsite.com/Book/list will return a 404 page. What can I do (code snippets are welcomed) to make my URL case-insensitive (i.e. www.mywebsite.com/Book/list being a valid url) ? ...

Grails domain class initialization

Hi, My Grails app has the following Spring bean defined in spring/resources.groovy calendarService(CalendarService) { bean -> bean.initMethod = "init" } This method looks something like: class CalendarService { void init() { User.findByEmail("[email protected]") } } When I call the dynamic finder findByEmail ...

Change or create URL mapping dynamically in Grails

How can i modify the Url mappings in Grails dynamically? Let's say I have this in my UrlMappings.groovy: "/"(controller:'home') At some point or event in the app, I want to change it to: "/"(controller:'url') Is this possible? Thanks! ...

Log user authentication in grails/acegi

Hi, where can I put a println in order to register a user's successful authentication in grails using acegi ? Thanks ...

Grails + Spring Security one field login

Hi all Is it possible, using spring security plugin 0.5.3 with Grails 1.2.1, to authenticate a user using only one field? I mean, for example, making j_username and j_password fields in the authentication form equal previous to the authentication. I read it was possible to define j_username field in Config.groovy with acegi plugin, in o...

Grails: Dynamically inject service in domain class

I need to inject a service based on domain property, so far I came up with the following: ApplicationHolder.application.getServiceClass("package.${property}Service").clazz but loading it this way doesn't inject it's dependent services. Am I doing it wrong? ...

Grails - getting a message value from controller

How can I get a value from message properties outside of GSPs? For instance, the equivalent of <g:message code="some.message"/> but in a controller? ...

grails gsp test evaluates to false, but block is still rendered. Why?

I'm baffled with Grails test operator. This expression: <g:if test="${!(preferences.displayOption.equals('ANA') || preferences.displayOption.equals('FLOP'))} "> ${!(preferences.displayOption.equals('ANA') || preferences.displayOption.equals('FLOP'))} </g:if> prints false How can that be? I'm printing the exact same condition I...

How to get the list of values for g:select from controller action?

Get the list of values for g:select from controller action. ...