Forms6i under linux and save file on local pc
How to save a local file using form6i under a linux server? I can't usi win api and webutil...another way? Thx!
Here you go:
<%@ page import="
java.io.File,
java.io.OutputStream,
java.io.FileOutputStream,
java.io.ByteArrayOutputStream"
%>
<%
String contentType = "application/vnd.ms-excel";
String fileName = "testFile";
fileName = fileName + ".csv";
response.setContentType(contentType);
response.setHeader("Content-Disposition","filename="+fileName);
out.print("I am the only data in the file");
String FileName = "c:/testFile.csv";
OutputStream os = new FileOutputStream(FileName);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
String text = "test string";
byte buf[] = text.getBytes();
baos.write(buf);
baos.writeTo(os);
baos.close();
os.close();
%>
Similar Messages
-
Hi,
I have a program that works under both windows and linux. I wanted to know what is the best way for the file paths I use.
What is the difference between using "/" and "java.io.File.separator"?
Any more info/tips on the difference between working under windows and linux will be great. I tried searching for it online but couldn't find anything useful.
Thanks,
ShaulBigDaddyLoveHandles wrote:
I thought that if you used a '/' in a path string it was interpreted correctly, even in Windoze.Other platforms are available :-)
I can't recall the details now, but we had an inexplicably-breaking build on Windows earlier this year for code that was fine under Linux, and tracked it back to the use of "/" rather than File.separator. It was an odd corner case which escapes me, but a lesson learnt nonetheless -
Popup with open and save file option
Hi,
I have created a button on my page name as "Export File" and created a process and called on "EXPORT FILE" button. I am using utl file in this procedure and i want to download this file and file will be .ics file using for calendar.
My page process code is
begin
pro_create_ical(:P6_START_DATE,:P6_END_DATE);
end;when i click on export file button it should raise a popup with open and save file option.
How i can do this?
Thanks & Regards
Vedant
Edited by: Vedant on Jan 25, 2013 1:59 AM
Edited by: Vedant on Jan 25, 2013 2:00 AM
Edited by: Vedant on Jan 25, 2013 3:49 AMShiv,
Have you installed any new Software/Spyware/Virus Scanner etc.Check it out.It might have caused the issue for last 5 days.
This issue is fixed in Latest Support Package Versions.
Which Version of Support Package you are using?
If EP6 <SP19 you will face this issue.
Just upgrade it to EP6, Support Pack-19,this will be resolved.
Upgrade of Support Pack wont take much time.you can get the document under http://service.sap.com/instguides
Hope it helps
Regards,
Karthick Eswaran
*Reward Points for helpful answers. -
How to open and save file like the Notepad Demo do?
I am a newer to Java Web Start. I found that in the Notepad Demo, when user try to open or save file, a message box appear and give the user some security suggestions.
In my application, I used a JFileChooser and set the <security> element to <j2ee-application-client-permissions/> in the jnlp file. But the application will thow an exception:
access denied (java.io.FilePermission C:\Documents and Settings\Administrator\desktop\Java Web Start.lnk read)
Can someone tell me how to solve this problem. By the way, where can I find the source of the Notepad Demo. I want my application to open and save file just like the Notepad Demo do.The Notpad demo uses the JNLP api to read and write files. The api doc can be found at:
http://java.sun.com/products/javawebstart/docs/javadoc/index.html
Although the Notpad demo source is not available, there is other sample code available at:
http://developer.java.sun.com/developer/releases/javawebstart/
Included here is the webpad demo, which uses the FileOpenService and
FileSaveService API's. -
How to incorporate File name and timestamp automatically into select and save file dialog box?
Hello,
i am trying to incorporate the file name which is inputed by the user along with the timestamp into the selected and save file dialog box. Can you help?
Thanks
Solved!
Go to Solution.You can pass a default file name to the 'File Dialog' Express VI.
Use the 'selected path' output to open the file.
Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.
"You are what you don't automate"
Inplaceness is synonymous with insidiousness
Attachments:
FileDialog.vi 21 KB -
Revision: 7661
Author: [email protected]
Date: 2009-06-08 17:50:12 -0700 (Mon, 08 Jun 2009)
Log Message:
Change from charset=iso-8859-1" to charset=utf-8" and save file with utf-8 encoding.
QA Notes:
Doc Notes:
Bugs: SDK-21636
Reviewers: Corey
Ticket Links:
http://bugs.adobe.com/jira/browse/iso-8859
http://bugs.adobe.com/jira/browse/utf-8
http://bugs.adobe.com/jira/browse/utf-8
http://bugs.adobe.com/jira/browse/SDK-21636
Modified Paths:
flex/sdk/trunk/templates/swfobject/index.template.htmlsame problem here with wl8.1
have you sold it and if yes, how?
thanks -
I have a pdf file which contains text if i copy all text and paste them into notpad and save file as .txt Is it change the ascii value of text ?
How to know character's encoding is ASCII?
-
Any apps that download and save files to itouch?
Are there any apps that have the ability to DL and save files such as .PDF's directly to my itouch over the wifi for use offline, and without any syncing with my pc? It seems that any apps that i see require syncing with my pc either directly or remotely.
All I'd like to do is save a file while I'm surfing and open it offline. Free apps would be preferred.FileSync: $5, requires you to host your files on an FTP site
Files Lite: $0
Briefcase Lite: $0
Each offers support and more functional paid versions. -
Different behaviour of file vis under linux and microsoft
I am porting software written under Windows labview to Linux Labview (6.1). When using the Open/Create/Replace vi in windows if I use a pattern of "*.abc" and enter "123" in the dialogue box a file called "123.abc" will be created which is what I would expect. The same operation under Linux will create a file called "123" without the extension. Is this normal and is there a way of making the linux version behave in the same way as the windows version?
Sorry about the delay - vacation.
There appears to be no check box under Linux to use native file dialogs although it does indeed exist under windows. In fact the linux version does use linux file dialogs by default. It seems that the only options are to force the windows version to behave like the the linux version - which is counter intuitive, or write a new file dialog vi for linux. -
I have a problem to open and save the files.here is my code. can anyone help me to open the files.
public void actionPerformed(ActionEvent e) {
if ("open".equals(e.getActionCommand())) {
FileDialog fdopen=new FileDialog(this, "Load File", FileDialog.LOAD);
fdopen.show();
Thanks for ur timeHi fbnmir or who ever can answer my question,
My problem is similar to the code you wrote. I'm trying to make (or rather complete a half done) editor for text files. For opening and saving files I have so far:
public void actionPerformed(ActionEvent ae){
FileDialog filedialog;
final SearchDialog searchDialog;
String arg = (String)ae.getActionCommand();
// the Open ... case
if(arg.equals(Editor.fileLabels[0])){
if(Editor.VERBOSE)
System.err.println(Editor.fileLabels[0] +
" has been selected");
filedialog = new FileDialog(editor, "Open File Dialog", FileDialog.LOAD);
filedialog.show();
if(Editor.VERBOSE){
System.err.println("Exited filedialog.setVisible(true);");
System.err.println("Open file = " + filedialog.getFile());
System.err.println("Open directory = " + filedialog.getDirectory());
//the Save ... case
if(arg.equals(Editor.fileLabels[1])){
if(Editor.VERBOSE)
System.err.println(Editor.fileLabels[1] + " has been selected");
filedialog = new FileDialog(editor, "Save File Dialog", FileDialog.SAVE);
filedialog.show();
if(Editor.VERBOSE){
System.err.println("Exited filedialog.setVisible(true);");
System.err.println("Save file = " + filedialog.getFile());
System.err.println("Save directory = " + filedialog.getDirectory());
These are two components of a MenuHandler class. The problem with this code is that in the text editor window, even if the Open button is pressed the file I want to open isn't displayed. Although the System.err (I think that's what it is called) says:
Open ... has been selected
Exited filedialog.setVisible(true);
Open file = tutorial_01.rtf
Open directory = C:\dhruba\epgy_2006\tutorial\
Save ... has been selected
Exited filedialog.setVisible(true);
Save file = test.txt
Save directory = C:\dhruba\epgy_2006\tutorial\
How can I actually display the file I want to open, or save some text I've written?
I would appreciate any help, thanks. -
How do I get to download and save files again?
When I try to download or save a file, a file with any format, nothing happens. Only way of getting the file saved is to open it in its designated programme and save it from there. Certain file types can not be saved since they have no programme to open in (like .ies file, for example).
Changing the file behaviours will not help, it still behaves the same way, i.e. it won´t let me save straight from the browser.You really need to provide more information if you expect anybody to help you.
-
Illustrator CC is taking a very long time to open and save files.
I am using a Mac with the Mavericks OS. Illustrator can take up to FIVE MINUTES to open or save a file. It is becoming a waste of time as I have to work on multiple projects a day. I read about "Adobe Drive" but have not found this option on the version of Illustrator that I have.
Please help!Any update?
I found this discussion: http://forums.adobe.com/message/5839180 but have been unable to locate Adobe Drive on my system.
I have followed the above suggestions with no avail. I have only been opening files from my desktop. This issue is only with Illustrator, Photoshop works fine.
I ran a script yesterday that opens up eps files and saves them as a png, and what normally takes around 30 seconds took almost 45 minutes. I need to solve this problem asap.
Would uninstalling and reinstalling the CC suite be of any benifit? -
Please tell me how to install and run new Firefox 5.00 after I have downloaded the new version and chosen Save File. I just go into Loop and screen says new version available and download again !
Did you ever resolve the iCloud problem.I am in the same position and its driving me mad!!! If you have a link to an solution I would appreciate it.
-
Question about labview under linux and the using of CIN....
i have a problem with making Code Interface Node (CIN) with labview under LINUX... my goal is to make a CIN that can uses I2C interface (look to libk8000 from hihihihi), but it just work when i'm running it as ROOT ... is there a way to call the cin like as root.... thanks
Hello Mister Pouf,
Can you please explain more your problem? And give more details about it?
Have you receive error message?
Best Regards,
Sanaa TAZI
National Instruments France
Sanaa T.
National Instruments France
#adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
>> http://www.nidays.fr/images/081110_ban_nidays09_468X60.gif -
Missing data in server monitor under linux and solaris
Some metrics are not displayed in our environments, specifically under the statistics tab, request statistics, active coldfusion thread, we always have a zero line. Also under memory usage, "cf threads by memory usage" is always empty. I have all three buttons at the top checked so they are monitoring. Is there something else I'm doing wrong?
Environment 1 : dell2850->centos5->vmware->centos5->32bitJDK5->tomcat6->coldfusion8
Environment 2 : sun5120->solaris10->64bitJDK5->tomcat6->coldfusion8
I'm specifically wanting thread info to check if I should increase the defaults in CFIDE configuration. Most everything on the server is being delivered faster now that we are using a 64bit JVM and have moved to solaris in production (from windows). But there are some sections of our cfm logic that are taking much longer now (2000% longer)
Thanks
AhnjoanHi all,
does anyone can write some info why java Threads are
recorded in the list of process (ps -ef) when you run
on a Linux box, but not the same when you run on
Solaris ? Which Thread support is more
performant/stable that on Linux or that on Solaris?
Thanks
FrancescoLinux treats kernell threads as light weight processes and displays them as if they are actual processes - they of course are not, so the results of 'ps' can be misleading. Solaris fully differentiates between its three concepts of threads, lightweight processes and processes and 'ps' only shows actual processes.
Both implementations in Linux and Solaris perform well.
By the way, Solaris 8 has an optional, slightly different thread model than earlier versions of Solaris (in fact it is more like NT's) and that can be more efficient for JVM's or other multithreaded systems running on SMP systems. It can also be worse - your mileage may vary.
Maybe you are looking for
-
Determining the executing environment...
I have a very complex PL/SQL program with multiple packages calls. In order to log the process I insert in a log table both informative messages and error messages. In a development environment I need the informative messages but NOT in others enviro
-
Disconnected camera appears as connected device - can't get rid of it!
I recently connected a Samsung Galaxy Tab (SCH-I905) to my Mac, and because it had a photo on it, iPhoto started up and wanted to import the photo. I did that, and ejected the device and all seemed well. But now whenever I start up iPhoto, the SCH-I
-
New T400 - 7417TRU....random sound issues...comes and goes. Running XP. For example, while listening to a CD, sound comes and goes and then starts warbling. Any ideas? Solved! Go to Solution.
-
Custom ldap authenticator to retrieve user bean ldap profile
Hi, Wondering if we could use a custom ldap authenticator to get the user profile from Ldap and put the data bean into session. This will allow to use the same connection to Ldap and to benefit from Bea security authentication configuration. Any inpu
-
Has anyone successfully integrated an infopath solution with BC's API? I was looking at the functionality of infopath for the first time, and after spending a total of 1 hour on it I have managed to connect it to BC's webservice and display the API f