Foros de discusión
ErrorPage Configuration
prabhakar reddy, modificado hace 9 años.
ErrorPage Configuration
New Member Mensajes: 7 Fecha de incorporación: 1/08/13 Mensajes recientes
Hi All,
I want too configure the custom pages for 404 , 403 and 500 errors in Liferay. can anyone have any idea?
Thanks,
I want too configure the custom pages for 404 , 403 and 500 errors in Liferay. can anyone have any idea?
Thanks,
Manali Lalaji, modificado hace 9 años.
RE: ErrorPage Configuration
Expert Mensajes: 362 Fecha de incorporación: 9/03/10 Mensajes recientes
Hi,
For 404 error,
You can create a hook and override the jsp portal-web\docroot\errors\404.jsp
Create a custom jsp : hooks\HookPlugin-hook\docroot\WEB-INF\custom_jsps\errors\404.jsp
and add below portal-ext.properties:
layout.show.http.status=true
layout.friendly.url.page.not.found=/errors/404.jsp
HTH!
For 404 error,
You can create a hook and override the jsp portal-web\docroot\errors\404.jsp
Create a custom jsp : hooks\HookPlugin-hook\docroot\WEB-INF\custom_jsps\errors\404.jsp
and add below portal-ext.properties:
layout.show.http.status=true
layout.friendly.url.page.not.found=/errors/404.jsp
HTH!
Jitendra Rajput, modificado hace 9 años.
RE: ErrorPage Configuration
Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
For other error codes like 500 you can add below entry in web.xml .
You need to create ext-plugin to over ride web.xml.
<error-page>
<error-code>500</error-code>
<location>/errors/500Error.jsp</location>
</error-page>
You need to create ext-plugin to over ride web.xml.
Tanweer Ahmed ., modificado hace 1 año.
RE: ErrorPage Configuration
Expert Mensajes: 322 Fecha de incorporación: 11/03/10 Mensajes recientes
Hi Prabhakar,
Just in case you do not find the 404.jsp, you have to override /errors/code.jsp.
LR 6.2 uses code.jsp for displaying the Error messages of this kind.
-Tanweer
Just in case you do not find the 404.jsp, you have to override /errors/code.jsp.
LR 6.2 uses code.jsp for displaying the Error messages of this kind.
-Tanweer
prabhakar reddy, modificado hace 9 años.
RE: ErrorPage Configuration
New Member Mensajes: 7 Fecha de incorporación: 1/08/13 Mensajes recientes
Hi All,
For configure the custom error page for 403(forbidden error), we need to write a liferay hook.
/html/portal/status.jsp in side this jsp page we have code like this. Now we can write our custom message here.
<c:when test="<%= SessionErrors.contains(request, PrincipalException.class.getName()) %>">
<h3 class="alert alert-error">
<liferay-ui:message key="forbidden" />
</h3>
<liferay-ui:message key="you-do-not-have-permission-to-access-the-requested-resource" />
<br /><br />
<code class="lfr-url-error"><%= HtmlUtil.escape(url) %></code>
</c:when>
Thanks,
Prabhakar reddy.
For configure the custom error page for 403(forbidden error), we need to write a liferay hook.
/html/portal/status.jsp in side this jsp page we have code like this. Now we can write our custom message here.
<c:when test="<%= SessionErrors.contains(request, PrincipalException.class.getName()) %>">
<h3 class="alert alert-error">
<liferay-ui:message key="forbidden" />
</h3>
<liferay-ui:message key="you-do-not-have-permission-to-access-the-requested-resource" />
<br /><br />
<code class="lfr-url-error"><%= HtmlUtil.escape(url) %></code>
</c:when>
Thanks,
Prabhakar reddy.
Mahesh Salunkhe, modificado hace 8 años.
RE: ErrorPage Configuration
New Member Mensajes: 8 Fecha de incorporación: 5/09/12 Mensajes recientes
My requirement is to show custom 'under construction page'
what i tried so far-
layout.show.http.status=true
layout.friendly.url.page.not.found=/html/portal/page_under_construction.html
I created page_under_construction.html and jpg image and put under folder '/ROOT/html/portal'.
Upto this, it's working fine.
How to get images outside tomcat/webapps/ as 'under construction' page/html is at some other drive e.g. 'D' or webapps of another tomcat?
Note - i have tried updating file 'server.xml' --> <host>-->
e.g.<context path="/foo/bar" docbase="D:/images"></context>
What is way to accomplish this?
what i tried so far-
layout.show.http.status=true
layout.friendly.url.page.not.found=/html/portal/page_under_construction.html
I created page_under_construction.html and jpg image and put under folder '/ROOT/html/portal'.
Upto this, it's working fine.
How to get images outside tomcat/webapps/ as 'under construction' page/html is at some other drive e.g. 'D' or webapps of another tomcat?
Note - i have tried updating file 'server.xml' --> <host>-->
e.g.<context path="/foo/bar" docbase="D:/images"></context>
What is way to accomplish this?