created files are deleted on glassfish shutdown - java

I developing web application using glassfish 4.0 and primefaces 4.0. application creates pdf (using Itext) , convert it to small jpeg files and saving in on disk. Unfortunately during server shutdown all these files are deleted.
Do you know what is the reason for this deletion and how to turn in off?
Regards

Related

Office Web Apps integrated into Java app

I have a Java app that creates and stores some documents online for my users, but every time they need to update the documents and change anything they have to download them and then edit with MS Office and them upload again to the web app. After seeing Office Web App to edit Word, Excel documents I was wondering if there is a way to integrate those editor to my app, so the client will click the file and will be edited by Office online version instead of downloading, editing and uploading.

Reduce the big size of my Android application resource

I am currently developing an android application that useLibsvm library for data
classification.
To use the Libsvm I should provide file text describing data
the size of my data=1,3G
I have placed all my files in assets Folder => copied them in sdCard and then running the
classification
The problem Now is that my application take a lot of time to be installed on my device!
It is possible to compress those files and the decompress them while running my
classification?
And How to do this in Android
move your resources to desktop and delete them from your app, this would be helpful for testing your app.
You could zip the file on the installation and make your service unzips it the first time it's used.
You may zip/unzip using the java.util.zip standard package.

Importing .xls files into database Jboss

I am building a web application with JBoss 7. I will be getting datasets in .xls format that I want to drop into a folder on the server. In turn, these .xls files will be imported into the database in jboss. There should be some kind of auto detection in the folder so that when a .xls file is dropped in there it is automatically imported into the database. Please can someone advise me what tools / technologies are available for importing .xls files into the database in JBoss?
You can divide this into several tasks:
Deciding of you really want to do this directly inside JBoss with a Service or with a external program connecting to a SessionBean.
Detecting changes of the directory (e.g. with Java7 and the WatchService
Reading the XLS files (e.g. with Apache POI - the Java API for Microsoft Documents
Mapping the content of the XLS files to entities of your domain model and store them into the DB.

Create a Word (.doc) file, convert it to PDF and HTML w/o opening Open Office port

I have a project which requires creating a Word (.doc) file with certain formatting and certain data fetched from my database. I want to output that file to user which he would edit and the upload the file back it back to the server. After which I want to perform the following conversion on the uploaded file.
.doc to .pdf (Intended to be downloaded and viewed on web)
.doc to .html (Intended for free text search on web)
I want to achieve this without opening the Open Office port. The earlier version was doing this but the port opened had tendency of crashing when the users are more. So I want to avoid doing that. The Open Office and the OS both were re-installed on other machines and tried in different ways but the OO port crashed every time the users increased.
Is there any other way to achieve this conversion? Continuing with this is not possible due to the crashing.
This is the host machine:
Tomcat server on Linux (RedHat 64 bit)
The application is developed in Java (JSP and Servlets)
The backend is Oracle
All users have:
A Linux machine, mostly 32bit Fedora or Suse
Any help is appreciated.
You could use http://poi.apache.org/ for handling the actual .doc files. For PDF, there are a number of PDF libraries available as well. The catch is that many are not free, but here is a list of open source PDF libraries: http://java-source.net/open-source/pdf-libraries
Here is a discussion on Word to HTML. Convert Word doc to HTML programmatically in Java

Generating and Displaying PDF file in Flex/Java

We have Flex on the front end and Java on the back end. When a user will request for a PDF file, request will go to the Java backend, where a PDF file will be generated using Jasper Reports. What we dont know is how to display this PDF file in browser; since we dont want to use JSP/Servlets etc - It has to be flex only. Any suggestions?
Flash Player cannot natively render PDF files. This is possible using Adobe AIR but not in a Flex application. Your best bet is to call navigateToURL() and open a Servlet in a new browser tab/window. The Servlet can simply write contents of the PDF file to the OutputStream and set the appropriate HTTP headers.
i think this question is old, but it may help others, there's a new library developed by Jasper Forge them selves, which deals with JasperReports directly, i mean it's not a PDF viewer, but a JasperReport exporting tool, you can download it from here
i tried it through using JasperServer, when viewing reports you can choose from different options to export it, one of them is flash, and it's working nice
Well for starters, PDFs don't always display in the browser. It depends on the user's settings. You essentially header them the pdf file and either they download it or a program like Acrobat Reader opens in the browser to display it.
Not sure how this is done in flex, I would imagine if you're using Java one simple servlet could do it.

Categories

Resources