3

The Problem: Using one of Wickets url mounting strategies I can do the following url (as an example)

http://somedomain.com/mount-path/desiredname

what I would like to do is

http://somedomain.com/desiredname

desiredname would be e.g. pages or posts. But with Wicket I must use a mount-path first.

Can anybody point me into the right direction, either using a different mounting strategy or a filter setup.

E.g a fallback class for all urls within somedomain.com, from thereone the code should be simple.

thanks.

4

2 回答 2

2

您可以尝试使用Wicketstuff 注释

@MountPath(path = "/")
@MountMixedParam(parameterNames = { "action", "accountID" })

您也可以实现自定义AbstractRequestTargetUrlCodingStrategy

我不确定这个建议。

于 2010-02-06T15:50:52.610 回答
0

但是,如果您将 Wicket Filter 映射到“/”,它会不会像您期望的那样工作?

如果没有,这可能是您需要的:

http://tukey.org/urlrewrite/

于 2010-02-06T06:45:01.147 回答