Archive for November, 2014

Hello peoples,

Now that I am graduated, as mentioned in previous post, I am working on a project for my university. Well… today I also started working on one of my own projects again, the WordPress OAuth plugin. I am extending the plugin with features like sorting of buttons, and separating the OAuth code from the general code, to prepare support for other authentication schemes such as OpenID and Persona.

Once the separation code has been completes, it should result into two separate plugins BlaatSchaap Auth for the general code and BlaatSchaap OAuth for the OAuth specific code. This also introduces a problem. When current users upgrade to the next version, BlaatSchaap OAuth is upgraded, but then requires the BlaatSchaap Auth plugin. How to I install the BlaatSchaap Auth plugin automatically during the BlaatSchaap OAuth plugin upgrade. I have been googling about this issue, but without result. Is there an official way to do things like this or should I just hack some code together to do this trick?

Anyhow, tomorrow I’m having another party. Yeah, I am celebrating my birthday more then once this year. Party time! lol.

I have recently finished my master thesis project. Now I have been asked to integrate my project with another project my university is running. This project is a distributed Java project. Components of the project are implemented as Java Servlets, which run on a Tomcat server. The communication between the various components is implemented using the Jersey library.

So, the idea is that I implement the various components from my projects as Java Servlets, capable of running on a Tomcat server, using the Jersey library. In order to develop for this target, some set-up is required. First of all, as an IDE, not the regular version of Eclipse, but Eclipse for Java EE developers is required.

Once we have that edition up and running, we can create the set-up required for tomcat. Eclipse can download and install an installation of tomcat in a specified directory. I usually don’t like to install software outside the package manager, but since Eclipse will write configuration files, simply pointing to the system installation of Tomcat is not going to work.

So, let’s have a look at this Tomcat. Start Eclipse in a new workspace, and click the “Workbench” arrow in the top right.


Then, click windows -> show view -> servers. Now, a message appears at the bottom saying to servers have been configured. Click the message to configure a server.



Select Server type “Tomcat v 7.0” (listed under Apache). Please note that I am using Tomcat version 7 as this is the version used by my university. I suppose new projects should use version 8 instead.


In the next window, click Download and install, select a directory in your home directory, and wait until the


button is no longer gray. At the main window, right bottom, a progress indicator will be visible


Now, we follow this tutorial, section 6.1 and 6.2. For the jersey library, I’ll use the Jersey 1.18 zip bundle from the jersey website. I am using version 1.18 as this is used by my university. New projects should probably use an 2.x version. The JAR bundle should work as well but does not include all libraries. When using the bundle, the asm library should be downloaded separately.

Now, take a look at section 6.3. This example is written for the glassfish server, however, we are using the tomcat server. Replace org.glassfish.jersey.servlet.ServletContainer by com.sun.jersey.spi.container.servlet.ServletContainer.

Now, when we attempt to start the server, a configuration error message will appear.



I am not quite sure what causes it, but when we delete the server and add it again, it will work. Now we’ve got a working Jersey Hello World running within Eclipse JEE.