Search Results

Search found 4868 results on 195 pages for 'grails validation'.

Page 9/195 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Trouble enabling Grails logging

    - by Dave
    I have this logging configuration in my Config.groovy file. This is a development environment, started as such. I have verified the file exists and there are 775 perms on the file, but nothing is getting output to the file. // set per-environment serverURL stem for creating absolute links environments { production { grails.serverURL = "http://www.changeme.com" } development { grails.serverURL = "http://localhost:8080/${appName}" logFilePath = "/Users/davea/Tomcat/logs/log4j.log" } test { grails.serverURL = "http://localhost:8080/${appName}" } } // log4j configuration log4j = { console name:'Appender1', layout:pattern(conversionPattern: '%-4r [%t] %-5p %c %x - %m%n') rollingFile name:'Appender2', maxFileSize:1024 * 1024, file:logFilePath, layout:pattern(conversionPattern: '%-4r [%t] %-5p %c %x - %m%n') root { debug 'Appender1', 'Appender2' } } Can anyone tell what's wrong with my configuration? Thanks, - Dave

    Read the article

  • Persist url parameter throughout grails app

    - by avelis
    Essentially I am looking to have a url query parameter persist throughout the life of the grails application (POST or GET). ex. http://localhost:8080/demo/controller/action/?myParam=foobar I have tried a couple routes. Dynamic method overriding redirect and customizing application tags for createLink. However, since I also use grails webflows it doesn't quite get every single URL. I also tried using a groovy servlet (groovlet) to capture every URL and append the query parameter. The last attempt hasn't been very successful. Am I missing an obvious component to grails? Am I on the right track? Is there another avenue I haven't explored yet? Thanks in advance

    Read the article

  • Custom Grails Environments?

    - by tinny
    I have been developing several Grails applications over the past couple of years. I am increasingly finding that the three grails environments (dev, test, prod) aren't enough to satisfy my needs. The more "enterprisey" your application gets, the more environments you tend to have. I tend to use 6 environments for my development cycle... DEVA //My dev DEVB //Team mates dev CI_TEST //CI like Hudson QA_TEST //Testing team environment UAT_TEST //Customers testing environment PROD //Production Im wondering if there is a way to define custom Grails environments? I dont think there is, but the feature could be handy. The way I am getting around this right now is by externalising the config to a properties file. Id imagine that this is a pretty common requirement, so how have you been dealing with your environments?

    Read the article

  • Grails application hogging too much memory

    - by RN
    Tomcat 5.5.x and 6.0.x Grails 1.6.x Java 1.6.x OS CentOS 5.x (64bit) VPS Server with memory as 384M export JAVA_OPTS='-Xms128M -Xmx512M -XX:MaxPermSize=1024m' I have created a blank Grails application i.e simply by giving the command grails create-app and then WARed it I am running Tomcat on a VPS Server When I simply start the Tomcat server, with no apps deployed, the free memory is about 236M and used memory is about 156M When I deploy my "blank" application, the memory consumption spikes to 360M and finally the Tomcat instance is killed as soon as it takes up all free memory As you have seen, my app is as light as it can be. Not sure why the memory consumption is as high it is. I am actually troubleshooting a real application, but have narrowed down to this scenario which is easier to share and explain.

    Read the article

  • Grails multi column indexes

    - by Kimble
    Can someone explain how to define multi column indexes in Grails? The documentation is at best sparse. This for example does not seem to work at all: http://grails.org/GORM+Index+definitions I've had some luck with this, but the results seems random at best. Definitions that works in one domain class does not when applied to another (with different names of course). http://www.grails.org/doc/1.1/guide/single.html#5.5.2.6%20Database%20Indices Some working examples and explanations would be highly appreciated!

    Read the article

  • Doing a generic <sql:query> in Grails

    - by melling
    This is a generic way to select data from a table and show the results in an HTML table using JSP taglibs. What is the generic way to do this in Grails? That is, take a few lines of SQL and generate an HTML table from scratch in Grails, including the column names as headers. <sql:query var="results" dataSource="${dsource}" select * from foo </sql:query (# of rows: ${results.rowCount}) <table border="1" <!-- column headers -- <tr bgcolor=cyan <c:forEach var="columnName" items="${results.columnNames}" <th<c:out value="${columnName}"/</th </c:forEach </tr <!-- column data -- <c:forEach var="row" items="${results.rowsByIndex}" <tr <c:forEach var="column" items="${row}" <td<c:out value="${column}"/</td </c:forEach </tr </c:forEach </table The solution to this was answered in another StackOverFlow question. http://stackoverflow.com/questions/425294/sql-database-views-in-grails IF SOMEONE WRITES A GOOD ANSWER, I'LL ACCEPT IT. I would like a 100% acceptance on all of my questions.

    Read the article

  • URL Mapping prefix in Grails

    - by Furuno
    Recently, I'm trying to migrating my application from CakePHP to Grails. So far it's been a smooth sailing, everything I can do with CakePHP, I can do it with much less code in Grails. However, I have one question : In CakePHP, there's an URL Prefix feature that enables you to give prefix to a certain action url, for example, if I have these actions in my controller : PostController admin_add admin_edit admin_delete I can simply access it from the URL : mysite/admin/post/add mysite/admin/post/edit/1 mysite/admin/post/delete/2 instead of: mysite/post/admin_add mysite/post/admin_edit/1 mysite/post/admin_delete/2 Is there anyway to do this in Grails, or at least alternative of doing this?

    Read the article

  • Teamcity and Grails

    - by WaZ
    Hi there, My current requirement is: I have to package my grails app and use teamcity for continuous build. The only problem is the build agents don't have groovy and grails installed (don't ask why) I want to package my app with Groovy and Grails directories and check in Git. So that there is no dependency. And the package has everything to run the app. Can anybody please help. Please let me know if you want me to rephrase my question.

    Read the article

  • Can layouts be chosen by Grails controllers?

    - by maerics
    I'm building a CMS as a learning exercise in Grails and would like to give content managers the ability to choose between different HTML page structures (e.g. 2 column, 3 column, etc). Grails Layouts seem like a logical choice but is it possible for a Grails controller to explicitly name which layout will be used for rendering? Ideally there would be a layout option to the render method, per Ruby on Rails but I don't see anything like it. It seems like it might be possible using the applyLayout method by passing the name of the layout but this requires each GSP page to explicitly request layout (annoying overhead per-page) rather than using Layout by Convention. Any ideas?

    Read the article

  • Performing both client side and server side validation using jQuery and CodeIgniter

    - by Vasu
    What is the right way of doing both client side and server side validation using jQuery and CodeIgniter? I am using the jQuery form plugin for form submit. I would like to use jQuery validation plugin (http://docs.jquery.com/Plugins/Validation) for client side validation and CodeIgniter form validation on the server side. However the two don't seem to gel together (or I am unable to get my head around it). Can someone help please? Whether its a client side validation or server side validation, the user should see consistent UI displaying error messages next to the input fields.

    Read the article

  • For an ORM supporting data validation, should constraints be enforced in the database as well?

    - by Ramnique Singh
    I have always applied constraints at the database level in addition to my (ActiveRecord) models. But I've been wondering if this is really required? A little background I recently had to unit test a basic automated timestamp generation method for a model. Normally, the test would create an instance of the model and save it without validation. But there are other required fields that aren't nullable at the in the table definition, meaning I cant save the instance even if I skip the ActiveRecord validation. So I'm thinking if I should remove such constraints from the db itself, and let the ORM handle them? Possible advantages if I skip constraints in db, imo - Can modify a validation rule in the model, without having to migrate the database. Can skip validation in testing. Possible disadvantage? If its possible that ORM validation fails or is bypassed, howsoever, the database does not check for constraints. What do you think? EDIT In this case, I'm using the Yii Framework, which generates the model from the database, hence database rules are generated also (though I could always write them post-generation myself too).

    Read the article

  • DDD with Grails

    - by Paul
    I cannot find any info about doing Domain Driven Design (DDD) with Grails. I'm looking for any best practices, experience notes or even open source projects that are good examples of DDD with Grails.

    Read the article

  • Externalizing Grails Datasource configuration

    - by miek
    Grails 1.x allows using external configuration files by setting the grails.config.locations directive. Is there a similar approach available for externalizing the database configuration in Datasource.groovy (without setting up JNDI)? It would prove helpful to be able to configure DB credentials in a simple configuration file outside the application. Thanks in advance!

    Read the article

  • PartialResultException when authenticating over LDAP with Acegi and Grails

    - by Benny Hallett
    I'm trying to setup our new Grails application to authenticate via LDAP. From the logs we can see that Acegi is binding to the LDAP store, then is able to find the user given the correct credentials, and finally begins searching for roles. The authentication fails due to a PartialResultException. I'm aware that the default LDAP provider in Acegi has an option to ignore PartialResultExceptions, but I'm not exactly sure how to turn that on in Grails.

    Read the article

  • Custom string formatting in Grails JSON marshaller

    - by ethaler
    I am looking for a way to do some string formatting through Grails JSON conversion, similar to custom formatting dates, which I found in this post. Something like this: import grails.converters.JSON; class BootStrap { def init = { servletContext -> JSON.registerObjectMarshaller(String) { return it?.trim() } } def destroy = { } } I know custom formatting can be done on a per domain class basis, but I am looking for a more global solution.

    Read the article

  • Result set mapping in Grails / GORM

    - by armandino
    I want to map the result of a native SQL query to a simple bean in grails, similar to what the @SqlResultSetMapping annotation does. For example, given a query select x.foo, y.bar, z.baz from //etc... map the result to class FooBarBaz { String foo String bar String baz } Can anyone provide an example of how to do this in grails? Thanks in advance.

    Read the article

  • Grails - attempting to include HTPPBuilder - Linkage error

    - by Stefan Kendall
    When I run grails install-dependency, I get this. java.lang.LinkageError: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException" What's wrong? I've not used grails dependency management before, and this is rather cryptic. repositories { grailsPlugins() grailsHome() mavenLocal() mavenCentral() } dependencies { runtime 'org.codehaus.groovy.modules.http-builder:http-builder:0.5.0' }

    Read the article

  • Grails not executing on IntelliJ (NoClassDefFoundError)

    - by fabien7474
    Hi, I have upgraded my application from grails 1.2.2 to 1.3.1-RC1. While things seem to work when executing grails from command prompt, I cannot make it run from my IDE IntelliJ (last development version). The error I got is: Error executing script RunApp: net/sf/json/JSONException ... Caused by: java.lang.ClassNotFoundException: net.sf.json.JSONException It seems that the library json-lib.jar is not in the IntelliJ classpath. Do you know how can I solve this?

    Read the article

  • Using grails service in domain class

    - by BlackPanther
    In my grails application I want use service.However it is always coming as null.I am using grails 1.1 version.How to solve this problem. Sample code: class A{ String name; def testService; static transients=['testService'] } Can we use service inside domain class?

    Read the article

  • JSON output of a view in Grails

    - by daliz
    Ok, I have a very simple app created in Grails. I have a generated domain class (Person) and its generated controller, using the automatic Grails scaffold: package contacts class PersonController { def scaffold = Person } Now I'd like to get a JSON representation of a Person object. Do I have to change the view or the controller? And how? Thank you.

    Read the article

  • grails set bean value from radio button

    - by Jeff Storey
    I'm somewhat new to grails (not groovy though) and I'm working on a sample CRUD application. The issue I'm trying to solve is how to set a property on a bean based on a radio button before I update it in the database. Is the Form Helper http://www.grails.org/plugin/form-helper plugin the way to go? Will the bean have its value set regardless of if the button is actually clicked by the user or if it is left at its default value? thanks, Jeff

    Read the article

  • Grails benchmarks compared to other web MVC platform (Rails, Django, ASP MVC)?

    - by fabien7474
    I have been searching the web for recent benchmarks measuring Grails overall performance compared to its competitors (Rails, Django, ASP.NET MVC...), but I didn't find anything more recent than a 3 years-old article with obsolete grails version (0.5). See here and here. So, starting from grails 1.2, are there any more recent grails benchmarks you are aware of ? Or do you have your own performance tests for grails (compared to others if possible) ?

    Read the article

  • Protecting melody monitoring with acegi in grails

    - by xain
    Hi, I have a Grails 1.2 app secured with acegi that I'm monitoring with the melody plugin for grails. I need to protect the url so only the "admin" role can access it but I'm having trouble with it - the rest of the acegi rules work just fine. In the BootStrap, I set def secureReqMap = new Requestmap(url: '/monitoring/**', configAttribute:'ROLE_ADMIN').save() Also tried with def secureReqMap = new Requestmap(url: '/monitoring', configAttribute:'ROLE_ADMIN').save() With no luck, it keeps being public. Any hints? Thanks

    Read the article

  • Play Framework custom validation errors with multiple String parameters

    - by Mark
    I'm trying to set a custom validation error with multiple params in Play!, but it seems like my validation parameters are not rendered correctly. I have defined in messages: validation.customerror=This is first param "%s", and this is the second "%s" The in my code I execute: validation.addError("","validation.customerror", "FIRST", "SECOND"); And I get: This is first param "", and this is the second "FIRST" Thoughts?

    Read the article

  • Can Grails output error messages in emacs format?

    - by ataylor
    Ant has a -e option for outputting error messages that can be parsed by emacs' compile command. For example, it is possible to do M-x compile, ant -e, then nagivate to any errors with C-x `. Is it possible to make grails output its compilation errors in this format? Alternatively, is there an emacs variable that can be customized to handle error messages in the format that grails uses?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >