Output Mutiple Files Using htp.p
Hello,
I wish to output 3 CSV files from APEX I have the following code
Declare
S_FileName VarChar(20);
S_Counter Number;
begin
-- Set the File NAme
S_FileName :=To_char(sysdate,'yyyymmdd')||'Letters.CSV';
For S_Counter IN 1..4 LOOP
-- Set the MIME type
owa_util.mime_header( 'application/octet', FALSE );
-- Set the name of the file
htp.p('Content-Disposition: attachment; filename="'||S_FILENAME||S_Counter|| '"');
-- Close the HTTP Header
owa_util.http_header_close;
-- Loop through all rows in EMP
for x in (select MPAN_CORE,ACCOUNT_NO
from Categoriser.LTNA_LETTER_ONE_OUTPUT@link_to_dqmDevdb )
loop
-- Print out a portion of a row,
-- separated by commas and ended by a CR
htp.prn(x.MPAN_CORE ||','|| x.ACCOUNT_NO ||','||
x.MPAN_CORE || chr(13));
END LOOP;
END LOOP;
-- Send an error code so that the-- rest of the HTML does not render
htmldb_application.g_unrecoverable_error := true;
end;
At this stage i only want to output 3 files the content is not a issue
I it possible to do this with APEX?
Any help on this is greatly appreciated.
David
I take it from the lack of response that this is not somthing that APEX can do?No, it's something that HTTP cannot do. Think about it: if it was possible for a server to send multiple files in response to an HTTP request, then it would be possible to break your computer very easily indeed.
aww well looks like i will need to find another way..You'd need something in the browser client-side, Java applet, Flash control etc...
Similar Messages
-
Extract XML output to file using PL/SQL
Hi.
Since Oracle 8.1.4.7.1 I am using XML output in my applications.
With that version of Oracle, my method was:
1. Make the select;
2. Create a file somewhere in my C drive;
3. Create the XML file header;
3. For each row, insert into the file, with the correct format;
4. Close the file;
... and, voilá ... the XML file was made.
Now, with the Oracle 10g, I know that I have much more ways to do it:
1. Package DBMS_XMLQUERY
2. Statements like
"SELECT XMLELEMENT("USERS", XMLELEMENT("nome_pessoa", e.nome_pessoa ||' - '|| e.login), XMLELEMENT ( "password", e.password)) AS "result"
FROM pessoa e"
3. Or finally using XML SQL Utility.
My question, is that if there is any way that i can make it all of this automatically. If there is any procedure or method that allow me to do all this stuff in just one step:
1. Select in XML output;
2. Creation of file;
3. Insertion of Select output in file and Close of File;
Thankx,I'm assuming that you want to write to the file system of the server that the database is running on...
you'll have to use utl_file
See
http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/appdev.920/a96612/u_file.htm -
Populate image file using HTP.IMG().
Hi,
I'm using iAS 9i, Oracle HTTP Server(Apache) and web pl/sql. I can not populate an image file on my web page.
I am not sure where to store the image files (GIF or PNG)? I am trying to populate an image file on my page using HTP.IMG()command.
For example: HTP.IMG(curl=> '???');
Thank You Very Much,
Frank
nullexample
htp.img( '/images/header_r3_c2.gif', cattributes => '
name="header_r3_c2" width="480" height="1" border="0"') -
Output to File using SAPScript
Hello Friends,
How can we get output as .PDF file from SAPScrip. I dont need to print the output instead I want to send it as attachment.
Please help me in finding the solution.
Regards,
ShabbarHi Ali,
You need not have to create a spool request in order to convert the SAPScript output to PDF..
What you need to do is to convert SAPScript Output to OTF format and then convert it to PDF format using the Function Module CONVERT_OTF and then download the PDF data to desktop using the Function Module GUI_DOWNLOAD.
Here is my entire code.
REPORT Z1SCRIPT_TO_PDF .
***************************DECLARATIONS*******************************
DATA: BEGIN OF ITAB OCCURS 0,
CARRID TYPE SFLIGHT-CARRID,
CONNID TYPE SFLIGHT-CONNID,
PRICE TYPE SFLIGHT-PRICE,
END OF ITAB.
DATA: struct TYPE ITCPO.
DATA: PDFTAB TYPE TABLE OF TLINE WITH HEADER LINE,
DATAB TYPE TABLE OF ITCOO WITH HEADER LINE,
DATA: BINFILESIZE TYPE I,
FILE_NAME TYPE STRING,
FILE_PATH TYPE STRING,
FULL_PATH TYPE STRING.
To specify Printer name
struct-tddest = 'LP01'.
To specify no Print Preview
struct-tdnoprev = 'X'.
To access the SAP Script output in OTF format
struct-tdgetotf = 'X'.
**************************SAPSCRIPT GENERATION*******************************
CALL FUNCTION 'OPEN_FORM'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX =
ARCHIVE_PARAMS =
DEVICE = 'PRINTER'
DIALOG = space
FORM = 'ZSCRIPT'
LANGUAGE = SY-LANGU
OPTIONS = struct
MAIL_SENDER =
MAIL_RECIPIENT =
MAIL_APPL_OBJECT =
RAW_DATA_INTERFACE = '*'
SPONUMIV =
IMPORTING
LANGUAGE =
NEW_ARCHIVE_PARAMS =
RESULT =
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
MAIL_OPTIONS = 6
ARCHIVE_ERROR = 7
INVALID_FAX_NUMBER = 8
MORE_PARAMS_NEEDED_IN_BATCH = 9
SPOOL_ERROR = 10
CODEPAGE = 11
OTHERS = 12
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'START_FORM'
EXPORTING
ARCHIVE_INDEX =
FORM = 'ZSCRIPT'
LANGUAGE = ' '
STARTPAGE = ' '
PROGRAM = ' '
MAIL_APPL_OBJECT =
IMPORTING
LANGUAGE =
EXCEPTIONS
FORM = 1
FORMAT = 2
UNENDED = 3
UNOPENED = 4
UNUSED = 5
SPOOL_ERROR = 6
CODEPAGE = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'ELEM1'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
CODEPAGE = 9
OTHERS = 10
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SELECT CARRID CONNID PRICE FROM SFLIGHT INTO TABLE ITAB.
LOOP AT ITAB.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'ELEM2'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
CODEPAGE = 9
OTHERS = 10
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
CALL FUNCTION 'END_FORM'
IMPORTING
RESULT =
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SPOOL_ERROR = 3
CODEPAGE = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT =
RDI_RESULT =
TABLES
OTFDATA = DATAB[]
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
SPOOL_ERROR = 4
CODEPAGE = 5
OTHERS = 6
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*******************CONVERTING OTF DATA TO PDF DATA***********************
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
IMPORTING
BIN_FILESIZE = BINFILESIZE
BIN_FILE =
TABLES
otf = DATAB[]
lines = PDFTAB[]
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
WINDOW_TITLE =
DEFAULT_EXTENSION =
DEFAULT_FILE_NAME =
FILE_FILTER =
INITIAL_DIRECTORY =
WITH_ENCODING =
PROMPT_ON_OVERWRITE = 'X'
CHANGING
filename = FILE_NAME
path = FILE_PATH
fullpath = FULL_PATH
USER_ACTION =
FILE_ENCODING =
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*******************DOWNLOADING THE PDF DATA******************************
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = binfilesize
FILENAME = FULL_PATH
FILETYPE = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH =
tables
data_tab = PDFTAB[]
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
After executing this program, it will ask for saving in the desktop. Give proper location and the PDF file will be stored in that location.
<b>Award points if found useful.</b>
Regards,
SP. -
How to write a file using mod pl/sql
hi,
i am having a submit button in my procedure. which should inturn create .sql file in a file path.
is there any way to create a fileusing htp and htf methods.
Thanks in advance
Hari>
i am having a submit button in my procedure. which should in turn create .sql file in a file path.
is there any way to create a file using htp and htf methods.
>
Why are you wasting your time coding from scratch using the PL/SQL Web Toolkit instead of the APEX framework?
From Re: how to write a file using mod pl/sql it appears that you are not using APEX, so a number of the approaches APEX offers are not relevant. You appear to be looking for a file download solution using the <tt>wpg_docload.download_file</tt> method, such as:
create or replace procedure download_file (
p_filename in varchar2
, p_mimetype in varchar2
, p_content in out nocopy blob)
is
begin
-- Set up HTTP header.
-- Use "application/octet" as default MIME type.
owa_util.mime_header(nvl(p_mimetype, 'application/octet'), false);
-- Set the size so the browser knows how much to download.
htp.p('Content-length: ' || dbms_lob.getlength(p_content));
-- Filename will be used as default by the browser in "Save as..."
htp.p('Content-Disposition: attachment; filename="' || p_filename || '"');
-- Close header.
owa_util.http_header_close();
-- Stream the file content to the browser.
wpg_docload.download_file(p_content);
end download_file; -
How to send the output of a script to a txt or rpt file using T-sql?
Hi!
I have some code which we use to record info about a database when we decommission it. I normally click Query > Results to File and then run it to produce a file. I need to do this via t-sql so I can automate it. Any idea what code I need to make
this script output to file?
Thanks,
Zoe
SET NOCOUNT ON
DECLARE @Databasename varchar(50)
DECLARE @date as char(10)
DECLARE @session_usr nchar(30);
SET @Databasename = db_name()
SET @date = convert(char(10), getdate(), 121)
SET @session_usr = SYSTEM_USER;
DECLARE @sqlCommand varchar(1000)
select current_user
Print '================================================================================'
Print '========== SQL Decommission Report for '+ @@SERVERNAME +' ========='
Print '========== Executed on ' + @date +' by '+ rtrim(@session_usr) +' ========='
Print '================================================================================'
Print ' '
Print 'Database properties'
Print '----------------------------------'
select substring(name,1,25) as Name,substring(filename,1,40) as File_Name,cmptlevel as Compatibility_level from master.dbo.sysdatabases
where name = @databasename
Print 'Full Text Catalogs'
Print '----------------------------------'
select substring(name,1,20)as Name,status,substring(path,1,52) as Path FROM [master].[dbo].[sysfulltextcatalogs]
Print 'SSIS Packages'
Print '----------------------------------'
IF (select cast(@@version as varchar)) like '%2012%' begin
print 'sql 2012 instance'
select substring(name,1,20) as Name,substring(description,1,40) as Description,ownersid as Owner from msdb.dbo.sysssispackages
end else if (select cast(@@version as varchar)) like '%2008%' begin
print 'sql 2008 instance'
select substring(name,1,20) as Name,substring(description,1,40) as Description,ownersid as Owner from msdb.dbo.sysssispackages
select substring(name,1,20) as Name,substring(description,1,40) as Description,substring(owner,1, 18) as Owner from msdb.dbo.sysdtspackages
end else if (select cast(@@version as varchar)) like '%2005%' begin
print 'sql 2005 instance'
select substring(name,1,20) as Name,substring(description,1,40) as Description,suser_sname(ownersid) as Owner from msdb.dbo.sysdtspackages90
select substring(name,1,20) as Name,substring(description,1,40) as Description,substring(owner,1, 18) as Owner from msdb.dbo.sysdtspackages
end
Print 'Linked Servers'
Print '----------------------------------'
SELECT substring(srvname,1,35) as LinkedServer_Name,substring(datasource,1,35) as Data_Source FROM master.dbo.sysservers WHERE isremote = 0
Print 'Replication'
Print '----------------------------------'
IF (select count(*) from master.dbo.sysdatabases where name = 'Distribution') > 0
select substring(publisher_db,1,20) as Published_DB,substring(Description,1,40) as Description from distribution.dbo.MSpublications
ELSE print 'No replication'
Print ' '
Print 'Database Mail'
Print '----------------------------------'
SELECT substring(name,1,20) as Name,enabled,substring(email_address,1,35) as Email_address,last_email_date FROM msdb.dbo.sysoperators
where last_email_date > dateadd(day,-30,getdate())-- detect whether any of the systems have sent an email in the last 30 days
Print 'CLR Assemblies'
Print '----------------------------------'
select substring(Name,1,20) as Name,substring(Type_desc,1,35) as Description,Create_date from sys.objects where object_id in (select object_id from sys.assembly_modules)
Print 'Logins'
Print '----------------------------------'
SET @sqlCommand = 'select substring(name,1,40) as Name,substring(dbname,1,30) as Default_Database from master.dbo.syslogins where sid in (select sid from '+ @databasename +'.dbo.sysusers where issqlrole <> 1 and hasdbaccess <> 0 and name <> ''dbo'')'
EXEC (@sqlCommand)You can use bcp to export from database to flat file.
It requires xp_cmdshell to work from a stored procedure.
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
Creating an output file using 'GUI_DOWNLOAD' function
Hi SapAll.
when i try to create an out put text file using the FM 'GUI_DOWNLOAD' by wiring the follwoing below source code
CONCATENATE 'ASORT' c_tab 'ASORTYP' c_tab
'VKORG' c_tab 'DATAB' c_tab
'DATBI' INTO outtab-txt.
iam not able to create the text file with more than 16 fields.i have tried to create an out put file with 24 fields but i can only see 16 fields in it.so could any body help me in finding out how i can create an Output file with more than 16 fields in the file.
your help will be appreciated.
regards.
Varmacheck your output definition....are you doing something like below? SAP will transfer 1024 bytes per line with GUI_DOWNLOAD. After you download, how do you view the data? Be sure you're looking at the data with something that will show all 1024 bytes, and not jsut 256 or 512.
types: begin of outline,
txt(1024),
end of outline.
data: outtab type table of outline,
ls_out type outline. -
How to create multiple output files using TrAX?
I am new in this field. I'm trying to create multiple xml output files using TrAX. I have to parse a xml source file and output it to multiple xml files. My problem is that it only creates one output file and puts all the parsed data there. When i use saxon and run xsl and xml files, it works fine and creates multiple files...it has something to do with my java code...Any help is greatly appreciated.
Here's my XSL file
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1"
<xsl:template match="data_order">
<data_order>
<xsl:copy-of select="contact_address"/>
<xsl:copy-of select="shipping_address"/>
<xsl:apply-templates select="ds"/>
</data_order>
</xsl:template>
<xsl:template match="ds">
<xsl:variable name="file" select="concat('order', position(),'.xml')"/>
<order number="{position()}" href="{$file}"/>
<xsl:document href="{$file}">
<xsl:copy-of select="."/>
</xsl:document>
</xsl:template>
</xsl:stylesheet>
xml source file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE operation SYSTEM 'data_order.dtd'>
<data_order job_id='00-00-000' origin='PM-ESIP'>
<contact_address>
<first_name>ssssss</first_name>
<last_name>sssss></last_name>
<phone>2323232</phone>
<email>dfdfdsaf</email>
</contact_address>
<ds ds_short_name ='mif13tbs'>
<output>
<media_format>neither</media_format>
<media_type>FTP</media_type>
<output_format>GIF</output_format>
</output>
</ds>
<ds ds_short_name ='mif15tbs'>
<output>
<media_format>neither</media_format>
<media_type>FTP</media_type>
<output_format>GIF</output_format>
</output>
</ds>
</data_order>
My java file
import javax.xml.transform.*;
import javax.xml.transform.stream.*;
import java.io.*;
public class FileTransform {
public static void main(String[] args)
throws Exception {
File source = new File(args[0]);
File style = new File(args[1]);
File out = new File(args[2]);
TransformerFactory factory = TransformerFactory.newInstance();
Transformer t = factory.newTransformer(new StreamSource(style));
t.transform(new StreamSource(source), new StreamResult(out));Saxon has specific extensions. In this case it is <xsl:document>. That looks like a standard XSLT element, but it actually isn't. The history behind it is this: There was a proposal to create a new version of XSLT, called XSLT 1.1. One of the new features of this version was to be this xsl:document element. The author of the Saxon product, Michael Kay, is one of the people on the W3C committee directing the evolution of XSLT, so he upgraded his product to implement XSLT 1.1. But then the committee decided to drop XSLT 1.1 as a recommendation. So that left Saxon in the strange position of implementing a non-existent extension to XSLT.
The other outcome of this process was that XSLT (1.0) does not have a way of producing more than one output file from an input file. And so the short answer to your question is "Trax can't do that." However, XSLT 2.0 will be able to do that, although it is not yet a formal W3C recommendation, and when it does become one it will take a while before there are good implementations of it. (I predict that Saxon will be the first good implementation.)
One of the problems with XML and XSLT is that what you knew a year ago is probably obsolete now, because of all the evolution going on. So being new in the field is not a disadvantage, unless you get stung by reading obsolete tutorials or magazine articles. -
Printing messages in Log File and Output File using Dbms_output.put_line
Hi,
I have a requirement of printing messages in log file and output file using dbms_output.put_line instead of fnd_file.put_line API.
Please let me know how can I achieve this.
I tried using a function to print messages and calling that function in my main package where ever there is fnd_file.put_line. But this approach is not required by the business.
So let me know how I can achieve this functionality.
Regards
SandyWhat is the requirement that doesn't allow you using fnd_file.put_line?
Please see the following links.
https://forums.oracle.com/forums/search.jspa?threadID=&q=Dbms_output.put_line+AND+Log+AND+messages&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
https://forums.oracle.com/forums/search.jspa?threadID=&q=%22dbms_output.put_line+%22+AND+concurrent&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
Thanks,
Hussein -
How to capture output of java files using Runtime.exec
Hi guys,
I'm trying to capture output of java files using Runtime.exec but I don't know how. I keep receiving error message "java.lang.NoClassDefFoundError:" but I don't know how to :(
import java.io.*;
public class CmdExec {
public CmdExec() {
public static void main(String argv[]){
try {
String line;
Runtime rt = Runtime.getRuntime();
String[] cmd = new String[2];
cmd[0] = "javac";
cmd[1] = "I:\\My Documents\\My file\\CSM\\CSM00\\SmartQ\\src\\E.java";
Process proc = rt.exec(cmd);
cmd = new String[2];
cmd[0] = "javac";
cmd[1] = "I:\\My Documents\\My file\\CSM\\CSM00\\SmartQ\\src\\E";
proc = rt.exec(cmd);
//BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
BufferedReader input = new BufferedReader(new InputStreamReader(proc.getErrorStream()));
while ((line = input.readLine()) != null) {
System.out.println(line);
input.close();
catch (Exception err) {
err.printStackTrace();
public class E {
public static void main(String[] args) {
System.out.println("hello world!!!!");
}Please help :)Javapedia: Classpath
How Classes are Found
Setting the class path (Windows)
Setting the class path (Solaris/Linux)
Understanding the Java ClassLoader
java -cp .;<any other directories or jars> YourClassNameYou get a NoClassDefFoundError message because the JVM (Java Virtual Machine) can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run.
javac -classpath .;<any additional jar files or directories> YourClassName.javaYou get a "cannot resolve symbol" message because the compiler can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run. -
Hello everybody,
I am working on uploading file from page to another one using HTP package, but whenever I submit the form, it only takes the filename without the full path.
for example :
if i sent 'c:\dir\a.txt' , the other page receives file parameter as 'a.txt'
the code is here
PROCEDURE upload(appno in varchar2,wsct in varchar2) AS
l_real_name VARCHAR2(1000);
BEGIN
HTP.htmlopen;
HTP.headopen;
HTP.title('Test Upload');
HTP.headclose;
HTP.bodyopen;
HTP.header(1, 'Test Upload');
HTP.print('<form action="https://ssltrng.uaeu.ac.ae/trng/document_api.upload1" method="get">');
HTP.print(' File to upload: <input type="file" name="file" >
HTP.print(' <input type="submit" value="Upload">');
HTP.print('</form>');
HTP.bodyclose;
HTP.htmlclose;
END upload;
the other page see it as
file is 'Water lilies.jpg'
Thanks
Edited by: dtabed on Mar 30, 2011 1:02 AMDo not understand the problem.
The code you've posted is a PL/SQL web enabled procedure that produces a dynamic HTML page. This page contains a form. And a full URL reference to the CGI that will process the form's data.
This is unusual - as it seems to be that the form is submitted across domains and web servers.. You usually refer to a local CGI procedure to deal with a form - no need for a fully qualified URL that includes web server and domain name.
If the CGI procedure that receives the form is also a PL/SQL web enabled procedure, that the uploaded file will be placed in the documents table (as defined in the DAD alias) by mod_plsql, prior to the web enabled procedure being called. The documents table will contain the Mime type, file name, file contents and other details. -
Using opendata set to output a file
Hi,
I have a query in using open dataset command.
let us consider this scenario as an example.
I need to select 5 fields from mara table and I want to display the output in a flat file.Later, I have to read the data from the flat file and to display the output in sap screen.
Can someone help me on doing this and also if you send me the code , it will be useful for me to understand.
Thanks,
Stal.Hi Stalin,
Download data to a unix file :
1) Declare parameter p_file LIKE rlgrap-filename OBLIGATORY.
(convert logical file to physical file using FM file_get_name)
2) Declare internal table and work area
3) OPEN DATASET <dsn> FOR OUTPUT
4) Retrieve data and store in internal table
5) For each record use statemet Transfer <f> to <dsn>
Upload data from unix file :
1) OPEN DATASET <dsn> FOR INPUT IN TEXT MODE.
2) Within statement Do... Enddo use READ DATASET <dsn> INTO internal table
3) Using internal table display the data in screen
With Regards,
Gandhi Subramani -
Using scripts/image processor to output png files
Hello,
I need to resize a batch of pngs and would like to use scripts/image processor. My original files are png files. There appears to be no option for outputting pngs -but i must output the files as tranparent pngs.
I'm using ps cs6 on mac os 10.6.8.
Thanks!Well, I'll be…! How come Russell Brown gets all the credit for it? ??!
Aha! Here are the clues:
/ ImageProcessorNG.jsx
// $Id: ImageProcessorNG.jsx,v 1.88 2012/03/15 21:24:40 anonymous Exp $
// Copyright: (c)2012, xbytor, Adobe Systems, Inc.
// 2011-03-21
// Written by [email protected]
// c2007 Adobe Systems, Inc. All rights reserved.
// Produced and Directed by Dr. Brown ( a.k.a Russell Preston Brown )
// Written by Tom Ruark and Mike Shaw
// UI Design by Dr. Brown -
I have a recorder that outputs wma files. How can I get garageband to use my wma files?
I have a recorder that outputs wma files. How can I get garageband to use my wma files?
I don't think that GarageBand can use wmas, but there's always good old conversion, and GarageBand can definitely use mp3s. Personally, I recommend media.io for stuff like this, but of course it depends on the size of your files. Otherwise I don't know that there's anyway to get GarageBand to work with them...
-
I like to generate an XML output file using the PLSQL. Can any one help with an example (using EMPand DEPT). I tried the forum but seems confusing to me...
This is URGENT so please rush!Please refer to the following post:
page 0 security: authorization scheme not applied to other pages
Maybe you are looking for
-
I recently upgraded to iTunes 11.1.5 and now my iPod Nano is not recognized in iTunes. I also upgraded my iPhone 5s to iOS 7.1. i Tunes on my computer does recognize my iPhone. What is the problem with my iPod Nano not being recognized?
-
PowerPoint 2013 - We're sorry something went wrong...
We've recently upgraded to Office 2013 Professional Plus from Office 2010. Our Workstations are Windows 7 x64 SP1 and this issue is happening on freshly built machines and established installs. When a limited user creates a new presentation, launches
-
Writing to and Opening a Text File from an Apex Application
Hi there I would like to open a text document from apex. I have a screen with various parameters. Based on what the user selects, the result must open a text document with the parameters and other text. Does anyone know a good way to do this? Thanks
-
hi, i have a jsp code which can successfully return results from MySQL database. But once i change the SQL statement from a select statement to a insert statement, it does not add in a new row in the database. It has no error while compiling but it a
-
Setting up Exchange Server 2010
Anyone know of a thread that shows a good way to setup exchange 2010 to work well internally and externally?