<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Friendly URL Mapper</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=10116022" />
  <subtitle>Friendly URL Mapper</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=10116022</id>
  <updated>2026-05-21T19:09:52Z</updated>
  <dc:date>2026-05-21T19:09:52Z</dc:date>
  <entry>
    <title>RE: Friendly URL Mapper</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10355034" />
    <author>
      <name>Flo We</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10355034</id>
    <updated>2011-08-08T14:43:38Z</updated>
    <published>2011-08-08T14:43:38Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Okay,&lt;br&gt;&lt;br&gt;with Netbeans 7 and the Portal Pack 3.0.5 the DTD Problem is solved and I can go on working with the FriendlyURLMapper.&lt;br&gt;Given the Pattern&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;pattern&amp;gt;/someUrl/{parameter1}/{parameter2}/{parameter3}&amp;lt;/pattern&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;it should work on an URL like&lt;br&gt;&lt;pre&gt;&lt;code&gt;www.liferay.com/somePath/-/someUrl/parametervalue1/parametervalue2/parametervalue3&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;if I am not mistaken.&lt;br&gt;&lt;br&gt;When I am trying that out my Portlets aren't displayed.&lt;br&gt;a) With a WebContentDisplay (and I guess with other Standard-Portlets) the Content just turns Blank&lt;br&gt;b) When one of my own Portlets is displayed on the Page I get the message that the Portlet is currently not deployed.&lt;br&gt;&lt;br&gt;When I remove the &lt;strong&gt;-/someUrl/parametervalue1/parametervalue2/parametervalue3&lt;/strong&gt; -Part, everything is fine again.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Flo We</dc:creator>
    <dc:date>2011-08-08T14:43:38Z</dc:date>
  </entry>
  <entry>
    <title>RE: Friendly URL Mapper</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10127026" />
    <author>
      <name>Flo We</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10127026</id>
    <updated>2011-07-26T06:47:23Z</updated>
    <published>2011-07-26T06:47:23Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Yeah, better that since it is another Topic.&lt;br&gt;For all that suffer the same way, new Topic can be found here: &lt;a href="http://www.liferay.com/de/community/forums/-/message_boards/message/10126977"&gt;http://www.liferay.com/de/community/forums/-/message_boards/message/10126977&lt;/a&gt;&lt;br&gt;&lt;br&gt;And to stay on Topic:&lt;br&gt;I have a question regarding the Patterns, in the Wiki they look like&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;pattern&amp;gt;/{instanceId}/view/{folderId:\d+}&amp;lt;/pattern&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;so, the {instanceId} will be mapped as the value of instanceId und the {folderId:\d+} will only consist of numeric values.&lt;br&gt;So when you put a ":" after the Parameter Name you can write your own Regex that will evaluate the Parameter?&lt;br&gt;When you provide a Parameter that can't be evaluated with this Regex, will it simply be ignored?&lt;br&gt;&lt;br&gt;Also: is that pattern matched from behind the "-" in the Url (like the one in http://www.liferay.com/de/community/forums/-/message_boards/message/10126977)?&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Flo We</dc:creator>
    <dc:date>2011-07-26T06:47:23Z</dc:date>
  </entry>
  <entry>
    <title>RE: Friendly URL Mapper</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10120083" />
    <author>
      <name>Tomáš Polešovský</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10120083</id>
    <updated>2011-07-25T15:46:01Z</updated>
    <published>2011-07-25T15:46:01Z</published>
    <summary type="html">YW.&lt;br /&gt;&lt;br /&gt;Please create new thread for your exception and attack stack trace, please.&lt;br /&gt;&lt;br /&gt;-- tom</summary>
    <dc:creator>Tomáš Polešovský</dc:creator>
    <dc:date>2011-07-25T15:46:01Z</dc:date>
  </entry>
  <entry>
    <title>RE: Friendly URL Mapper</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10119368" />
    <author>
      <name>Flo We</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10119368</id>
    <updated>2011-07-25T13:15:43Z</updated>
    <published>2011-07-25T13:15:43Z</published>
    <summary type="html">Hey, thanks again Thomas!&lt;br /&gt;You are a great help!&lt;br /&gt;&lt;br /&gt;I took a look and noticed that my Netbeans generates the config files with the 5.2 dtd. After I edited my files and changed it to the 6.0.0 dtd I seem to stay unfortunate.&lt;br /&gt;Now I get the Exception that my Portlets have  a null portlet bag. Google tells me that it may be because my portlet configuration can&amp;#39;t relate the configuration entries to the portlet sources (as I understood it).&lt;br /&gt;Well, I found the explanation of the error, but I got no solution for that.</summary>
    <dc:creator>Flo We</dc:creator>
    <dc:date>2011-07-25T13:15:43Z</dc:date>
  </entry>
  <entry>
    <title>RE: Friendly URL Mapper</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10116090" />
    <author>
      <name>Tomáš Polešovský</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10116090</id>
    <updated>2011-07-25T09:22:13Z</updated>
    <published>2011-07-25T09:22:13Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi Flo,&lt;br&gt;&lt;br&gt;it's problem while parsing your liferay-portlet.xml. Make sure you have correct DTD specification. For Liferay 6.0.x your liferay-portlet.xml should start with:&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;!--?xml version="1.0"?--&amp;gt;

