<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Split login error messages in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/split-login-error-messages/m-p/5093#M2450</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I am looking &lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;to show specific error messages on the login page when a user has not been successful. I've been able to change LoginPost class to handle the error message, i want to display, but i dont't know, how to access this message in &amp;nbsp;login.get.html.ftl. So i want to show the WebScriptException message , cached in the following lines (LoginPost.executeImpl) :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;&lt;SPAN style="border: 0px;"&gt;try&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="border: 0px;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="border: 0px;"&gt;&amp;nbsp;&amp;nbsp; return login(username, password);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="border: 0px;"&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="border: 0px;"&gt;catch(WebScriptException e)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="border: 0px;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="border: 0px;"&gt;&amp;nbsp;&amp;nbsp; status.setCode(e.getStatus());&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="border: 0px;"&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;status.setMessage(e.getMessage())&lt;/STRONG&gt;; &amp;nbsp; *THIS MESSAGE* &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="border: 0px;"&gt;&amp;nbsp;&amp;nbsp; status.setRedirect(true); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="border: 0px;"&gt;&amp;nbsp;&amp;nbsp; return null;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="border: 0px;"&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;How can i do this&amp;nbsp;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also i tried to set this message as session attribute in onFailure() method of loginController class :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;protected void onFailure(HttpServletRequest request, HttpServletResponse response) throws Exception {&lt;BR /&gt;&lt;STRONG&gt;request.getSession().setAttribute("someattr", "some message");&lt;/STRONG&gt;&lt;BR /&gt;super.onFailure(request, response);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;and accessing it from my ftl as : ${Session.someattr} , ${session.someattr} , ${Request.someattr}, ${RequestParameters.someattr} , but without success.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Feb 2017 09:37:55 GMT</pubDate>
    <dc:creator>younotimba</dc:creator>
    <dc:date>2017-02-06T09:37:55Z</dc:date>
    <item>
      <title>Split login error messages</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/split-login-error-messages/m-p/5093#M2450</link>
      <description>Hello.I am looking to show specific error messages on the login page when a user has not been successful. I've been able to change LoginPost class to handle the error message, i want to display, but i dont't know, how to access this message in &amp;nbsp;login.get.html.ftl. So i want to show the WebScriptExce</description>
      <pubDate>Mon, 06 Feb 2017 09:37:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/split-login-error-messages/m-p/5093#M2450</guid>
      <dc:creator>younotimba</dc:creator>
      <dc:date>2017-02-06T09:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Split login error messages</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/split-login-error-messages/m-p/5094#M2451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should take a look at the webscript responsible for generating the login form.&lt;/P&gt;&lt;P&gt;All the code is available at&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Alfresco/share/tree/master/share/src/main/resources/alfresco/site-webscripts/org/alfresco/components/guest" title="https://github.com/Alfresco/share/tree/master/share/src/main/resources/alfresco/site-webscripts/org/alfresco/components/guest" rel="nofollow noopener noreferrer"&gt;share/share/src/main/resources/alfresco/site-webscripts/org/alfresco/components/guest at master · Alfresco/share · GitHu…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see, the webscript controller has been written with Javascript, and the error is defined here&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Alfresco/share/blob/master/share/src/main/resources/alfresco/site-webscripts/org/alfresco/components/guest/login.get.js#L32" title="https://github.com/Alfresco/share/blob/master/share/src/main/resources/alfresco/site-webscripts/org/alfresco/components/guest/login.get.js#L32" rel="nofollow noopener noreferrer"&gt;share/login.get.js at master · Alfresco/share · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it seems the error itself is never read or exposed to the final user&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Alfresco/share/blob/master/share/src/main/resources/alfresco/site-webscripts/org/alfresco/components/guest/login.get.html.ftl" title="https://github.com/Alfresco/share/blob/master/share/src/main/resources/alfresco/site-webscripts/org/alfresco/components/guest/login.get.html.ftl" rel="nofollow noopener noreferrer"&gt;share/login.get.html.ftl at master · Alfresco/share · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2017 20:19:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/split-login-error-messages/m-p/5094#M2451</guid>
      <dc:creator>douglascrp</dc:creator>
      <dc:date>2017-03-09T20:19:10Z</dc:date>
    </item>
  </channel>
</rss>

