Georgios Valotasios

April 9th, 2012
Quicker JerseyTest

That is a quick one. These days I was playing around with Jersey in order to create a rest web service. The thing is that I would like to test what I create. The good thing is that Jersey provides a testing framework. But...

More →
September 25th, 2011
Get the output of a jsp or servlet response as String

Well, at the first glance the answer to this problem would be to just make an http request to the jsp file and get the output!

More →
September 11th, 2011
Java Decorator pattern example

Ok what the hell is the decorator pattern? Why do I need it?

More →
May 30th, 2011
Grizzly 2 with guice 3

Playing with grizzly and guice. Considering that you already have a ServletModule and and a GuiceServletContextListener defined the above code should do the job.

More →
January 16th, 2011
Resteasy Form annotations for Jersey

Lately I was developing a jax-rs application. What I really like with jaxrs is the way you can handle any kind of parameter values of a request using annotations. So when I need a query parameter I just annotate a field or an argument of a Resource class with @QueryParam("paramName") and the parameter value will get injected for me.

More →
July 8th, 2010
Hibernate, mssql and limit

This is a strange combination. Not the hibernate with mssql (and any kind of sql) but the mssql server and limit clause. Yes Sql Server never supported the limit clause (and will probably never will). Of course there is workarounds for this until the 2005 version came out witch provide as the ROW_NUMBER() function. This can give solution to our problem witch again isn't as elegant as the limit clause used by MySql for example.

More →
June 30th, 2010
Java database connections management

A month ago, I had to do some work on a legacy application. As there is no definition of the "legacy application" expression I refer to an old one where no actual framework has been used for its creation. So there is no any ORM technology here. In that case you have to deal with plain old JDBC.

More →
December 13th, 2009
Grails, the first parts, a long introduction

Inspired by the title of Douglas Crockford book, "Javascript, the good parts" and having to write an introduction on grails as a course for some colleagues, I thought it would be good to just blog about grails and the first steps some one should take.

More →
November 20th, 2009
Grails fileupload without touching the scaffolding actions (kinda)

Well, when I'm prototyping and generally developing with grails I do not want to use generate-all and just edit the generated controllers and gsps. I try to find my way overwriting maybe some actions but not edit them and some or more changes to the scaffold templates.

More →
November 15th, 2009
GroovyServlet on the OSGI

After having static resources get served right with Jetty within an OSGI enviroment you may want to be able to use groovy and more specific some groovlets

More or less the problem is the one that has been described at a previous post. Once again all we have to do is give some more "space" to the groovy.servlet.GroovyServlet to look for our groovlets

More →
October 24th, 2009
Groovy SQL to the resque

The case is an sql table with about 30 columns that I have to query and export some (or all) data. In this case plain csv format should be just fine!

More →
October 11th, 2009
Jetty DefaultServlet on the osgi

Basically when you work on the osgi and want to use a resource, things are not that easy. What I wanted to do is use Jetty embedded on an Osgi container and use it with a simple servlet and a resource.

More →
September 26th, 2009
Server side OSGI with Equinox

Well this is not about OSGi itself but using it at the server side. So assuming that you have some osgi bundle you want to run them on a server. There is many osgi frameworks that you can use but here we are about to use Equinox.

More →
valotas.com v3.6.2 © Georgios Valotasios - CSS inspired by Adam Wathan's blog