Reply To: @Parameter and null-values

Splash Forums Rewrite Users @Parameter and null-values Reply To: @Parameter and null-values


reinhard hobler

The solution with the aggregate @Joins annotation did not really work – I got a 404 for both variants. Here I will wait for the next release 🙂

However, I got it working by using a Rewrite configuration class with rules for the two joins:

import javax.servlet.ServletContext;

import org.ocpsoft.rewrite.config.Configuration;
import org.ocpsoft.rewrite.config.ConfigurationBuilder;
import org.ocpsoft.rewrite.servlet.config.HttpConfigurationProvider;
import org.ocpsoft.rewrite.servlet.config.rule.Join;

public class RewriteConfig extends HttpConfigurationProvider {

	public Configuration getConfiguration(ServletContext context) {
		return ConfigurationBuilder.begin()

	public int priority() {
		// TODO Auto-generated method stub
		return 10;


There are two points not so nice with that approach:

First I can’t use navigation via your Navigate anymore (see as then I get an IllegalArgumentException:

Caused by: java.lang.IllegalArgumentException: Unable to find the resource path for: ...

So I had to change the method to like this:

public String openCustomer() {

		return "/customer.xhtml?customerId=" + customerId + "&faces-redirect=true";


Second point is that now the order of the rules in the rewrite configuration is crucial. If I put the rule with the parameter last then the above actionMethod openCustomer() leds to the following url: host:port/customerapplication/customer/?customerId=4711