&amp;lt;liferay-portlet-app&amp;gt;&amp;lt;/liferay-portlet-app&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;-- tom&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Tomáš Polešovský</dc:creator>
    <dc:date>2011-07-25T09:22:13Z</dc:date>
  </entry>
  <entry>
    <title>Friendly URL Mapper</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10116021" />
    <author>
      <name>Flo We</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=10116021</id>
    <updated>2011-07-25T08:56:59Z</updated>
    <published>2011-07-25T08:56:59Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hello,&lt;br&gt;&lt;br&gt;I recently stumbled upon the Friendly URL Mapper. I tried to set it up but I have a few problems with it.&lt;br&gt;I only found this wiki/blog entry as information source for liferay 6: &lt;a href="http://www.liferay.com/de/community/wiki/-/wiki/Main/FriendlyURLMapper"&gt;http://www.liferay.com/de/community/wiki/-/wiki/Main/FriendlyURLMapper&lt;/a&gt;&lt;br&gt;&lt;br&gt;I want to map my URL like this: http://localhost:8080/someUrl/{parameter1}/{parameter2}/{parameter3}&lt;br&gt;So I added this to my liferay-portlet.xml:&lt;br&gt;&lt;pre&gt;&lt;code&gt;  &amp;lt;portlet&amp;gt;
    &amp;lt;portlet-name&amp;gt;somePortlet&amp;lt;/portlet-name&amp;gt;
    &amp;lt;friendly-url-mapper-class&amp;gt;com.liferay.portal.kernel.portlet.DefaultFriendlyURLMapper&amp;lt;/friendly-url-mapper-class&amp;gt;
    &amp;lt;friendly-url-mapping&amp;gt;somePortlet&amp;lt;/friendly-url-mapping&amp;gt;
    &amp;lt;friendly-url-routes&amp;gt;com/liferay/test/someportlet/someportlet-friendly-url-routes.xml&amp;lt;/friendly-url-routes&amp;gt;
    &amp;lt;instanceable&amp;gt;true&amp;lt;/instanceable&amp;gt;
  &amp;lt;/portlet&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;and then wrote my friendly-url-routes.xml like this:&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;!--?xml version="1.0" encoding="UTF-8"?--&amp;gt;


&amp;lt;routes&amp;gt;
    &amp;lt;route&amp;gt;
        &amp;lt;pattern&amp;gt;/someUrl/{parameter1}/{parameter2}/{parameter3}&amp;lt;/pattern&amp;gt;
    &amp;lt;/route&amp;gt;
&amp;lt;/routes&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;After adding the friendly-url stuff to the liferay-portlet.xml and start up my server I get following exception:&lt;br&gt;&lt;blockquote&gt;com.liferay.portal.kernel.xml.DocumentException: Error on line 116 of document  : Element type "friendly-url-mapping" must be declared. Nested exception: Element type "friendly-url-mapping" must be declared.&lt;br&gt;        at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:372)&lt;br&gt;        at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:383)&lt;br&gt;        at com.liferay.portal.kernel.xml.SAXReaderUtil.read(SAXReaderUtil.java:145)&lt;br&gt;        at com.liferay.portal.service.impl.PortletLocalServiceImpl._readLiferayPortletXML(PortletLocalServiceImpl.java:1405)&lt;br&gt;        at com.liferay.portal.service.impl.PortletLocalServiceImpl.initWAR(PortletLocalServiceImpl.java:609)&lt;br&gt;        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;br&gt;        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)&lt;br&gt;        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)&lt;br&gt;        at java.lang.reflect.Method.invoke(Method.java:597)&lt;br&gt;        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)&lt;br&gt;        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)&lt;br&gt;        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)&lt;br&gt;        at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:82)&lt;br&gt;        at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)&lt;br&gt;        at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)&lt;br&gt;        at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)&lt;br&gt;        at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)&lt;br&gt;        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)&lt;br&gt;        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)&lt;br&gt;        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)&lt;br&gt;        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)&lt;br&gt;        at $Proxy57.initWAR(Unknown Source)&lt;br&gt;        at com.liferay.portal.service.PortletLocalServiceUtil.initWAR(PortletLocalServiceUtil.java:340)&lt;br&gt;        at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:223)&lt;br&gt;        at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:101)&lt;br&gt;        at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._doFireDeployEvent(HotDeployUtil.java:109)&lt;br&gt;        at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._fireDeployEvent(HotDeployUtil.java:182)&lt;br&gt;        at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:38)&lt;br&gt;        at com.liferay.portal.kernel.servlet.PortletContextListener.doPortalInit(PortletContextListener.java:99)&lt;br&gt;        at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)&lt;br&gt;        at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:52)&lt;br&gt;        at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:50)&lt;br&gt;        at com.liferay.portal.kernel.servlet.PortletContextListener.contextInitialized(PortletContextListener.java:55)&lt;br&gt;        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)&lt;br&gt;        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)&lt;br&gt;        at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1244)&lt;br&gt;        at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1342)&lt;br&gt;        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:303)&lt;br&gt;        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)&lt;br&gt;        at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)&lt;br&gt;        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)&lt;br&gt;        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)&lt;br&gt;        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)&lt;br&gt;        at java.lang.Thread.run(Thread.java:619)&lt;/blockquote&gt;&lt;br&gt;&lt;br&gt;My Primary intention for the Friendly URL Mapper is to disguise all the generated Parameters like p_p_id or p_p_lifecycle, so that the user can get his Data by just adding the (custom) parameters.&lt;br&gt;Can anyone tell me what I am doing wrong or provide some Links with more detailed info on that topic?&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Flo We</dc:creator>
    <dc:date>2011-07-25T08:56:59Z</dc:date>
  </entry>
</feed>
