cancel
Showing results for 
Search instead for 
Did you mean: 

How to use/call Java module in a UI module in HANA XSA MTA App?

sudhiranjan_lenka
Contributor
0 Kudos

Hello Expert,

I am working on a POC to create HANA XSA MTA App.

I created one table(Employee) by using CDS artifact of DB module and put some data into the table by executing insert SQL query. Then I created one Java module in which I created one Servlet to read my employee table with the help of JDBC code. This servlet works perfectly fine and it gives the records from employee table when I run the Java module.

Now I want to create a HTML page in my UI module to trigger the Servlet but I am not sure If the servlet will use the same port number as now after deployment, I don't want to hard code the servlet path in my UI module.

So my question is how to user java module in the UI module.

Any idea or reference will be helpful.

We are working on HANA 2.0 SPS 02.

Thanks,

Sudhir.

Accepted Solutions (1)

Accepted Solutions (1)

sudhiranjan_lenka
Contributor
0 Kudos

I could able to manage this to achieve this functionality.

I exposed the Servlet as a OData service by using Apache olingo library and called the OData service/servlet from UI5 App with the help of creating a destination in the XS-app.json file and having the corresponding mapping in the mta.yml file.

Now it runs perfectly fine.

Thanks,

Sudhir.

Answers (0)