Jahia in English > Render a jahia web...

0 (0 Good)
0 (0 Bad)

Render a jahia web page from an external application with some data

by  sami.hernandez-catamania@mnh.fr »  2018/12/17 12:32

Hi everybody,

Beginner with jahia, I would need your help to explain me how I could do this thing : I have a jahia web page in which a node is defined. The idea is to render this node but not from my jahia application. An external web application would like to render it with some data.

For example the node, defined in the jahia web page, can display a user name. But this user name is retrieved from the external web application.

I don't really know how to make the "connection" between the 2 applications. I've searched a solution and I thought about several things :

- The external web app could make an AJAX call to a jahia action (with the url containing .do) just like we would do if we were developing a javascript code inside the jahia app.

- The external app could render the web page directly with a Get request on the url of the node. But how can we pass the user name parameter ?

With a little thinking, I'd prefer the second option. I could pass parameters in the Get request. The thing is I have to make my call with minimum security. The jahia application is doing some secret things with the user name so I don't want anybody to access easily. I thought about setting some header containing credentials into my Get request to the jahia node. If Jahia application assumes that given credentials are correct I perform my actions on the node.

  • Render a jahia web page from an external application with some data
    2018/12/17 13:43

    sami.hernandez-catamania@mnh.fr <p>Hi everybody,</p> <p>Beginner with jahia, I would need your help to explain me how I could do this thing : I have a jahia web page in which a node is defined. The idea is to render this node&nbsp;but not from my jahia application. An external web application would like to render it with some data.</p> <p>For example&nbsp;the node, defined in the jahia web page, can display a user name. But this user name is retrieved from the external web application.</p> <p>I don&#39;t really know how to make the &quot;connection&quot; between the 2 applications. I&#39;ve searched a solution and I thought about several things :</p> <p>- The external web app could make an AJAX call to a jahia action (with the url containing .do) just like we would do if we were developing a javascript code&nbsp;inside the jahia app.</p> <p>- The external app could render the web page directly with a Get request on the url of the node. But how can we pass the user name parameter ?</p> <p>With a little thinking, I&#39;d prefer the second option. I could pass parameters in the Get request. The thing is I have to make my call with minimum security. The jahia application is doing some secret things with the user name&nbsp;so I don&#39;t want anybody to access easily.&nbsp;I thought about setting some header containing credentials into my Get request to the jahia node. If Jahia application assumes that given credentials are correct I perform my actions on the node.</p>

  • Number of messages  1
    Registration date Dec 17, 2018
    0 (0 Good)
    0 (0 Bad)

    Re: Render a jahia web page from an external application with some data

    by  langaleriee@gmail.com »  2018/12/17 15:27

    You can make a Java class in your module

    in your class you make a jahia action, you'll get everithing you need.

    If you want this class to be accessible to anybody put in your META-INF/spring/your-module.xml:

    <bean class="yourPackage.yourAction" >                                                      
            <property name="name" value="yourAction"/>                                       
            <property name="requireAuthenticatedUser" value="false"/>         
    </bean>                                                                                                            

  • Re: Render a jahia web page from an external application with some data
    2018/12/17 15:27

    langaleriee@gmail.com <p>You can&nbsp;make a Java class in your module</p> <p>in your class you make a jahia&nbsp;action, you&#39;ll get everithing you need.</p> <p>If you want this class to be accessible to anybody put in your META-INF/spring/your-module.xml:</p> <p><span style="background-color:#D3D3D3;">&lt;bean class=&quot;yourPackage.yourAction&quot; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><br /> <span style="background-color:#D3D3D3;">&nbsp; &nbsp; &nbsp; &nbsp; &lt;property name=&quot;name&quot; value=&quot;yourAction&quot;/&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><br /> <span style="background-color:#D3D3D3;">&nbsp; &nbsp; &nbsp; &nbsp; </span><strong><span style="background-color:#D3D3D3;">&lt;property name=&quot;requireAuthenticatedUser&quot; value=&quot;false&quot;/&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></strong><br /> <span style="background-color:#D3D3D3;">&lt;/bean&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span></p>

  • Number of messages  5
    Registration date Dec 17, 2018
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page