grails

Groovy/Grails Float value and HTML5 number input

放肆的年华 提交于 2020-01-23 13:24:06
问题 In Groovy/Grails 2.0 I've got a domain with Float variable ( Float weight = 25.28 for example ). When Grails generates form with corresponding number input field, validation complains about the 25.28 value and will only accept an int value. Could someone illuminate what's going on with that? Thanks in advance. EDIT: In Gails domain object(Double and BigDecimal for the sake of argument): Double weight = 350.26; BigDecimal width = 86.1; Generated html: <input id="weight" type="number" value=

Grails with Spring Security Plugin and Salted Passwords

╄→尐↘猪︶ㄣ 提交于 2020-01-23 12:33:23
问题 I am trying to do salted password hashing in my Grails + Spring Security application. I have used the tutorials on the Grails site, and also ones I found randomly on the Internet. At the moment, I have everything set up according to this tutorial. However I run into a problem when deploying the application with the following bean declaration in resources.groovy : saltSource(cq.MySaltSource) { userPropertyToUse = CH.config.grails.plugins.springsecurity.dao.reflectionSaltSourceProperty } It

Elastic Beanstalk -> RDS connection error using Grails

岁酱吖の 提交于 2020-01-23 12:06:06
问题 I'm deploying a Grails application to Amazon Web Services Elastic Beanstalk and leveraging RDS. I'm using Grails, Spring-Security (RDS tables). The application appears to work fine (login and data in RDS being pulled back). However, from time to time the first time I login I get a database connection error. The second time it (immediately) works fine. The only thing I'm doing slightly different is trying to use Java system properties for the connection string, username and password to

Elastic Beanstalk -> RDS connection error using Grails

别来无恙 提交于 2020-01-23 12:05:10
问题 I'm deploying a Grails application to Amazon Web Services Elastic Beanstalk and leveraging RDS. I'm using Grails, Spring-Security (RDS tables). The application appears to work fine (login and data in RDS being pulled back). However, from time to time the first time I login I get a database connection error. The second time it (immediately) works fine. The only thing I'm doing slightly different is trying to use Java system properties for the connection string, username and password to

Grails Project - Common Java Project Dependency in Eclipse

假装没事ソ 提交于 2020-01-23 06:48:28
问题 All, We have standard java projects that contain our common data model, common util classes, etc... What I can’t seem to figure out is how, to make my Grails project (in Eclipse) have a dependency on the other standard (non Grails) java project in the workspace. When I add the project in the “Java Build Path” the project doesn’t show any compiler errors, but it when I run “Grails Tools -> Refresh Dependencies” or attempt to run the project (run-app) it fails. This seems like it would be a

Grails actions getting called twice. Help!

爷,独闯天下 提交于 2020-01-23 03:20:08
问题 I'm writing a grails app and running into a strange problem. When clicking the submit button on a page, the associated action gets called twice in rapid succession. This causes everything to break horribly. Has anyone else seen this issue before? Below is my code: From the GSP page: <g:form method="post" action="show"> <h2>All items since...</h2> <g:datePicker name="startDate" precision="day" value="${new Date()}" /><br/> <h2>Format</h2> <g:radio name="feedType" value="RSS1" checked="true"/>

Grails: Many-to-Many without hasMany/belongsTo - instead using native 3NF - Searching full text

假如想象 提交于 2020-01-23 02:50:10
问题 I am implementing a many-to-many mapping in grails using 3NF, Not using the hasMany or belongsTo property. Taken from this article it shows and explains quite a lot about its advantages. Article: http://burtbeckwith.com/blog/?p=169 Presentation notes: http://burtbeckwith.com/blog/files/169/gorm%20grails%20meetup%20presentation.pdf I'm trying to make a Tag system onto questions, kind of like this(stackoverflow :)) I can save the Question and the Tags, then save the association with them, but

Grails file upload - how to recognize file and/or content type?

时光怂恿深爱的人放手 提交于 2020-01-22 12:18:07
问题 I'm a Grails beginner, so please be patient with me. Currently I'm having hard times manipulating file uploads. As far as I understand using request.getFile() I can easily get the stream of bytes. But before I do that, I want to check the following: file name of the file being uploaded file size of the file being uploaded content/file type of the file being uploaded How can this be done? Is it even possible before the file is uploaded to the server? I would like to block uploading of large

How to Get Embed URLs for AWS Quicksight Dashboards using Java SDK

佐手、 提交于 2020-01-22 02:50:27
问题 I think I understand all the steps necessary to get the embed URL for an AWS Quicksight dashboard, and I have been able to get a valid URL via the AWS CLI as described in the AWS docs. However, I can't seem to get it to work via the AWS Java SDK (specifically v2). There doesn't seem to be a good example anywhere. Does anyone know of a good working example using Java (or Groovy) preferably using Spring Boot (or Grails 3 or 4)? 回答1: I finally figured it out. Here's a working Groovy/Grails

Grails application hogging too much memory

混江龙づ霸主 提交于 2020-01-21 12:02:27
问题 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 JAVA_OPTS : tried many combinations- including the following export JAVA_OPTS='-Xms128M -Xmx512M -XX:MaxPermSize=1024m' export JAVA_OPTS='-server -Xms128M -Xmx128M -XX:MaxPermSize=256M' (As advised by http://www.grails.org/Deployment) 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