Question

How can I build clean URLS in wicket. It's a wicket 1.5.7 project, that is being ported to wicket 6. But since I have no experience with Wicket I don't know how to clean the URLS.

My URL looks like this:

http://localhost:8080/myprojectname/wicket/bookmarkable/en.mycompany.myprojectname.presentation.LoginPage

A bit long and too much information.

I want it to look like:

http://localhost:8080/myprojectname/LoginPage

Where do I change it? Is it on the server side, or in some web.xml, or other config file?

Was it helpful?

Solution

You need to mount your pages:

mountPage("/LoginPage", en.mycompany.myprojectname.presentation.LoginPage.class);

Usually this is done in by overwriting the init-method of the WebApplication class.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top