Set Jetty buffer size (Maven)

March 11th, 2010

Working with large cookies and jetty, you may have faced this error :

2010-03-11 18:18:31.275:WARN::HttpException(413,FULL head,null)

This is because jetty allows only 4ko for HTTP request and response headers. Using large cookies is enough to reach the limit.

To add more room for headers, simply add <headerBufferSize>16384</headerBufferSize> to your connector configuration (16k should be enough).

Full jetty plug-in configuration :
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>7.0.1.v20091125</version>
<configuration><scanIntervalSeconds>10</scanIntervalSeconds>
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>8080</port>
<maxIdleTime>60000</maxIdleTime>
<headerBufferSize>16192</headerBufferSize>
</connector>
</connectors>
</configuration>
</plugin>

Wicket adapter for WAT : include block support

March 9th, 2010

I just added a new WATBlock component to Web Assemble Tool Wicket adapter (webassembletool-wicket).

This is the equivalent of assemble:includeBlock jsp tag, which allows to include content from a remote web site into your application.

Now the Wicket adapter has the minimal components to be useable in a project (WATTemplate, WATBlock).

I’ve also added some ready-to-use demo content and template in order to ease WAT learning. These files already have WAT tags included (look at the html source to get block names) :

The website has yet to be updated.
Enjoy

Nebula Gallery widget in production (PosterGenius)

March 9th, 2010

Just relaying a ‘thank-you’ post from Stavros Kounis on the nebula newsgroup :

Hi all

Its was back to 2008 when we have decide to rely on nebula gallery widget for our project named “PosterGenius”[1][2].

Since then Nebula Gallery widget[3] was havy used in our application. Now PosterGenius is a finalist for the Best RCP Application for the 2010 Eclipse Community Awards.

I what to share this “recognition” of our work with the Nebula Team[4] and say a BIG “Thank you guys!!”

/stavros

[1] http://www.postergenius.com/
[2] http://skounis.blogspot.com/2010/03/nebula-gallery-widget-in-production.html
[3] http://www.eclipse.org/nebula/widgets/gallery/gallery.php
[4] http://www.eclipse.org/nebula/

It’s nice to see the Gallery widget being used in more RCP applications. This kind of feedback shows that Gallery is ready to be used in production applications, even if it is still labeled as ‘beta’ because of some missing features, like accessibility and full JFace support (Feel free to help :-) ).

Thanks Stavros for using Nebula widgets :-)
I’ve updated my Nebula Gallery page with screenshots and links.

Java Stateless Session Filter released on sourceforge

January 24th, 2010

I just finished publishing on sourceforge a simple filter named Java Stateless Session Filter which let you change the way your application use HTTP session without refactoring the code, or share user session between webapps while using the standard session API.

Several session stores are available out of the box :

  • Cookie, with variants : plain (development only), Encrypted, JSON based
  • Memcache
  • Native session (when some attributes doesn’t need sharing)

The inital code is released under the Apache License v2.0 by Capgemini.
Capgemini Logo

Status:
This code was written in a few days as a Proof Of Concept and was tested with Struts2, Wicket and JSF.

Feel free to test this filter and report success or issues. See the support page for project forums and trackers.

How it works:
How it works

Usage:
The project exposes a maven2 repository. To add this filter on your application, just add repository and dependencies to your project pom :

<repository
<id>statelessfilter-repository</id>
<name>Stateless Filter repository</name>
<url>http://statelessfilter.sourceforge.net/maven2/repository</url>
</repository>


<dependency>
<groupId>net.sourceforge.statelessfilter</groupId>
<artifactId>stateless-core</artifactId>
<version>0.1</version>
<type>jar</type>
<scope>compile</scope>
</dependency>


<dependency>
<groupId>net.sourceforge.statelessfilter</groupId>
<artifactId>stateless-cookie-plain</artifactId>
<version>0.1</version>
<type>jar</type>
<scope>compile</scope>
</dependency>

Then add the filter in WEB-INF/web.xml :

<filter>
<filter-name>session</filter-name>
<filter-class>net.sourceforge.statelessfilter.filter.StatelessFilter</filter-class>
</filter>

(...)

<filter-mapping>
<filter-name>session</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

For additional details, see the complete documentation on sourceforge.

Testing disqus.com

January 11th, 2010

I’m testing Disqus.com as the new comment system for this blog. It should provide integration with Facebook, Tweeter and Google.

This service does not seem very stable, but since the standard wordpress system is still available when Disqus.com is down, this should not be an issue.

Feedback is welcome.