Archive for the 'Java' Category

Nov 08 2009

Hudson setup on CentOS

Published by tom under Hudson, Java

I was trying to setup Hudson on a CentOS server and I ran into a problem with OpenJDK not working with the captcha when registering users.

So I stumbled on my Joe’s article Configuring a Production Open BlueDragon Server. As a side note and I were in the same Pascal programming class in high school.

Post to Twitter Tweet This Post

No responses yet

Oct 06 2009

Returning List in JAXB

Published by tom under Java

I was trying to figure out how to return a list in a response in JAXB. The answer was here

Here’s a code snip


@GET
public Response getProducts(@QueryParam("active")String active,@QueryParam("family")String family,@Context UriInfo ui) {
Response r = null;
try {
List products = getProducts(active,family);
if (products.size() == 0) {
r = Response.status(404).build();
} else {
GenericEntity> genericProducts = new GenericEntity>(products) {};
r = Response.ok().entity(genericProducts).build();
}
} catch (Exception e) {
throwInternalServerError(e);
}
return r;
}

Post to Twitter Tweet This Post

No responses yet