Pretty Wicket urls without mount-path

Problem: Using one of the Wickets URL mounting strategies, I can make the following URL (as an example)

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

what i would like to do is

http://somedomain.com/desiredname

the desired name will be, for example, pages or posts. But with Wicket, I must first use the mount path.

Can someone point me in the right direction using either a different installation strategy or a filter setting.

For example, a backup class for all URLs inside somedomain.com, from there the code should be simple.

thank.

+3
source share
3 answers

I am sure this blog post answers your question :)

http://blog.jteam.nl/2010/02/24/wicket-root-mounts/

+2

Wicketstuff

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

AbstractRequestTargetUrlCodingStrategy

.

+2

But if you set your wicket filter to “/”, will it not work as you expect?

If not, this is probably what you need:

http://tuckey.org/urlrewrite/

0
source

Source: https://habr.com/ru/post/1731620/


All Articles