How to track no of bytes transferred
Hi there,
how to track no of bytes transferred
while downloading a file using java servlets.
please note that i am not writing any client side application like applet...
Hence I want to track no of bytes transffered to client end from my server (using servlets)
Please kindly help me out as soon as possible.
awaiting the solution immediately.
thanks,
venkat
//the following is the code what i have written in my servlet.
res.setContentType(MIME); // I hava parameterised the MIME tag
OutputStream out=res.getOutputStream();
int counter=0;
File f1 = new File("c:/x.pdf");
//int k=(int)f1.length();
fis = new FileInputStream(f1);
byte[] buffer=new byte[fis.available()];
fis.read(buffer);
for(i=0; i<buffer.length; i++)
try
counter=i+1; //getting the number of bytes got transferred
out.write(buffer,i,1); //write to client's directory
catch(IOException ex)
System.out.println("exception while download="+ex.getMessage());
downloaded=true;
if(counter!=buffer.length)
download_error="Not Downloaded";
download=false;
//while executing the above servlet, the servlet prompts for a save as dialog (without file extension, please note I have specified the MIME tag also).
Now the client is entering the file and clicking save
In between he cancels and file is not downloaded to the client's directory.
Now the counter length should not match with the buffer.length, but it is matching exactly and stating that the file has been downloaded properly.
I hope you would have understood my problem.
Also note that I dont have any client side application to monitor the download.
Please let me know how to solve the problem as soon as possible
expecting your reply at the earliest thanks.
Similar Messages
-
How to calculate the total of bytes transferred when I submit a PDF Form in A. Reader
Hello,
I need to know some way for calculate the total of bytes transferred when I submit a PDF form using JavaScript, hereby:
b ******************************************************************
i var service_url = http://some_webservice/;
i var send_type = "PDF";
i var doc = event.target;
i doc.submitForm( { cURL: service_url, cSubmitAs: send_type } );
b ******************************************************************
b The reason:
I need to indicate the percentage of bytes sent to the server, in real time. Adobe Acrobat shows a progress bar and the transferred quantity in bytes, but Adobe Reader doesn't. Is in this case, when I need to find a way in order to make something similar.
b Than you for your time.You can use SharePoint Designer and calculate the total in xslt view. Refer to the following post for more information
http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2009/04/24/how-to-total-calculated-columns-in-a-sharepoint-list.aspx
http://blog.metrostarsystems.com/2012/12/03/jennys-sharepoint-tip-sum-calculated-columns/
Cheers, -
Hi friends,
I am a XI consultant. My query is regarding how to track the chages.I heard that CDHDR and CDPOS tables are used to store the information regarding the changes made to the objects/tables in SAP.My scenario is i have a table having few fields related to P.o and a flag indiacating Insert/Update/Delete, so upon the creation/upadate/deletion of a P.O(related to perticular WBS Element) i want the data to be transfered into my table automatically.
Is there any standard transaction available to do that....means i want to track all the P.Os under a perticular WBS element..
If not Do we have to write a Abap program and use CHANGEDOCUMENT_READ_HEADERS,CHANGEDOCUMENT_READ_POSITIONS functions to store the data into internal tables ?????
Regards,
Gowtham K.HI gowtham,
Yes, u are right,
we have to right some abap code.
"CHANGE DOCUMENTS" in SAP Terminology
1 The same thing which u are asking
we had developed here. For Eg : Any change
in the material master will be detected
and a mail will be sent to the concerned
employee.
THIS WILL ALSO DETECT WHICH FILEDS HAVE CHANGED.
IT CAN ALSO GIVE, The Old Value, And The New Value.
2. This Mechanism is called CHANGE DOCUMENTS in
SAP Terminology
3. 2 Fuction Modules are Required.
(They will fetch necessary data from CDHDR,CDPOS)
CHANGEDOCUMENT_READ_HEADERS
CHANGEDOCUMENT_READ_POSITIONS
4. The First FM gives list of all
records ( with change no) which have changed.
5. Loop at the above and the second FM will
provide the details (old-val, new-val) for
each record.
6. While using 1st Fm, i used docclass as 'MATERIAL'.
BCOS
the concept of change documents is applicable
to other type of documents also (depends upon
customization)
regards,
amit m. -
How to track the flow of Sharepoint SSRS report requests to troubleshoot slowness
How to track the flow of requests of Integrated SSRS report links in Sharepoint.
We are using SSRS with Sharepoint for reporting purpose. The issue is some of the reports get generated fast and some other reports generation is very slow. When the sql query of these reports RDL file is executed, the records are shown fast.
Also even on clicking the "Add Subscription" link of "Manage Subscriptions" of a report is very slow for some reports, while it is fast for other reports.
I tried enabling SQL profiler to track the requests. I have checked profiler log for the SQL statements with exec sp_executesql. But they are not helpful.
Pls advice on how to track the request of flow of SSRS report request in sharepoint and how to troubleshoot the slowness in "Add Subscription" link, response of some reports.Hi Pradeesh,
According to your description, my understanding is that you want to track SharePoint SSRS report requests to troubleshoot the performance.
Developer dashboard is very help full while troubleshooting the issues related to performance in SharePoint 2013. You can have a try.
About Developer dashboard, you can refer to the links:
http://www.sharepoint-journey.com/developer-dashboard-in-sharepoint-2013.html
http://msdn.microsoft.com/en-us/library/office/ff512745(v=office.14).aspx
Best Regards,
Wendy
Wendy Li
TechNet Community Support -
I had an iPhone 4 with all my music on it. Got rid of my desktop when I got an iPad. Now I have iPhone 4S. How do I get my music transferred from old phone to 4s and iPad without a desktop with iTunes on it?
Restore the device from the backup created.
If no backup exists, there is nothing to recover. -
How to track return message in file to proxy interface
I am using file to proxy scenerio, where i will get my file from FTP and updating it into a table , after updating i am calling a program to Run BDC, in my method for proxy, after that i dont how to track return message , anyone please tell me suggestion regarding for this
thanking you
SridharHi Sridhar,
What exactly you want to track????
my assumtion is the call will be of asyn mode, once the data reach the proxy method the XI job done and u can easly track that using monitoring.
Regards,
Phani -
How to track Service Item in Install Base
Hi,
How to track a Service Item in Install Base. If I'm right, when we define the item as Service Item in Inventory, Install Base Trackable cannot be enableed...
Scenario:
Customer is doing some services to its customer which has a contract for 1 Year. So we are creating service as Service Item in Inventory and then we create a contract for this service item.
How do we track this in Install Base?
Please help
Thanks & Regards,
Pavithara R.Hi,
A service item by definition need not be tracked in IB. The service may be provided on a machine or asset which will be tracked in IB. Since service item is not a tangiable item, it is not IB trackable.
Kindly explain the business scenario to track the service item in IB.
Regards -
Dear Experts,
Please help me in checking why virtual bytes in perfmon is taking more than memory we allocated.
OS
Windows Server 2003 R2 Enterprise x64 Edition Service Pack 2 (build 3790)
ORACLE
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for 64-bit Windows: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production
Total RAM on box is 8G
Page File
Windows virtual memory equal on C,D,E,F drives is set to 12273M and allocated now is 11262M
LPENABLED is not set
SQL> show parameter pga_
pga_aggregate_target 0
SQL> show sga
Total System Global Area 5344731136 bytes
Fixed Size 2114736 bytes
Variable Size 4630514512 bytes
Database Buffers 671088640 bytes
Redo Buffers 41013248 bytes
SQL> show parameter memory
hi_shared_memory_address 0
memory_max_target 5G
memory_target 5G
shared_memory_address 0
SQL> show parameter sga
lock_sga FALSE
pre_page_sga FALSE
sga_max_size 5G
sga_target 0
Question :
Why oracle.exe is taking 8G virtual; bytes, memroy target can not go beyond 5G. How to minimized the virtual byte in perfmon
Thanks in advance your time and help.John, Thanks for the reply.
Please find the output of query
SQL> select pool,sum(bytes) from v$sgastat group by pool;
POOL SUM(BYTES)
915543216
java pool 67108864
streams pool 268503944
shared pool 2147494008
large pool 67108864
SQL>
SQL> select * from v$pgastat;
NAME VALUE UNIT
aggregate PGA target parameter 671088640 bytes
aggregate PGA auto target 147564544 bytes
global memory bound 104857600 bytes
total PGA inuse 533962752 bytes
total PGA allocated 810819584 bytes
maximum PGA allocated 1244466176 bytes
total freeable PGA memory 90243072 bytes
process count 450
max processes count 588
PGA memory freed back to OS 1.9883E+10 bytes
total PGA used for auto workareas 28210176 bytes
maximum PGA used for auto workareas 39973888 bytes
total PGA used for manual workareas 0 bytes
maximum PGA used for manual workareas 531456 bytes
over allocation count 7
bytes processed 2.6307E+10 bytes
extra bytes read/written 0 bytes
cache hit percentage 100 percent
recompute count (total) 72720
19 rows selected.
SQL>
SQL> show parameter _target
NAME TYPE VALUE
archive_lag_target integer 0
db_flashback_retention_target integer 1440
fast_start_io_target integer 0
fast_start_mttr_target integer 0
memory_max_target big integer 5G
memory_target big integer 5G
pga_aggregate_target big integer 0
sga_target big integer 0
SQL> sho parameter sga_max
NAME TYPE VALUE
sga_max_size big integer 5G -
How do I stop itunes from transferring apps from my ipad or iphone to my pc ?
How do I stop iTunes from transferring apps from my iPad or iPhone to my PC ? I have App sync turn off and I have add files to library turned off. Yet every time
I sync iTunes transfers all my apps to my PC. I have 20-30 gig of apps on each. A lot of them are 1gig each and it takes for ever to sync , plus I don't want 100 gig of apps just sitting on my hard drive for no reason. Any app I ever want is always available in the cloud so what's the point of having them on my PC in the 1st place?I'm pretty sure that the space is used up on your computer's hardrive.
Anyway my solution to this nuisance of apps/itunes transfer was to allow itunes to download the apps from my phone...
...First of all I had tried to uncheck a few boxes in itunes a) automatically sync when device is connected (in the summary section) b) prevent devices from syncing (edit>preferences>devices) and c) Automatically sync new apps (apps section of device)
HOWEVER, when I would click sync in any section, apps tried to transfer to itunes from my iphone.
So after all my apps went on my computer (approx. 9 GB), I checked the boxes back, disconnected my device and deleted all the apps from itunes and my computer simultaneously (by clicking del/move to recycle bin).
Now when I connect my iphone it does it's backup/sync thing automatically ...but no apps try to transfer
Note: apps from your library cannot be set to sync with your device
I can now also click sync in any section and no apps transfer.
(This problem started when I downloaded an app from itunes rather than my device and I later transfered the app to my device. My apps section in itunes is completely empty now and no apps appear in windows explorer either)
the only thing I am unsure of now is; what's going to happen if I purchase an app from itunes on my pc again ...I'm guessing I'll have to repeat the process (might want to avoid that) -
Start Routine to load flat file - how to track filename in transformation
Hi,
Could you please help me to write a start routine to bring data from a flat file with a file name week45_c1_pri_2006, where the wekk name week-- changes per week. how to track the filename in the routine and how in data transfer process knows to load data from each flat file.
Message was edited by:
Anima MPROGRAM trans_routine.
CLASS routine DEFINITION
CLASS lcl_transform DEFINITION.
PUBLIC SECTION.
Attributs
DATA:
p_check_master_data_exist
TYPE RSODSOCHECKONLY READ-ONLY,
*- Instance for getting request runtime attributs;
Available information: Refer to methods of
interface 'if_rsbk_request_admintab_view'
<b>p_r_request
TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.</b>
<i>The bold area above where you get the requestid, here I am stuck.
The below code does not bring the correct requestid of PSA</i>
CALL METHOD P_R_REQUEST->GET_REQUID30
RECEIVING
R_REQUID30 = IREQUID.
CALL METHOD P_R_REQUEST->GET_REQUID
RECEIVING
R_REQUID = IREQUID.
SELECT FILENAME INTO IFILENAME FROM rsseldone WHERE rnr = IREQUID AND lnr = ' 1'.
Hope this can give a better picture where I am currently stuck not able to get the PSA request id in the <b>start routine of transformation</b> to read the data and filename from there.
Thanks alot
Anima -
How to Track changes of Detail and header at purchase document
Hi
I have one problem while issueing the output type i created new output type created new output routine and i have to track the header changes and issue proper output and prevent to issue wrong output type
example : zne1 for header changes and zneu for detail level but i cannot track the header level changes becoz cdhdr and cdpos tables are updated after output routines (800 and 801 newly created and assigned)
can u please tell me how to track the po level changes so i can solve this problem ASAP
it is urgent !!! please help me in this !!
thanks in Advance !!!Hi Mr. Modi,
Can you clarify your scenario properly that I can analyse it to give you proper solution....I am confuse with your requirement and example which you have given...
Cheers,
Sagun Desai.... -
How to track changes on Infoprovider?
Hi Gurus,
Could you please provide the steps of how to track changes on Infoprovider? I had 4 Infocubes (belonging to the same info area) that contains compressed data - but now when I tried to display the data, all the cube are empty - no data were aechived.
I would like to track any actions that were made on those cubes.
Thanksthanks Kumar for helping me out here
I tried RSD_CUBE_LOG_DELE function module - It came out "no logs found in the database"
I tried tables RSDRDLOGHEADER and RSDDSTATDELE which provide me deletion informations like user name... but since we have partially archived those specific infoproviders in the same period of time where I think eveything was gone from cube, I am not able to related when and who the data that were not archived were deleted from Infocube
Under manage Infocube --> archiving tab, all the created archiving request are only for certain dates (below 2006). I know that we had data above 2006.
Kindly provide additional inputs.
Thanks -
How to track changes for the config done directly in quality client-Reg
Hi,
In our system the landscape is Dev,Quality,Production.
For some transactions we will do the config in dev and transport to other clients or maintain in each client manually.Eg QS41,CI41.
In my case ,I have did the config in CI41 and transported to other clients.But someone user get in to CI41 in Quality client and did some changes. Now how to track the user Id through which the changes has been performed in QA directly.
Regards
SBhi
you can use SE09 for displaying the transport no where you can see all the request nos ,from there you can check
also use the same transaction Cl41 do some changes like description ,then press the save button ,system will prompt you the previous saved Request No and make a note of it .cancel the request generation ,then you can trace them in SE09
also check whether you can find any change documents is available
regards
thyagarajan -
Hi All,
I want to track the changes done in Key figures in planning book ..........mostly by whom .......let me know how to track the same in APO DP planning book...........any std..........way..........like R/3...........pl reply.............your expert guidence will be appreciated..........by rewarding the same..............Thanks...........
Best Regards
SharadHi,
You would be able to tackle this partially by adding a new hidden key figure.
Refer the example below;
Kfig1. Stat forecast: Calculated using stat forecasting
Kfig2. Adjusted forecast: user normally changes this
Kfig3. Hidden copy of Adjusted forecast:
Using macros copy 1st snap shot of stat forecast to Adjusted and Hidden. once adjustments are done, use Macro to compare Adjustments and Hidden copy of original values, or this can be a overnight batch job to generate alerts
Hope this helps.
Pradeep -
How to track signon in a query? XMLP-Doku?
Hello,
can anyone give me a brief example how to track signon in a query to limit data in the standalone version of XMLP? Unfortunatly the user manual (PDF) doesn't describe that. The threads in this forum which tell this quit short didn't work to me.
Is there any other important manual or book about XMLP except the PDF user manual?
Thanks in advance
Ralf KanisWe wanted to trap the sign-on but oracle has the following response. I heard you can modify the xdo file but this solution is not a long term solution.
Following is the reply from the development:
There is a bug in XMLP 5.6.2 which prevents dynamically passing username in sql, and would be fixed in the next release. Also it req
uires editing report file manually as the UI does not support this username bind
ing in 5.6.2.
Maybe you are looking for
-
??
-
Settings for a Photoshop Graphic to be used in Premiere Project
I'm looking to expand my use of Premiere to a more expert level. One of the things I want to do is create overlays and custom intro graphics and such. When creating the new Photoshop file from scratch, I'm going to match the video dimensions (1920x
-
Dear All, While posting Invoice verification through Tcode: MIR7 or MIRO & filling up the field BusPlace/ Section code. The same is not getting updated for the line items of TDS after the document is posted. In this case J1INCHLN cannot be processed.
-
Need example on Java Sections.....
Hi I need example senario on java sections and how we use both java sections and user defined funtions... can u give me any blog on that..... and i need information about packages used in java for sapxi.... and which class is used for what purpose...
-
Automatically open in Preview script wont work on 10.6
Trying to take pictures with an Eye-Fi card and have them automatically open full size in Preview upon uploading. The script I have works just fine for my iMac running 10.5, but not at all on my iMac running 10.6. The script works fine if I physicall