So I recently had need to package up a Spring Roo Java application so that it could be run by someone else remotely. Now most SpringRoo apps I know are web apps - deployed as WAR files to a web server like Tomcat. But I was asked to make sure it ran from the command line. The main problem I had was that all my third party jar files are stored in my local Maven repository.
java
REST client in Spring
So, how do we create a REST client in a Spring based java application. It's easy, isn't it? All you do is make an http connection and read the results. Well, not quite. In this example I use a simple call to http://realurl.org as an example.
Spring Roo Tutorial: LongURL, Part 2
So in my last article in this series I talked about creating a basic REST server with Spring Roo. Here I start running the server and testing it.
Spring Roo
For some time now I have been impressed with a tool called Spring Roo. This helps me create Java applications with the Spring Framework. Here are some of the articles I have written about it.
Java
This page will hopefully let you find all the other Java articles on the website.... This is a work in progress
Spring Roo In Action MEAP
I have received a review copy of "Spring Roo In Action" which is an Early Access e-book from Manning ( http://www.manning.com/rimple/ )
It will be interesting to compare this to the Spring Roo cookbook which I reviewed earlier this year.
Spring Roo Tutorial: LongURL, Part 1
A little while back I needed to create a simple server to supply some information to some local machines, and cache that information. I realised that it was probably a project I could use Spring Roo to great effect, and that it was simple enough to provide the basis for a tutorial. Here is that Tutorial
Java and XML
This article is kind of like "Meta Research". I'm not going to tell you how to process XML in Java, I'm just going to point you at some other cool tutorials which do. These are all by Lars Vogel. I strongly recommend his training material for its clarity.
Since the dawn of time (well since I started to process XML) there have been two styles of loading XML, and one main style of writing it. You either loaded up the whole file into memory (through "DOM" - the Document Object Model), or if you were fancy, or worried about running out of memory, you used SAX - the amusingly named "Simple API for XML".
Well I was interested to read Lars Vogel say "Both DOM and Sax are older API's and I recommend not to use them anymore.". He is of course saying that a number of techniques introduced in JDK 1.5 and 1.6 are now better than the old ways.
Spring Roo Add Ons: Typical Security
Spring Roo Add Ons: Typical Security
The idea behind Spring Roo is that you tell it what you want, and it gives you a Java and Spring framework for developing such a tool. Typically the app you are building is a website (though it doesn't have to be).
One of the most common features of a web application framework is some kind of role based permissioning mechanism. As well as the ability to store users details, we also want to store jobs (or "Roles") that users might do, and record which users are authorised for which roles.