<?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 Re: Get HttpServletRequest within extension module evaluator in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/get-httpservletrequest-within-extension-module-evaluator/m-p/258415#M211545</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;no, the RequestContextHolder can be used without injecting it since it provides a static utility method to access the data it holds.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Dec 2012 10:12:44 GMT</pubDate>
    <dc:creator>afaust</dc:creator>
    <dc:date>2012-12-14T10:12:44Z</dc:date>
    <item>
      <title>Get HttpServletRequest within extension module evaluator</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-httpservletrequest-within-extension-module-evaluator/m-p/258412#M211542</link>
      <description>Hi @ll, Simple question and simple answer (I believe &lt;IMG id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;), is there any way to get access to the objects HttpServletRequest  or HttpSession within either a extension module evaluator or a subcomponent evaluator? I don't see any method to do that in&amp;nbsp; org.springframework.extensions.surf.extensibility.E</description>
      <pubDate>Wed, 12 Dec 2012 16:40:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-httpservletrequest-within-extension-module-evaluator/m-p/258412#M211542</guid>
      <dc:creator>alejandrogarcia</dc:creator>
      <dc:date>2012-12-12T16:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get HttpServletRequest within extension module evaluator</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-httpservletrequest-within-extension-module-evaluator/m-p/258413#M211543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't believe there is a direct way of accessing the HttpServletRequest via the provided parameters of the operations in these evaluators.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But you could make use of the RequestContextHolder utility of Spring and obtain the request attributes object of the current Thread via getRequestAttributes(). This yields a RequestAttributes (interface) object, which is AFAIK always a ServletRequestAttributes instance (specific class), which allows you to obtain the HttpServletRequest via getRequest().&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 11:59:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-httpservletrequest-within-extension-module-evaluator/m-p/258413#M211543</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2012-12-13T11:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Get HttpServletRequest within extension module evaluator</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-httpservletrequest-within-extension-module-evaluator/m-p/258414#M211544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Axel, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks very much for your answer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Correct me if I'm wrong, you are suggesting to inject RequestContextHolder in my custom evaluator and then follow the instructions you have detailed to get the HttpServletRequest from it, isn't it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2012 10:01:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-httpservletrequest-within-extension-module-evaluator/m-p/258414#M211544</guid>
      <dc:creator>alejandrogarcia</dc:creator>
      <dc:date>2012-12-14T10:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Get HttpServletRequest within extension module evaluator</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-httpservletrequest-within-extension-module-evaluator/m-p/258415#M211545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;no, the RequestContextHolder can be used without injecting it since it provides a static utility method to access the data it holds.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2012 10:12:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-httpservletrequest-within-extension-module-evaluator/m-p/258415#M211545</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2012-12-14T10:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Get HttpServletRequest within extension module evaluator</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-httpservletrequest-within-extension-module-evaluator/m-p/258416#M211546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have tried it out and works perfect! This is the coded I have in my evaluator:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;HttpServletRequest request = requestAttributes.getRequest();&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I'm wondering whether it is a little bit tricky or not… I understand that for any specific reason the org.springframework.extensions.surf.RequestContext class doesn't provide direct access to the HttpServletRequest object. Do you think using the code above could be a issue?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks very much Axel.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2012 12:18:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-httpservletrequest-within-extension-module-evaluator/m-p/258416#M211546</guid>
      <dc:creator>alejandrogarcia</dc:creator>
      <dc:date>2012-12-14T12:18:24Z</dc:date>
    </item>
  </channel>
</rss>

