In one of my project, My front end application runs on one server and back end application runs on another. Both application have to communicate with each other through SSL(Secure Sockets Layer). SSL is a way to secure internet communication from your browser to a secure website. The websites using SSL will have https:// to […]
All of the tasks performed by us after system startup such as opening a browser, MySql etc can be automated by following the steps mentioned below : 1. Write a script:- [bash] sleep 1m;gnome-terminal –geometry=150×50 –tab –title="echo" -e "bash -c \"echo "hello";echo "there";exec bash\"" –tab –title="idea" -e "bash -c \"/opt/idea-IU-111.69/bin/idea.sh;exec bash\"" –tab –title="sql" -e "bash […]
While working on my project using Grails 2.0.3, I was getting java.lang.OutOfMemoryError with grails run-war even when my JAVA_OPTS are set. Then while going through documentation and this thread i found how to set jvm args for grails run-war. Just add this code in your BuildConfig.groovy and you are done. [code] grails.tomcat.jvmArgs = ["-Xms256m", "-Xmx1024m"][/code] […]
For pagination we generally execute two query ,first for geting resultset by using limit in sql query and second to count the total no. of records . For total no. of records we again execute the same query with count(*). You would need two queries like these: [java] SELECT COUNT(*) FROM author WHERE name LIKE […]
I was going through the source code of one of the Grails Plugins where I found the use of Spring’s BeanDefinitionRegistryPostProcessor to override some configurations that are available in DataSource.groovy. That involved a complete over riding of a PropertyValue definition. It set me thinking about whether there is a way to override bean properties […]
Here we are going to talk about a scenario where there are some records in database which are specific to locale and they need to be displayed as per user’s current locale at number of places.Also user can change its preferred locale. For this I preferred to set the user’s locale in the session object. […]
Last night I had to restore file with size greater than 220GB from our backup FTP server to our main server after OS re installation. Now I could have simply done “get” after logging into ftp out server, but that would have required my machine to stay awake all night unattended. Seems simple but everything […]
Many of Grails plugin like searchable and console can prove to be really dangerous if access to their URLs is not blocked. After adding searchable plugin to my project, I realized that access to its controllers was not defined and was open for all. Now this was a major security concern. There are many ways […]