Java – communication between Jasper and different applications

I have Jasper reports server (installed at www.example. Com) and a separate Java / JSP Application (installed at www.example. Net), and I am looking for different options for generating reports

Option 1 (current working solution)

My current working solution is that the user logs in to the Java / JSP Application and selects a report The application creates an XML representation of the report, saves it as filenamexml, and then sends it to Jasper reports server using the following code:

<IFRAME height="600" width="1000" src="https://www.example.com/jasperserver/flow.html?
    _flowId=viewReportFlow&standAlone=true&_flowId=viewReportFlow&
    ParentFolderUri=%2Freports&
    reportUnit=%2Freports%2FExample_Report_2&j_username=user&
    j_password=password&
net.sf.jasperreports.xml.source=https://www.example.net/<%=fileNameXML%>">                              
     </IFRAME>

(note that even if I pass the user name and password in the URL, the security will not be affected, because filenamexml is created using string filename = UUID. Randomuuid() toString()fileExt;)

Option 2

I connect the Jasper reports server directly to www.example.com Net and generate reports in this way The disadvantages of this method are: (a) I need to set all users in Jasper reports; (b) I need to pass parameters in a security conscious manner so that each user can only access their own data; (c) I can only access the database, not my application

My ideal solution

However, I really want to be able to access my application's calculations through Jasper and bypass logging in to my application

One advantage of this is that my application does not have appropriate mobile access rights. Users can download Jasper mobile application and access reports from there

This will involve the following:

>User login Jasper > user selection report > Jasper calls my application with some parameters > application creates XML file > link for application to return this file > Jasper represents the report

What is the best way to achieve this goal?

Solution

I think the best way is:

>Create a readily accessible URL in your app without logging in If you are using spring or any other framework, it's good to explain this, because I can tell you how to do this

There are many ways to give this cat epithelium Let me know the technology you are using. Maybe we can start there We have fulfilled your present request

thank you.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>