ShortURLConstructor replaces all wiki pages with a reference to the /wiki/ -URL, with a special parameter which tells which action is to be taken. For example, /Edit.jsp?page=WikiPage gets replaced with /wiki/WikiPage?do=Edit.

ShortURLConstructor will attempt to guess your wiki location from your jspwiki.baseURL -setting, but if it gets it wrong, you can use the jspwiki.shortURLConstructor.prefix -setting to point at a different location.

For example, if you changed the path mapping for the WikiServlet in web.xml to /mywiki/* you might do the following:

jspwiki.baseURL =
jspwiki.urlConstructor = ShortURLConstructor
jspwiki.shortURLConstructor.prefix = /mywiki/

All relative URLs would look like "/mywiki/Foobar" and all absolute URLs would look like "".


You should be understand that users can bypass any restrictions in web.xml if you're using this URLConstructor. All access to the wiki is controlled through the /wiki/ -servlet. If you want to limit user access to certain functionalities, you should use the ShortViewURLConstructor.


If you get a 404 error when you're using this, check that your web.xml contains the following lines:



Back to URLConstructors.

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-) was last changed on 19-Jul-2006 09:36 by UnknownAuthor