Problems when downloading a file using jspsmartupload
i am using jakarta tomcat 4.03 in linux ....
to upload the file its ok .... im using this code here :
String path = application.getRealPath("/upload");
try {
count = mySmartUpload.save(path);
it works fine ......
but when i try to download ..... putz .... its a f$##%#$% hell
anybody knows how to download ???
hi thr...
see since i am using javawebserver i have a public html folder whr i have saved all the files which the site accesses . Now in the public html folder i have made a folder upload and i upload all the files to this folder.
count = mySmartUpload.save("/upload/");
Now for download use this ...
<%@ page language="java" import="com.jspsmart.upload.*"%><jsp:useBean id="mySmartUpload" scope="page" class="com.jspsmart.upload.SmartUpload" /><%
// Initialization
mySmartUpload.initialize(pageContext);
// Download file
mySmartUpload.downloadFile("/upload/sample.zip");
%>
this should work ...
if this doesnt lemme know
prob u r path should be ("/upload/")
u have given as ("/upload"); try this 2 ... and do lemme knw
Similar Messages
-
I am having a problem when downloading a file. What can I do?
Today (April 8, 2011) when I tried to download a file (.zip) firefox froze. When firefox got to the download window (i.e where you choose to save the file onto you computer) it froze. It wouldn't save the file, nor would it let me close the download window and cancel the download. This has happen twice this year. I had to force quit the program. I am on the latest version of Mac OS X and firefox 3.6.16.
See this article: [[Firefox Hangs]]
''<hr>Note: If anyone's reply has solved your problem, then please mark that reply as "Solved It" to the right of that reply after logging in your account. It will help us to concentrate on new questions.'' -
Xslt ecc6 ISO-8859-1 problem when download xml file
Hello,
i create an ABAP test program:
*& Report Z_ABAP_TO_XML *
*& Write the data from an internal ABAP table into an XML document, *
*& and write it onto your frontend computer *
REPORT z_abap_to_xml.
TYPE-POOLS: abap.
CONSTANTS gs_file TYPE string VALUE 'C:\Users\Marco Consultant\Desktop\test.xml'.
* This is the structure for the data to go into the XML file
TYPES: BEGIN OF ts_person,
cust_id(4) TYPE n,
firstname(20) TYPE c,
lastname(20) TYPE c,
END OF ts_person.
* Table for the XML content
DATA: gt_itab TYPE STANDARD TABLE OF char2048.
* Table and work area for the data to fill the XML file with
DATA: gt_person TYPE STANDARD TABLE OF ts_person,
gs_person TYPE ts_person.
* Source table that contains references
* of the internal tables that go into the XML file
DATA: gt_source_itab TYPE abap_trans_srcbind_tab,
gs_source_wa TYPE abap_trans_resbind.
* For error handling
DATA: gs_rif_ex TYPE REF TO cx_root,
gs_var_text TYPE string.
* Fill the internal table
gs_person-cust_id = '3'.
gs_person-firstname = 'Bill'.
gs_person-lastname = 'Gates'.
APPEND gs_person TO gt_person.
gs_person-cust_id = '4'.
gs_person-firstname = 'Frodo'.
gs_person-lastname = 'Baggins'.
APPEND gs_person TO gt_person.
* Fill the source table with a reference to the data table.
* Within the XSLT stylesheet, the data table can be accessed with
* "IPERSON".
GET REFERENCE OF gt_person INTO gs_source_wa-value.
gs_source_wa-name = 'IPERSON'.
APPEND gs_source_wa TO gt_source_itab.
* Perform the XSLT stylesheet
TRY.
CALL TRANSFORMATION z_abap_to_xml
SOURCE (gt_source_itab)
RESULT XML gt_itab.
CATCH cx_root INTO gs_rif_ex.
gs_var_text = gs_rif_ex->get_text( ).
gs_var_text = gs_rif_ex->get_text( ).
MESSAGE gs_var_text TYPE 'E'.
ENDTRY.
* Download the XML file to your client
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = gs_file
CHANGING
data_tab = gt_itab
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
not_supported_by_gui = 22
error_no_gui = 23
OTHERS = 24.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
and i created XSLT test conversion:
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output encoding="iso-8859-1" indent="yes" method="xml" version="1.0"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<CUSTOMERS>
<xsl:apply-templates select="//IPERSON/item"/>
</CUSTOMERS>
</xsl:template>
<xsl:template match="IPERSON/item">
<item>
<customer_id>
<xsl:value-of select="CUST_ID"/>
</customer_id>
<first_name>
<xsl:value-of select="FIRSTNAME"/>
</first_name>
<last_name>
<xsl:value-of select="LASTNAME"/>
</last_name>
</item>
</xsl:template>
</xsl:transform>
Seem all correct infact the program download a file XML but the file have the encoding="UTF-16" also if i have specified "iso-8859-1" and if i tried to opend the xml file the file appears not correct because is generated with as first character "#", why?
Below the xml generated..
What i have to do to generate a correct XML without errors?
#<?xml version="1.0" encoding="utf-16"?>
<CUSTOMERS>
<item>
<customer_id>0003</customer_id>
<first_name>Bill</first_name>
<last_name>Gates</last_name>
</item>
<item>
<customer_id>0004</customer_id>
<first_name>Frodo</first_name>
<last_name>Baggins</last_name>
</item>
</CUSTOMERS>hello all!
i resolve the problem using:
* Perform the XSLT stylesheet
g_ixml = cl_ixml=>create( ).
g_stream_factory = g_ixml->CREATE_STREAM_FACTORY( ).
g_encoding = g_ixml->create_encoding( character_set = 'utf-16' "unicode
byte_order = 0 ).
resstream = g_stream_factory->CREATE_OSTREAM_ITABLE( table = gt_xml_itab ).
call method resstream->set_encoding
exporting encoding = g_encoding.
I think it's the right way, i put all my ABAP program updated:
*& Report Z_ABAP_TO_XML *
*& Write the data from an internal ABAP table into an XML document, *
*& and write it onto your frontend computer *
REPORT z_abap_to_xml.
TYPE-POOLS: abap.
CONSTANTS gs_file TYPE string VALUE 'C:UsersMarco ConsultantDesktop est.xml'.
data: g_ixml type ref to if_ixml.
data: g_stream_factory type ref to IF_IXML_STREAM_FACTORY.
data: resstream type ref to if_ixml_ostream.
data: g_encoding type ref to if_ixml_encoding.
* This is the structure for the data to go into the XML file
TYPES: BEGIN OF ts_person,
cust_id(4) TYPE n,
firstname(20) TYPE c,
lastname(20) TYPE c,
END OF ts_person.
* Table for the XML content
DATA: gt_xml_itab TYPE STANDARD TABLE OF char2048.
* Table and work area for the data to fill the XML file with
DATA: gt_person TYPE STANDARD TABLE OF ts_person,
gs_person TYPE ts_person.
* Source table that contains references
* of the internal tables that go into the XML file
DATA: gt_source_itab TYPE abap_trans_srcbind_tab,
gs_source_wa TYPE abap_trans_resbind.
* For error handling
DATA: gs_rif_ex TYPE REF TO cx_root,
gs_var_text TYPE string.
* Fill the internal table
gs_person-cust_id = '3'.
gs_person-firstname = 'Bill'.
gs_person-lastname = 'Gates'.
APPEND gs_person TO gt_person.
gs_person-cust_id = '4'.
gs_person-firstname = 'Frodo'.
gs_person-lastname = 'Baggins'.
APPEND gs_person TO gt_person.
gs_person-cust_id = '5'.
gs_person-firstname = 'Frodo'.
gs_person-lastname = 'Baggins'.
APPEND gs_person TO gt_person.
gs_person-cust_id = '6'.
gs_person-firstname = 'Frodo'.
gs_person-lastname = 'Baggins'.
APPEND gs_person TO gt_person.
gs_person-cust_id = '7'.
gs_person-firstname = 'Frodo'.
gs_person-lastname = 'Baggins'.
APPEND gs_person TO gt_person.
gs_person-cust_id = '8'.
gs_person-firstname = 'Frodo'.
gs_person-lastname = 'Baggins'.
APPEND gs_person TO gt_person.
gs_person-cust_id = '9'.
gs_person-firstname = 'Frodo'.
gs_person-lastname = 'Baggins'.
APPEND gs_person TO gt_person.
gs_person-cust_id = '10'.
gs_person-firstname = 'Frodo'.
gs_person-lastname = 'Baggins'.
APPEND gs_person TO gt_person.
gs_person-cust_id = '11'.
gs_person-firstname = 'Frodoèé'.
gs_person-lastname = 'Baggins~¦Üu0192'.
APPEND gs_person TO gt_person.
gs_person-cust_id = '11'.
gs_person-firstname = 'Frodoèé'.
gs_person-lastname = 'Baggins~¦Üu0192'.
APPEND gs_person TO gt_person.
gs_person-cust_id = '11'.
gs_person-firstname = 'Frodoèé'.
gs_person-lastname = 'Baggins~¦Üu0192'.
APPEND gs_person TO gt_person.
gs_person-cust_id = '11'.
gs_person-firstname = 'Frodoèé'.
gs_person-lastname = 'Baggins~¦Üu0192'.
APPEND gs_person TO gt_person.
gs_person-cust_id = '11'.
gs_person-firstname = 'Frodoèé'.
gs_person-lastname = 'Baggins~¦Üu0192'.
APPEND gs_person TO gt_person.
gs_person-cust_id = '11'.
gs_person-firstname = 'Frodoèé'.
gs_person-lastname = 'Baggins~¦Üu0192'.
APPEND gs_person TO gt_person.
gs_person-cust_id = '11'.
gs_person-firstname = 'Frodoèé'.
gs_person-lastname = 'Baggins~¦Üu0192'.
APPEND gs_person TO gt_person.
gs_person-cust_id = '11'.
gs_person-firstname = 'Frodoèé'.
gs_person-lastname = 'Baggins~¦Üu0192'.
APPEND gs_person TO gt_person.
gs_person-cust_id = '11'.
gs_person-firstname = 'Frodoèé'.
gs_person-lastname = 'Baggins~¦Üu0192'.
APPEND gs_person TO gt_person.
gs_person-cust_id = '11'.
gs_person-firstname = 'Frodoèé'.
gs_person-lastname = 'Baggins~¦Üu0192'.
APPEND gs_person TO gt_person.
gs_person-cust_id = '88'.
gs_person-firstname = 'Frodoèé'.
gs_person-lastname = 'Baggins~¦Üu0192'.
APPEND gs_person TO gt_person.
* Fill the source table with a reference to the data table.
* Within the XSLT stylesheet, the data table can be accessed with
* "IPERSON".
GET REFERENCE OF gt_person INTO gs_source_wa-value.
gs_source_wa-name = 'IPERSON'.
APPEND gs_source_wa TO gt_source_itab.
* Perform the XSLT stylesheet
g_ixml = cl_ixml=>create( ).
g_stream_factory = g_ixml->CREATE_STREAM_FACTORY( ).
g_encoding = g_ixml->create_encoding( character_set = 'utf-16' "unicode
byte_order = 0 ).
resstream = g_stream_factory->CREATE_OSTREAM_ITABLE( table = gt_xml_itab ).
call method resstream->set_encoding
exporting encoding = g_encoding.
TRY.
CALL TRANSFORMATION z_abap_to_xml
SOURCE (gt_source_itab)
RESULT XML gt_xml_itab.
CATCH cx_root INTO gs_rif_ex.
gs_var_text = gs_rif_ex->get_text( ).
gs_var_text = gs_rif_ex->get_text( ).
MESSAGE gs_var_text TYPE 'E'.
ENDTRY.
* Download the XML file to your client
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = gs_file
FILETYPE = 'BIN'
CHANGING
data_tab = gt_xml_itab
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
not_supported_by_gui = 22
error_no_gui = 23
OTHERS = 24.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*-- we don't need the stream any more, so let's close it...
CALL METHOD resstream->CLOSE( ).
CLEAR resstream. -
What is the problem when opening jpg files using Desktop API
Hi, i would like to open jpg, or gif files using Desktop API, and the application crashes.The Desktop API is supported by my OS, because txt files, or file directories can be opened, mails can be sent, browsing is also supported.
Only jpg and gif, and i think other picture formats cannot be opened.
Obviously ACDSee and other picture viewing programs are installed in my computer.
The corresponding application code can be found at the bottom of the page of http://www.awprofessional.com/articles/article.asp?p=661371&seqNum=2&rl=1
my code:
if(Desktop.isDesktopSupported()){
Desktop desktop=Desktop.getDesktop();
try
desktop.open (fileToOpen);
catch (IOException ioe)
JOptionPane.showMessageDialog (frame,
"I/O problem");
catch (IllegalArgumentException iae)
JOptionPane.showMessageDialog (frame,
"File doesn�t exist");
fileToOpen is obviously a File.
Thx for the help in advance.
Message was edited by:
javahelps
Message was edited by:
javahelps
Message was edited by:
javahelps
Message was edited by:
javahelpsMy file association for jpg files is correct, if i click on a
jpg, ACDSee starts immediately.Although I am a long time Windoze non-user, I vaguely remember that there's a difference between correct file-type association being set and some application starting at a mouse click on a file icon. I also vaguely remember Windoze file-type association mechanism uses a few action-types. Java Desktop should expect a specific action-type for the association. -
Problem when loading xml file using sql loader
I am trying to load data into table test_xml (xmldata XMLType)
i have an xml file and i want whole file to be loaded into a single column
when i use the following control file and executed from command prompt as follows
sqlldr $1@$TWO_TASK control=$XXTOP/bin/LOAD_XML.ctl direct=true;:
LOAD DATA
INFILE *
TRUNCATE INTO TABLE test_xml
xmltype(xmldata)
FIELDS
ext_fname filler char(100),
xmldata LOBFILE (ext_fname) TERMINATED BY EOF
BEGIN DATA
/u01/APPL/apps/apps_st/appl/xxtop/12.0.0/bin/file.xml
the file is being loaded into table perfectly.
unfortunatley i cant hardcode file name as file name will be changed dynamically.
so i removed the block
BEGIN DATA
/u01/APPL/apps/apps_st/appl/xxtop/12.0.0/bin/file.xml
from control file and tried to execute by giving file path from command line as follows
sqlldr $1@$TWO_TASK control=$XXTOP/bin/LOAD_XML.ctl data=/u01/APPL/apps/apps_st/appl/xxtop/12.0.0/bin/file.xml direct=true;
but strangely it's trying to load each line of xml file into table instead of whole file
Please find the log of the program with error
Loading of XML through SQL*Loader Starts
SQL*Loader-502: unable to open data file '<?xml version="1.0"?>' for field XMLDATA table TEST_XML
SQL*Loader-553: file not found
SQL*Loader-509: System error: No such file or directory
SQL*Loader-502: unable to open data file '<Root>' for field XMLDATA table TEST_XML
SQL*Loader-553: file not found
SQL*Loader-509: System error: No such file or directory
SQL*Loader-502: unable to open data file '<ScriptFileType>' for field XMLDATA table TEST_XML
SQL*Loader-553: file not found
SQL*Loader-509: System error: No such file or directory
SQL*Loader-502: unable to open data file '<Type>Forms</Type>' for field XMLDATA table TEST_XML
SQL*Loader-553: file not found
SQL*Loader-509: System error: No such file or directory
SQL*Loader-502: unable to open data file '</ScriptFileType>' for field XMLDATA table TEST_XML
SQL*Loader-553: file not found
SQL*Loader-509: System error: No such file or directory
SQL*Loader-502: unable to open data file '<ScriptFileType>' for field XMLDATA table TEST_XML
SQL*Loader-553: file not found
SQL*Loader-509: System error: No such file or directory
SQL*Loader-502: unable to open data file '<Type>PLL</Type>' for field XMLDATA table TEST_XML
SQL*Loader-553: file not found
SQL*Loader-509: System error: No such file or directory
SQL*Loader-502: unable to open data file '</ScriptFileType>' for field XMLDATA table TEST_XML
SQL*Loader-553: file not found
SQL*Loader-509: System error: No such file or directory
SQL*Loader-502: unable to open data file '<ScriptFileType>' for field XMLDATA table TEST_XML
please help me how can i load full xml into single column using command line without hardcoding in control file
Edited by: 907010 on Jan 10, 2012 2:24 AMbut strangely it's trying to load each line of xml file into table instead of whole fileNothing strange, the data parameter specifies the file containing the data to load.
If you use the XML filename here, the control file will try to interpret each line of the XML as being separate file paths.
The traditional approach to this is to have the filename stored in another file, say filelist.txt and use, for example :
echo "/u01/APPL/apps/apps_st/appl/xxtop/12.0.0/bin/file.xml" > filelist.txt
sqlldr $1@$TWO_TASK control=$XXTOP/bin/LOAD_XML.ctl data=filelist.txt direct=true; -
I have formatting problems when deploying Help files using RoboHelp 8
When i deploy the Help files. The formatting of the Numbering/bullets are affected and it is parts of the help files that i have not changed. Is there something else that i need to do to fix it?
More information needed to help you.
What sort of help are you generating?
Are you saying it is OK in Design Editor and not in a brower, if you are generating WebHelp? If yes, what browser and is it the same in all browsers?
There are some pages on Lists on my site.
See www.grainge.org for RoboHelp and Authoring tips
@petergrainge -
How to download a file using servlet
I have a problem about downloading a file using a servlet.
Anybody can help me?
ThanksI am assuming that you want to write a servlet that, when invoked by a user (for instance, through a URL link), will download a file using the "save as" dialog (on Windows, for example) in the user's browser.
In such a case, all you need to do is get the OutputStream from the response object, set the proper MIME type header, and write the file. Here is an (untested, not even compiled) skeleton.
public class MyServlet extends HttpServlet {
protected void doGet (HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
ServletOutputStream out = resp.getOutputStream ();
resp.setContentType ("application/x-foobar");
while (/* whatever */) {
In this loop, you generate your "file's" data.
You can compute it on the fly, pull it from a database,
read it from a "real" file, or any other means you can dream up.
The sample line below just writes some of the data (for example,
a byte array) to the user's browser via the output stream out.
out.write (data);
out.flush ();
Go to http://java.sun.com/j2ee/sdk_1.3/techdocs/api/index.html
for the JavaDoc on the classes used.
Cheers!
Jerry Oberle -
I can not download any files using Safari ? when I choose to download application file the URL include the file name and stop responding. Any help??
Please read this whole message before doing anything.
This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
Step 1
The purpose of this step is to determine whether the problem is localized to your user account.
Enable guest logins* and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up a guest account” (without the quotes) in the search box.
While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
Test while logged in as Guest. Same problem(s)?
After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
*Note: If you’ve activated “Find My Mac” or FileVault in Mac OS X 10.7 or later, then you can’t enable the Guest account. The Guest login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
Step 2
The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login.
Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:
Be sure your Mac is shut down.
Press the power button.
Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).
Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.
The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
*Note: If FileVault is enabled under Mac OS X 10.7 or later, you can’t boot in safe mode.
Test while in safe mode. Same problem(s)?
After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2. -
I've been bitten by the "Missing MSVCR.dll file" problem when downloading the latest iTunes update, 11.4.62 (on a PC w/ Win-7 & Outlook-2007#. 'Have followed Apple's instructions of un-installing all Apple software, and re-installing it (Ugh). First result Outlook couldn't find my 1,385 item contact file in iCloud, although the outlook distribution lists were there. Second result, upon installing iCloud again, I have two iCloud contact files shown in outlook - "iCloud" & iCloud, within iCloud". 1,332 & 1,385 contacts respectively.
Plus an iCloud installation error message saying iCloud moved 6,835 files to a "deleted items folder" somewhere. This is NOT fun at 72-yrs old...!!
So, how do I make sure I haven't lost anythying from Outlook? Russ-AZInteresting response, Kappy - Back to original post: "First result: Outlook couldn't find my 1,385 item contact file in iCloud, although the outlook distribution lists were there (therefore, initially I had lost my contact file from Outlook). Second result, upon installing iCloud again, I now have two iCloud contact files shown in Outlook - "iCloud" & iCloud, within iCloud". W/ 1,332 & 1,385 contacts respectively.
Plus an iCloud installation error message saying iCloud moved 6,835 files to a "deleted items folder" somewhere. This is NOT fun at 72-yrs old...!!
So, how do I make sure I haven't lost anythying from Outlook? Russ-AZ"
You can safely assume that I have tried using it! So, to make things a little clearer:
1) I now have two iCloud "contacts files", w/ a different total count. What's the difference? Why the different toatl count?
2) Since re-installing the Apple software (part of the MSVCR" recovery instructions) "couldn't possible affected Outlook", why am I getting an iCloud installation error message saying iCloud moved 6,835 files to a "deleted items folder" somewhere. What's in those files? And where are they?
Probably more important questions get down to:
3) Why is a basic Apple product upgrade "screwing-up Outlook"? This iTunes upgrade, failing to install properly forced Outlook 2007 into a 2-min start-up cycle. Which was fixed with this "Goat-Rpdeo" of re-installing MSVCR80.dll.
4) And under the latest release of iOS-7.0.4 on our iPhones, why is Apple now forcing us to use the iCloud to back-up our contacts, calendars & tasks, vs. allowing these files to be backed-up directly on our PC's via the USB cable?
Thanks again for your interest and comments. - Russ-AZ -
I am running 4.0.1 and when I download something the Download box stays blank-even though I have selected in General Preferences 'Show the downloads window when downloading a file' AND selected 'Save files to Downloads'....???
In Firefox Options / Privacy be sure "Remember download history" is checked. To see all of the options on that panel, "Firefox will" must be set to "Use custom settings for history".
To find your OS information, on your Windows desktop, right-click the My Computer icon, choose Properties, under System on that small window is info about your OS.
'''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.''' -
How to skip when downloading a files?
I'm writting an application to download files from an URL. I want to support resumming. But when the download continued, I found that the method skip() for InputStream is not working. For example :
InputStream is = new BufferedInputStream (urlConnection.getInputStream ());
try { long r = is.skip (bytesDownloaded); }
catch (Exception e) { }
But the return value in r is not equal to bytesDownloaded.
Is there someone tell me what happened and how to solve this problem?
Thanks a lot!Hai Peter,
thanks for ur ideas. i am involved in a similar
ilar work. can u specify the particular HTTP header,
which is used to tell the server to skip certain
bytes. thanks for u response.
regards
hariInstead of skipping in HTTP there is a heads which lets you specify the range of data that you want.
I do not remember the header.
But there is a way to find out
There is a download manager software called FlashGet dounload it and try to download a file using it. It shows all the communication goes bitween the server and client in a console. So you can clearly see all the headers.
Thats how I find it out -
Null pointer exception while downloading a file using a servlet
Hi all
I am getting the following error when downloading a file
by invoking a servlet ...
The following is the offending piece of code which has the
problem ..
protected void doGet( HttpServletRequest req,
HttpServletResponse resp ) throws ServletException,IOException
resp.setContentLength ( length );
OutputStream out = resp.getOutputStream();
FileInputStream is = new FileInputStream(file);
WriteToStream(is, out);
out.flush(); // Error happens here
out.close();
java.lang.NullPointerException
at weblogic.servlet.internal.ChunkOutput.clearBuffer(ChunkOutput.java:231)
at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:251)
at weblogic.servlet.internal.ChunkOutputWrapper.flush(ChunkOutputWrapper.java:152)
at weblogic.servlet.internal.ServletOutputStreamImpl.flush(ServletOutputStreamImpl.java:119)
at com.epeople.servlet.FileDownloadServlet.doFileRequest(FileDownloadServlet.java:127)
at com.epeople.servlet.FileDownloadServlet.doGet(FileDownloadServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:24
56)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2047)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Any help will be greatly appreciated.
thanks,
sri kumar
Hi all
I am getting the following error when downloading a file
by invoking a servlet ...
The following is the offending piece of code which has the
problem ..
protected void doGet( HttpServletRequest req,
HttpServletResponse resp ) throws ServletException,IOException
resp.setContentLength ( length );
OutputStream out = resp.getOutputStream();
FileInputStream is = new FileInputStream(file);
WriteToStream(is, out);
out.flush(); // Error happens here
out.close();
java.lang.NullPointerException
at weblogic.servlet.internal.ChunkOutput.clearBuffer(ChunkOutput.java:231)
at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:251)
at weblogic.servlet.internal.ChunkOutputWrapper.flush(ChunkOutputWrapper.java:152)
at weblogic.servlet.internal.ServletOutputStreamImpl.flush(ServletOutputStreamImpl.java:119)
at com.epeople.servlet.FileDownloadServlet.doFileRequest(FileDownloadServlet.java:127)
at com.epeople.servlet.FileDownloadServlet.doGet(FileDownloadServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:24
56)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2047)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Any help will be greatly appreciated.
thanks,
sri kumar
-
Windows 8.1 account limit problem when downloading from store
windows 8.1 account limit problem when downloading from store
I have 250 windows 8.1 tablets.
I figured since you can use the same account on 81 devices id create 4 accounts.
I need to download more than 25 free apps from the store
on each tablet. Putting the same account don't work. (comes up with an error after putting on to many devices that you cant use this account now).
Whats the best way to do this ? and what if I need to download a paid app ?
Thank You.Hi,
As far as I know, One Microsoft Account may bound at most five Trusted computers. There is no way to break this limitation.
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected] -
When downloading a file, "open" option does not appears, only "save" does
Before updating to 5.0, when downloading a file, I could select between "Open" and "save". Now I don't have the "Open" option. I need it because of my work and is a must have or it will take to much time to save and then opening them. In normal morning with "open" option took me like 30 minutes. Now it took me 1.5 hours and can't afford to loose that much time.
Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
*Do NOT click the Reset button on the Safe mode start window or otherwise make changes.
*https://support.mozilla.org/kb/Safe+Mode
A possible cause is that the server sends a wrong response header.
The server may not comply to RFC 5987 and sends a wrong Content-Disposition:attachment; filename header.
* https://developer.mozilla.org/en/Firefox_8_for_developers#Network -
when downloading large files such as videos of a television season do you need to turn off autolock to prevent download from halting? And if so, if the download will take a significant amount of time (not sure how much offhand) how do you prevent burn in from prolonged screen image?
Among the alternatives not mentioned... Using a TiVo DVR, rather than the X1; a Roamio Plus or Pro would solve both the concern over the quality of the DVR, as well as providing the MoCA bridge capability the poster so desperately wanted the X1 DVR to provide. (Although the TiVo's support only MoCA 1.1.) Just get a third-party MoCA adapter for the distant location. Why the hang-up on having a device provided by Comcast? This seems especially ironic given the opinions expressed regarding payments over time to Comcast. If a MoCA 2.0 bridge was the requirement, they don't exist outside providers. So couldn't the poster have simply requested a replacement XB3 from the local office and configured it down to only providing MoCA bridging -- and perhaps as a wireless access point? Comcast would bill him the monthly rate for the extra device, but such is the state of MoCA 2.0. Much of the OP sounds like frustration over devices providing capabilities the poster *thinks* they should have.
Maybe you are looking for
-
HP Photosmart 7520 e-All-in-One Printer - WHEN i AM TRYING TO MAKE A COPY COPY OF AN A4 DOCUMENT WITH A4 PAPER INSTALLED. iT KEEPS PUTTING THROUGH A BLANK SHEET AND SAYING INCORRECT PAPER SIZE. HELP!! I HAVE CHECKED FOR UPDATED SOFTWARE ETC, CLEAN
-
Cannot embed pdfs in Word doc which are PDF Version 1.3 (Acrobat 4.x) [This is associated with Adobe Reader 9]. Getting 'program not installed' error. Pdfs with other versions are okay: Tested successfully with Adobe Pro 9 (Version 1.5 (Acrobat 6.x))
-
Browsers not loading images, pages loading like text pages.
I've had an issue for months now that comes and goes where images will not load on any browser I use. When the issue comes up, I'll open all the browsers I have to find its occuring on all of them, they are: Safari, Chrome and Firefox. I'm also getti
-
I'm thinking of getting a 4G Touch, and I'm wondering if it has a disc mode capability like my current 5G iPod. I am using the camera adapter to move images off my camera onto the iPod as a temporary 'on the road' storage device, is this possible wit
-
Is it possible to change javascript popup colour?
in the current version, when a alert/confirmation dialog opens with background grays, the default color of the popup is half white(top) and half light-gray(bottom) . Is it possible to make it to one color( by any coding changes (or) settings in Firef