I made a JIRA for this (with patch).

https://issues.apache.org/jira/browse/WICKET-1603

Regards,
Sebastiaan

Sebastiaan van Erk wrote:
Eelco Hillenius wrote:
On Thu, May 8, 2008 at 3:15 PM, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:
2) using a special RequestCodingStrategy, i.e.
UnmountedRequestCodingStrategy and tweaking isWicketRequest to return false
if it detects this request coding strategy...

What do you guys think?

Well, my first impulse is to say that mounting was never meant to
serve complex cases, and that instead of mounting you'd do best with a
custom request coding strategy instead.

That said though, I'm not against something like 2 if we have a nice
construct for it.

Eelco

I made a proof of concept which works, though I have some questions about it (I'm not really into the whole request coding strategy API). Basically what I did was:

1) Add PassThroughUrlCodingStrategy:

public class PassThroughUrlCodingStrategy extends AbstractRequestTargetUrlCodingStrategy
{
    public PassThroughUrlCodingStrategy(final String mountPath) {
        super(mountPath);
    }

    public IRequestTarget decode(RequestParameters requestParameters) {
        return null;
    }

    public CharSequence encode(IRequestTarget requestTarget) {
        return null;
    }

    public boolean matches(IRequestTarget requestTarget) {
        return false;
    }
}

That's the one I have questions about: I'm not quite sure how to implement these methods properly.

2) Modify wicket filter isWicketRequest

// Mounted page
IRequestTargetUrlCodingStrategy urlCodingStrategy = webApplication.getRequestCycleProcessor()
    .getRequestCodingStrategy()
    .urlCodingStrategyForPath(relativePath);

// Mounted and not pass through?
return urlCodingStrategy != null &&
    !(urlCodingStrategy instanceof PassThroughUrlCodingStrategy);

3) Mount my PassThroughUrlCodingStrategy in my Application.init() method:

mount(new QueryStringUrlCodingStrategy("/path1", MyPage.class));
mount(new PassThroughUrlCodingStrategy("/path1/dir"));

4) Fired up tomcat and tested it. :-) It works...

That leaves me with the questions about the decode, encode and matches... How should I implement them properly? :-)

Regards,
Sebastiaan

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to