How to send information from a backend file to another backend file.
Hello, what happens is that I have a template that has a java model with information (name, description, etc), this model receives the information from AiO and then map it in the frontend html file, but what I want to implement in the frontend is a button that prints a pdf file in the using information from the java model of the template.
The creation of the pdf is done in a java file using a library called itext7 to create the pdf and to be able to call this function from the frontend I use a JavaScript file to make the request by ajax.
But I have the problem that to make the pdf I need to use the information of the template model, my question then is: how do I pass the information of the java model of the template to my java servlet that makes the pdf?
I try to send the information of the java model of the template to the java servlet that makes the pdf but through an interface but java doesn't allow it, because the java model of the template is a class and it doesn't allow an interface to extend a class.
This is the diagram of how I think the logic should work:
The info is on productDetailImpl.java and needs to be send to getPDFServlet.java
