I am developing a web application using Adobe Flex. I would like to retrieve the data entered in the text area and save them into a new text file.
Can anyone please let me know the details to write data into a text file ?
Thanks,
Serenity.
Where are you trying to store the data? on the server or client side? You will have have access to client's file system to write a file (due to security reasons). If you need to create the file on server, you will have to submit the data onto a servlet, jsp or some controller action (for frameworks like spring,struts etc). And then write it onto your server's file system.
Update: Since, you are a beginner, I suggest you read: Create Flex 4 and Java Web applications . The tutorial is actually saving data into database. You can instead, save the contents into a file. And you might want to change the field types in the flex form. But this tutorial can give you a start :)
Related
I am currently developing a Java App for a company to help keep track of client records. At some point, some of the client's information is written down in an Order form and then is translated to several PDF documents. I noticed with PDF's in Adobe Acrobat Reader that input fields have values that can be stored or re-written. I was wondering if it was possible to write information to these input fields with Java? Or if anyone would have any idea of how to do such a feature?
I've seen this done with PHP so I assume it's a similar process in which I would just have to write and translate information from the order form to the input fields. I don't want to spend time recreating the entire PDF file in Java so I was wondering if there were perhaps a way I can access the info through the use of an object or something. Or some kind of hack I don't know about yet....
You can use iText or Apache PDFBox to read your PDFs and write your content.
I know that I can use a BLOB or an XML file, but I was wondering if there was a better way to do this, or if either of these are the correct way of doing this. The user should be able to edit their file online and then save it onto the server, and at any time get the file back into the editor and continue editing that file (similar to that of Google Drive). Any ideas? We are using Spring Framework and controllers for our site. We are using a MongoDB for file storage (files are stored on the server, file paths are stored on the MongoDB).
I've been reading about some xPages functionality about wrapping a document with DominoDocument.wrap(...) that is supposed to do this for you. However, I am in a stand along Java program.
Is it possible to get the xPages Jar Files to import into my application somehow? I do have the basic Notes Jars working.
it is unlikely you will get this working using the DominoDocument class. when you wrap the Document, it creates a 'DominoRichTextItem', during this process it extracts the attachments to the local filesystem so that the web server can easily serve the content during the user's browsing/editing session.
this attachment extraction process relies on the user's session information, as well as the xpages applications 'persistence service'.
you are better of trying to emulate this idea by using the standard notes API to extract the text/html mime part, and the extracting attachments/inline image mime parts for whatever your purpose
I'm building an app which takes some data from a Web XML file (similar to RSS feed) and shows those data in a Webview.
This is done through a DOMParser activity which i feed with different XML URLs.
Now, i would like to take some of these data and store them in the internal storage (a kind of "Favorite" option), to let the user to see them offline.
To see these stored data, i would like to use the same DOMParser, feeding an internal path instead of a web URL (so i don't need to create another activity).
To go in this way, i need to create an empty XML file somewhere (res/XML/file.xml), store the necessary data inside this file (whenever the user choose to do it) and let the user to retrieve the data from this XML (instead of the one on the web URL) when offline thorugh the DOMParser.
Which is the better way to store data to keep what above?
Is SQLite able to store and delete data in a XML file or do i need to use other tools?
Thanks to anyone who wants to help me
You can't store this files inside res/xml folder, it's not allowed. You can store it in filesystem. Android official tutorial explains storing files in great details.
When you store files or read them you have to work with Streams.
Update in response to first comment
It depends how big and complex is that part of XML data. If you wish to retrieve that part XML in whole then I would go with filesystem.
SQLite would be a good choice if you like to have SQL structure in respect to your XML part, then you could benefit e.g. creating query to find XML bits you are interested in. I don't see a point to use SQLite and store XML part as a String per row.
If you still don't know which to chose, have a look at example implementations and see which one is more comfortable for you.
Is it possible send a image or file from an java applet to a php script which produce a pdf.
Until now my java applet has the opportunity that you can save a screenshot of the applet in the users chosen directory and the user can save the test results in form of a pdf. But I want t combine it to one file and I would like to avoid to work with a database.
Yes, it wouldn't even make sense to use a database for this (unless that is the source of the test results). Just upload the screenshot/results as one POST request and then generate PDF with PHP.
So what you want is to render the PDF combining both, the image and the test results right? The processing Framework has a nice Render2PDF function. Integrate it in your project and u wont need this PHP stuff which comes directly from hell.
Radek