Anybody please help me finding a solutions to my problem.
Env: WebSphere portal 126.96.36.199 with CF010 applies.
Redirecting to a custom error page when HTTP 404 Not Found encountered on non-URL resources
In my case, i have used Navigational Model SPI to form the url's to pages in my portal application.
If the user tries to access a portal page using friendly url's For Eg: http://<hostname>:<portnumber>/wps/portal/test/test1 where "test1" does not exist, as per the portals default behavior it falls back to http://<hostname>:<portnumber>/wps/portal/test/. But in cases where there is Web content viewer portlet added to a page and if the user tries access that page with a Resource URL that does not exist, Web Content Viewer portlet, handles the error and simply displays a warning message "A page context must be present when using a path info URL".
And more over, when ever this message shows up in WCM portelt due to an invalid url, All url's in my portal page which have been formed using Navigational Model SPI are getting appended with the wrong friendly URL. In my case it is "test1".
Is this relates to the fix given in PM52967 - "INCORRECT URL GENERATION IN NAVIGATION MODEL FEED" ?
Please suggest me, what is the best solution to resolve these issues in WebSphere portal 7.
1. Redirecting to a custom error page when HTTP 404 Not Found encountered on non-URL resources
2. INCORRECT URL GENERATION IN NAVIGATION MODEL FEED.
Pinned topic Redirecting to a custom error page when HTTP 404 encountered-WPS 188.8.131.52
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-03-05T17:57:43Z at 2012-03-05T17:57:43Z by SureshR19
Bhagwan 270004G5EM11 Posts
Re: Redirecting to a custom error page when HTTP 404 encountered-WPS 184.108.40.20612-02-21T11:42:35ZThis is the accepted answer. This is the accepted answer.Try mapping the context in your rendering portlet, so that it looks for the content itself rather than looking up the context url.
For second question,
If you are using http server you can write a rewrite rule.
Re: Redirecting to a custom error page when HTTP 404 encountered-WPS 220.127.116.1112-02-22T13:01:44ZThis is the accepted answer. This is the accepted answer.
- Bhagwan 270004G5EM
1. Could you please elaborate the below statement.
"Try mapping the context in your rendering portlet, so that it looks for the content itself rather than looking up the context url"
Where should I map the context for rendering portlet so that my isse related to Navigational Model url construction based on the context will be resolved.
I read this article, but is this not talking about the default portal behavior where in Portal redirects to the first anonymous page in the Home label. So are you suggesting me to create a public page and assign my custom themes to it and place it in first position so that users will be redirected to custom page when the URL is invalid. But in this case, /wps/portal/ always point to this custom page under home label.
Apart from the above suggested solutions, i have also tried the following.
1. I have tried writing some serlvet filters and configured with WPS portal by adding the filter definitions in Web.xml files of wps.war and wcm.war fiels under
I did see in logs, my custom filter is getting executed, but portal is not redirecting to custom error page specified in my filter definition.
And i also noticed, the response status code as 200/302. But never seen 404.
2. I added the property "selection.fallback.enabled" and assigned a "false" value in WAS admin console, it dint help me.
3. Writing rewrite rule, failed. Any help here on how to give solution to my problem is really helps.
4. Finally, i have created one custom error Jsp file and configured with Web Content Viewer portlet. So when ever the requested URL does not exist. Web Content Viewer portlet will display the custom error page where in i have given a link for the end user to fall back to my applications home page.
Appreciate your help.
Re: Redirecting to a custom error page when HTTP 404 encountered-WPS 18.104.22.16812-03-05T17:56:31ZThis is the accepted answer. This is the accepted answer.
- SureshR19 2700046H61
Also update all navigational model tag url's to have "keepNavigationalState" attribute added and set its value to false.
Re: Redirecting to a custom error page when HTTP 404 encountered-WPS 22.214.171.12412-03-05T17:57:43ZThis is the accepted answer. This is the accepted answer.Update the web content viwer portlet preferences and add keepNavigationalState attribute by setting its value to false to all portal navigational model url tags.