Use Case: If you try to create 301 redirect for e.g. lets say /samples/defaultPage --> /samples/home, and then try to hit the url with parameters like http://www.example.com/samples/defaultPage?param1=param1value¶m2=param2value, then the page gets redirect to the target page but the parameters are lost and thus, it is very inconvenient for customers who have generated various 301/302 redirects from old site to new re-design website or new navigation structure as redirects work but they fail to retain parameters. Customers might have shared their urls to various social media platforms or as marketing campaigns along with some extra parameters; in order to serve personal content to the end users and for analytics purposes as well or other. This issue is known in 11g8 WCS version and currently there is no resolution as of now until Patch 19. Issue is already resolved in WCS 12c v2.
Resolution: In order to tackle this issue, one of the simplest way is to write a Java EE filter which can help to retain the parameters by passing the parameters as it is to the target url along with response headers and thus, achieving the goal.
Here, I present a simple Java EE filter which we are already using in our project and works flawlessly. It is exactly similar solution to the implementation provided in WCS 12c v2.
Once you have created this class, shutdown WCS and deploy as jar file to WEB-INF/lib folder where assetapi.jar file recides. Add the following entry in web.xml just above "WebReferenceFilter" entry as shown below and save.
Restart WCS and test the redirects with parameters which should work now.
Disclaimer: The code and/or the configurations posted are not official
recommendations and should be used at sole's discretion with proper
testing before deploying on live WebCenter Sites systems. Cheers!!
A few random quandaries and topics related to Oracle WebCenter Sites. I have stopped updating this blog, if you need any help: https://fatwiredev12c.blogspot.com/2020/06/need-help-in-wcs-projects.html
Tuesday, September 11, 2018
Subscribe to:
Posts (Atom)
A simple code compare functionality
One of the most important aspect of any development cycle is deployment and while deployment, it is very important to note the changes don...
-
There are times when we need to inspect all the fields of asset or either to perform other tasks. One can find all the details of any asset...
-
In Oracle WebCenter Sites 11.1.1.8.0 and above, it is very easy to generate vanity urls with help of webroots. With introduction of Vanity U...
-
Mostly all output after data retrieval in FatWire and Oracle WCS is in form of IList and one needs to know how to work with IList. Hence, j...