Archive for the ‘Java’ Category
Google App Engine for Java: CRUD Operations with JDO and Spring MVC
In a prior post, I provided and introduction to GAE for Java including getting your local development environment setup and uploading your application to Google’s servers.
For this post, I will outline how to do simple CRUD operations using GAE for Java and the latest version of Spring MVC (which is 3.0.0.M3). Combining GAE for Java and the Spring MVC framework makes for a powerful way of making your application both flexible and scalable.
Datastore Options with Google App Engine for Java
The basis for just about any web application generally includes a data store for storing information. Instead of a relational database like MySQL or Oracle, Google uses something called BigTable. For an explanation about how BigTable differs from a traditional relational database, you should check out “The Softer Side of Schemas” video from the Google I/O 2009 conference. With respect to GAE for java, you have essentially three different ways to interact with BigTable:
- JPA – Java Peristence API
- JDO – Java Data Objects
- Low level API – provided by Google for doing stuff that you can’t otherwise do with JPA or JDO. Note that both JPA and JDO use this low-level API under the covers.
JSTL Expressions Not Working in Google App Engine Solution
If your JSTL expressions aren’t working with GAE for Java, try this quick fix. In your page directive, add isELIgnored=”false”. For example:
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
Silent Install of JDK and JRE
This week I had a requirement for scripting the installation of the Java 5 JDK and JRE. These instructions require separate install files for the JDK and JRE but will get the job done.
For the JDK, you can place the following in a *.bat file and simply run it from command line:
@echo off
echo Installing JDK...
start /w C:\temp\jdk-1_5_0_12-windows-i586-p.exe /s /v"/qn INSTALLDIR=d:\bin\Java\jdk1.5.0_12 REBOOT=Suppress"
For the JRE:
@echo off
echo Installing JRE...
start /w C:\temp\jre-1_5_0_12-windows-i586-p.exe /s INSTALLDIR=d:\bin\Java\jre1.5.0_12 REBOOT=Suppress
Some related links: