Re: Path default add parameter to parameters

Splash Forums Rewrite Users Path default add parameter to parameters Re: Path default add parameter to parameters

#22939

RedShadow
Participant

The workaround for the problem illustrated in[1] is actually not really working. The sample app will show the general problem of the forever loop which is probably also the root cause of the troubles with CODI.

Rewrite always get’s the chance to do something.

I think the main problems are

1. The first request to a mapped URL which is using Join will result in parameters being present in the new location due to redirect of CODI

2. Using a non valid windowId will break every request(this is only with rewrite on classpath, see[1])

Problem 1 seems to be resolved by skipping further rewrite handling when windowId is not present on non resource requests like:

.defineRule()

.when(Direction.isInbound().andNot(QueryString.parameterExists("windowId"))

.andNot(Path.matches("/javax.faces.resource{0}")

.where("0").matches(".*")))

.perform(Lifecycle.handled())

[1] http://ocpsoft.org/support/topic/apache-ext-cdi-aka-codi-and-rewrite-integration-issue