URL Mapping Configuration using Config Service

The ConfigService.properties allows you to change two parts related to URL mapping

##########################################################################
# Determines the identifier that is used to mark portal internal URLs
# MUST be defined when Mapping URLs should be used in the portal.
# Remember: The first token of the identifier MUST NOT be equal to a label
# of a context node.
# FORMAT : "/"+ identifier_name +"/" + identifier_value
# EXAMPLE: portal_url_identifier = /purl/
# portal_url_identifier = /!ut/p
# "
# NOTE : The identifier MUST only contain characters that are not reserved for URLs

# Default: /!ut/p
#wps.mappingurl.portal_url_identifier = /!ut/p
######################################################################
# Determines if portal supports Mapping URLs and if prefix is appended
# to normal portal internal urls.
# Default: true
#wps.mappingurl.enabled = true


You can use wps.mappingurl.enabled parameter to false to disable URL mapping. The URL mapping is implemented using an com.ibm.wps.mappingurl.impl.URLAnalyzer Servlet filter. If you have decided not to use URL mapping at all then you can remove these two filter mappings which map every request going to either /portal or /myportal i.e. every protected and public resource


<filter-mapping>
<filter-name>URL Analyzer</filter-name>
<url-pattern>/portal/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>URL Analyzer</filter-name>
<url-pattern>/myportal/*</url-pattern>
</filter-mapping>


In addition to that if you look at the portal URL below or for that matter any other portal page it has similar structure

http://localhost:10040/wps/myportal/!ut/p/c5/04_SB8K8xLLM9MSSzPy8xBz9CP0os3hnd0cPE3MfAwN3cyNTAyM_02AjX8cwAwsjM6B8JE55d2MzinSbENAdDnItThUGnsYQeQMcwNEAr36w6_HKm-j7eeTnpupH6keZ43anuX5kTmp6YnKlfkFuaIRBpqeum6OiIgBgVO14/dl3/d3/L3dDb0EvUU5RTGtBISEvWUZSdndBISEvNl9DR0FINDdMMDBHNzI1MDJONVMyTUFWMDBJMw!!/

<protocol>://<hostname>:<port>/<portal-context>/<security-context>/[<virtual-portal-alias>]/[<internalurlidentifier>]/[<navigationstate>]

You will notice that first part after myportal is always /!ut/p, this is the internal URL identifier configured in the ConfigService.properties. If you want you can change it.

2 comments:

  1. I have been visiting various blogs for my term papers writing research. I have found your blog to be quite useful. Keep updating your blog with valuable information... Regards

    ReplyDelete
  2. Please I am using Portal 7 and I have a url mapping defined in it.
    what I am trying to do is that I want to redirect to that URL mapping from inside another portlet deployed on the same server and have the same security access as the URL mapping.

    Please can you guide me on how to do as I am novice in portal

    ReplyDelete