Fórum
Create 404 page for each website on same server.
Rahul Saraswat, modificado 9 Anos atrás.
Create 404 page for each website on same server.
Junior Member Postagens: 62 Data de Entrada: 26/02/13 Postagens Recentes
Hi Everyone,
I have various websites running on a liferay portal. I need to create a different 404 error page for each website. I saw various posts but I came accross two approachs :
1) Either we can create a jsp page(named 404.jsp in error folder in webapp) in the theme project and we add below line in web.xml :
<error-page>
<error-code>404</error-code>
<location>/errors/404.jsp</location>
</error-page>
I tried this but whenever I enter wrong url for a page and it throws 404 error it does not display my jsp page.
2) We can create a hook and make the changes but in this case I doubt we will be able to design different error pages for each website.
Can anyone please suggest. Will appreciate any help.
Thanks
Rahul Saraswat
I have various websites running on a liferay portal. I need to create a different 404 error page for each website. I saw various posts but I came accross two approachs :
1) Either we can create a jsp page(named 404.jsp in error folder in webapp) in the theme project and we add below line in web.xml :
<error-page>
<error-code>404</error-code>
<location>/errors/404.jsp</location>
</error-page>
I tried this but whenever I enter wrong url for a page and it throws 404 error it does not display my jsp page.
2) We can create a hook and make the changes but in this case I doubt we will be able to design different error pages for each website.
Can anyone please suggest. Will appreciate any help.
Thanks
Rahul Saraswat
Harish Kumar, modificado 9 Anos atrás.
RE: Create 404 page for each website on same server.
Expert Postagens: 483 Data de Entrada: 31/07/10 Postagens Recentes
Have a look at layout.friendly.url.page.not.found=/html/portal/404.html in portal.properties file
you can provide the jsp file instead of html page and implement the logic to render site specific error page
you can provide the jsp file instead of html page and implement the logic to render site specific error page
Rahul Saraswat, modificado 9 Anos atrás.
RE: Create 404 page for each website on same server.
Junior Member Postagens: 62 Data de Entrada: 26/02/13 Postagens RecentesHarish Kumar:
Have a look at layout.friendly.url.page.not.found=/html/portal/404.html in portal.properties file
you can provide the jsp file instead of html page and implement the logic to render site specific error page
Thanks Harish Kumar for the quick reply.
Can you please help me out with an example or a link to follow.
Nikhil Nishchal, modificado 8 Anos atrás.
RE: Create 404 page for each website on same server.
Regular Member Postagens: 174 Data de Entrada: 22/06/12 Postagens Recentes
Hello,
You can go through the following links:
http://www.nikhilnishchal.com/tech-blogs/-/blogs/create-site-specific-404-page-not-found
Thanks
You can go through the following links:
http://www.nikhilnishchal.com/tech-blogs/-/blogs/create-site-specific-404-page-not-found
Thanks