Jahia Dev Forum > How to shortten...

0 (0 Good)
0 (0 Bad)

How to shortten portlet url

by  julia »  2012/06/29 02:17

  • How to shortten portlet url
    2012/06/29 02:17

    julia <p> The portlet url is so long. How can I shortten it?</p> <p> eg. <a href="!389a986a-801b-473e-97d3-a2254bc0e0c4_view/__wsAppsPortlet0x2MemberCenterPortlet!389a986a-801b-473e-97d3-a2254bc0e0c4_normal/__rpAppsPortlet0x2MemberCenterPortlet!389a986a-801b-473e-97d3-a2254bc0e0c4_struts.portlet.mode/view/__rpAppsPortlet0x2MemberCenterPortlet!389a986a-801b-473e-97d3-a2254bc0e0c4_struts.portlet.action/0xc2FmemberCenter0xc2FmemberCenter0xc2FappsInfo0xc21initFromHome/__rpAppsPortlet0x2MemberCenterPortlet!389a986a-801b-473e-97d3-a2254bc0e0c4_projectVo.id/402881e536a079fc0136aa95afe5006f">!389a986a-801b-473e-97d3-a2254bc0e0c4_view/__wsAppsPortlet0x2MemberCenterPortlet!389a986a-801b-473e-97d3-a2254bc0e0c4_normal/__rpAppsPortlet0x2MemberCenterPortlet!389a986a-801b-473e-97d3-a2254bc0e0c4_struts.portlet.mode/view/__rpAppsPortlet0x2MemberCenterPortlet!389a986a-801b-473e-97d3-a2254bc0e0c4_struts.portlet.action/0xc2FmemberCenter0xc2FmemberCenter0xc2FappsInfo0xc21initFromHome/__rpAppsPortlet0x2MemberCenterPortlet!389a986a-801b-473e-97d3-a2254bc0e0c4_projectVo.id/402881e536a079fc0136aa95afe5006f</a>&amp;</p> <p> I found there was mothod to solve this problem in liferay. Can I integrate liferay into jahia or do you have any other solution?</p>

  • Number of messages  1
    Registration date Jun 29, 2012
    0 (0 Good)
    0 (0 Bad)

    Re: How to shortten portlet url

    by  shuber »  2014/01/21 16:33

    I don't recommend you integrate Liferay with Jahia as this will probably cause more problems than solve them. 

    These long URLs are actually required by the portlet specification because state is passed in the URLs and it must be "replayable". Liferay's Friendly URLs just makes the state a bit more user friendly. 

    If you have a strong requirement to solve this, I suggest you write your own PortalURLParser implementation, based on our own own (in org.jahia.services.applications.pluto.JahiaPortalURLParserImpl and referenced in the following spring file : http://subversion.jahia.org/svn/jahia/trunk/core/src/main/resources/org/jahia/defaults/config/spring/applicationcontext-plutodriver.xml

    This way you will have full control over the URL generation and parsing. One solution might be to use the session to store some state, but then you will no longer be 100% portlet API compliant (which is also the case of the Liferay Friendly URL solution).

    Best regards,

      Serge Huber.

    Serge Huber (shuber)

    Number of messages  271
    Registration date

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page