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.

  (sami.hernandez-catamania@mnh.fr)

Number of messages  1
Registration date
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>                                                                                                            

  (langaleriee@gmail.com)

Number of messages  5
Registration date
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