I have approximately 5 jrxml files and many jsp files in a project.Now i have to integrate jrxml files to a project present in eclipse.
Now, how to integrate jrxml files to eclipse so that it should be directory independant (it should not be like this eg:-D:/dev/tools/jasper files/report11.jrxml)?
The second question is we have to include both .jrxml and .jasper files?
The third question is "if we open the project which is present in eclipse in another person PC by pasting this url (http://192.1.168.201:8080/SalesProject/) in other person PC it should run normally and should run jrxml files and should display the data in different formats (eg:-PDF,DOC,XLS,XLSX)
Where to put them? In a folder that is deployed on server as you do with your jsp, images web-inf ecc.
Do I need both .jrxml and .jasper?, No .jasper is enough (note: naturally in your server code you should not compile the .jrxml files anymore). To make it easier to understand a comparisons with java would be .jrxml = .java and .jasper = .class
Will it work? Sure since they are deployed on the server you only need to figure out how to reference them correctly from your .jsf page (search some one the web or on SO, there are a lot of answers) ...
ServletContext context = request.getServletContext();
String fullPath = context.getRealPath("/WEB-INF/reports/your_report.jasper");
Related
We have lost our java code that implement a web service. Now we have only a wsdl file (and a WAR file) published in tomcat. We need to bring back the original java project so I have tried to generate java source code from WSDL file (and WAR file) and I succeeded -by using axis2 (WSDL2JAVA) plugin- but I think it generates only the java classes that should exist in the src package of the project.. no welcome pages or index.xml etc.. I Don't know what other things are missing and how to bring them back.
My question is: what to do after generating java classes from WSDL file? should I complete the other project parts in my own? Is there a way to bring back exactly the original project from WSDL or WAR file?
As per the Scenario you mentioned for WAR file you can use JAD tool to unpack the whole code but with certain limitations like you cannot edit or save the code and I am not sure about the copy feature because it was not working for previous version.
Here is the link below.
https://varaneckas.com/jad/
I have a NetBeans project that uses the GSON library. I've tried including the GSON.jar file without requiring future users to separately download it. However it doesn't seem to work. The project looks for the file from the relative path of my computer so the file isn't found on another user's computer. Is there a way to include GSON.jar and "Export to Zip" and keep the reference in the project itself? I'm lost!
Thank you
Exporting a Project to ZIP zips up the project folder only, and not anything outside of the folder, including dependencies. If you include the GSON.jar file in the project folder, then the JAR file will be included in the .ZIP file. It's a good practice anyway since NetBeans will use a relative classpath and thus if you move the project itself NetBeans won't give you an error message when loading the project.
I am using Jasper Reports in my Grails 3 application to generate PDF files. I had some issue with Jasper Report plugin for Grails. So we are using Jasperreport jars to generate the PDF.
compile 'net.sf.jasperreports:jasperreports:6.2.1'
I created a 'JasperReports' in project level and added all the jrxml and jasper files. In the development environment I use the below way to compile the report.
jasperReport = JasperCompileManager.compileReport('JasperReports/FYF_Report.jrxml')
Everything works fine in development but when the war is generated it is not including the 'JasperReports' folder. I tried adding the folder in conf but it did not work.
Let me know if I am missing any configuration to include the 'JasperReports' folder in war.
I resolved the issue by adding the JasperReports folder in src/main/webapp. Path to access the files will be different in local and Production, So I am getting the real path from context as below
def sc=session.getServletContext()
def reportsPath=sc.getRealPath("/")
jasperReport = JasperCompileManager.compileReport(reportsPath+'JasperReports/FYF_Report.jrxml')
I'm using Eclipse with WebLogic extensions.
I'm developing my J2EE application as Exploded. Each time I modify a JSP file content it is copied automatically inside the exploded deployment folder.
Unfortunately this scenario works only for JSP files, any other project file, like CSS and JS, must be copied by hand.
Is it possible to tell Eclipse to auto deploy other file types too?
Thanks!
I have a number for Word Docs and PDFs that need to be copied to a file storage on start of my Grails app.
I figured I can just leverage BootStrap.groovy to check for existing files then copy if none found. However, I don't know the best practice of including the files into the WAR file.
How can I copy these files?
I don't know if it is a best practice, however we have all our external files into web-app directory. i.e. We have directories reports and pdf besides css and images directories. All that files are package and deploy into war file.