Apache, Tomcat and Gzip

I wanted GZipped packets arriving at the Apache Http Server to be uncompressed and redirected to Tomcat. I am now using : mod_proxy_http, to connect Apapche with Tomcat and mod_deflate, to uncompress incoming requests. I am running a Ubuntu. Let us say we are running a webapp at http://localhost:8080/test. I did the following to setup Continue reading →

Spring MVC: authentication redirects

I have been trying to do custom redirects in Spring MVC 3.0.6 based on URL parameters after logging in, login failures and logouts. Turns out two of three need special tweaking. By default the redirect after the login and the logout are handled by SimpleUrlAuthenticationSuccessHandler and SimpleUrlLogoutSuccessHandler respectively. Both subclass the AbstractAuthenticationTargetUrlRequestHandler. All three are Continue reading →

Spring MVC: Exception Handling

I was trying to figure out how to use error pages with Spring. Now this turned out to be quite a hassle. I will just wite down some cases which I came across. Before you might want to have a look at this detailed article: http://doanduyhai.wordpress.com/2012/05/06/spring-mvc-part-v-exception-handling/. Tiles definition not found I am using tiles. When Continue reading →

Spring: DriverManagerDataSource causes Infinite Loop using "destroy-method" Parameter

I was using the following data settings: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context" xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd">   <context:property-placeholder properties-ref="deployProperties" />   <tx:annotation-driven transaction-manager="transactionManager" />   <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="mysqlDataSource"/> </bean>   <bean id="mysqlDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" destroy-method="close"> <property name="driverClassName" Continue reading →

Spring: Special Character in URL; Login Works; Redirect

I had a special character in my project name (e.g. project-name), so Maven built a WAR that would be deployed to http://localhost:8080/project-name. Now, this worked perfectly on localhost. Yet, when deployed to a server (some.ip.address) and trying to login, the login process itself worked. But afterwards I was redirected back to the login page. This Continue reading →

Tomcat 7.0.32 & Tomcat Maven Plugin

I am using the Tomcat Maven Plugin by Codehaus. Here is an excerpt from my pom.xml: ... <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>tomcat-maven-plugin</artifactId> <version>1.1</version> <configuration> <server>tomcat_localhost</server> <url>http://localhost:8080/manager/html</url> <path>/ubicon-webapp</path> </configuration> </plugin> ...... <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>tomcat-maven-plugin</artifactId> <version>1.1</version> <configuration> <server>tomcat_localhost</server> <url>http://localhost:8080/manager/html</url> <path>/ubicon-webapp</path> </configuration> </plugin> ... For Tomcat 6 one is supposed to use the URL http://localhost:8080/manager with a user assigned to Continue reading →


So I just installed the BibSonomy plugin. Let's have a test drive! These are some links I have been posting:

Spring MVC: CharacterEncodingFilter

I was having a look at the CharacterEncodingFilter provided by Spring MVC. I was wondering why it was only possible to set the response encoding when the request encoding was forced to the given encoding? Why not be able to set a default response encoding if nothing is specified in the accept header fields? Or Continue reading →

Spring MVC 3.0.5: Forward Sets Character Encoding

The Problem Alright, second try explaining my problem: I was specifying a REST interface returning a JSON object. This was done via Spring's @ResponseBody annotation. The response I got would not display some special characters (like ä,ö,ü) correctly using a browser (e.g. Firefox 14.0.1). Those characters turned into weird signs. Important: the REST interface was Continue reading →

WKT: Continents

I am probably just stupid, but I could not for the live of me find well-known text representations of the world's continents. I finally did it myself. Very, VERY coarse, mind you using the OpenLayers WKT Example and Wikipedia as a reference. This works for my purposes. Feel free to tell me were I can Continue reading →