<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>How to get http response status code into theme?</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121338152" />
  <subtitle>How to get http response status code into theme?</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121338152</id>
  <updated>2026-04-04T12:40:08Z</updated>
  <dc:date>2026-04-04T12:40:08Z</dc:date>
  <entry>
    <title>RE: RE: How to get http response status code into theme?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121340435" />
    <author>
      <name>Nikita Laitinen</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121340435</id>
    <updated>2022-01-24T07:57:53Z</updated>
    <published>2022-01-24T07:57:52Z</published>
    <summary type="html">&lt;p&gt;I'm trying to create custom 404 page&lt;br /&gt; This question is connected
  to the https://liferay.dev/ask/questions/development/session-errors-are-not-visible-inside-portal_normal-ftl&lt;/p&gt;</summary>
    <dc:creator>Nikita Laitinen</dc:creator>
    <dc:date>2022-01-24T07:57:52Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to get http response status code into theme?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121338496" />
    <author>
      <name>Olaf Kock</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121338496</id>
    <updated>2022-01-21T14:36:22Z</updated>
    <published>2022-01-21T14:36:21Z</published>
    <summary type="html">&lt;p&gt;The way you'd typically operate is to create a specific 404 page, on
  which you don't need to check for the error code.&lt;br /&gt; ​​​​​​​The
  code can heavily depend on server-side caching (e.g. 500 can be
  triggered after half a page, if the response is not yet flushed to the
  client. So you're not even guaranteed to get the correct value back.&lt;/p&gt;
&lt;p&gt;What are you trying to achieve?&lt;/p&gt;</summary>
    <dc:creator>Olaf Kock</dc:creator>
    <dc:date>2022-01-21T14:36:21Z</dc:date>
  </entry>
  <entry>
    <title>How to get http response status code into theme?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121338151" />
    <author>
      <name>Nikita Laitinen</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121338151</id>
    <updated>2022-01-21T09:53:01Z</updated>
    <published>2022-01-21T09:53:00Z</published>
    <summary type="html">&lt;p&gt;Hi&lt;br /&gt; I use liferay 7.4&lt;br /&gt; I would like to get status code
  inside theme (portal_normal.ftl) on user request for web page (like
  200, 404 etc).&lt;br /&gt; Session errors object is empty on theme level (it
  is weird, because on liferay 7.4 it contains data I need)&lt;br /&gt; Any
  ideas how to get status code?&lt;br /&gt; Inside
  html/common/themes/body_top.jsp or whatever page status code can be
  got like that : &amp;lt;%= response.getStatus() %&amp;gt;&lt;br /&gt; Help
  please&lt;br /&gt; Or maybe I need to create some additional module, get
  status code there and inject it in theme somehow?&lt;/p&gt;</summary>
    <dc:creator>Nikita Laitinen</dc:creator>
    <dc:date>2022-01-21T09:53:00Z</dc:date>
  </entry>
</feed>
