How to save HTML file with images present in the server to local machine

Advertisement

Hi all
In my application i have a option for the user to save HTML files with images present in the server. The HTML file is getting saved but the images are not being saved.
The code i am using is below :-
l
                    File fname = new File(filePath);
                    if(!fname.exists())                return;
                    FileInputStream istr = null;
                    OutputStream ostr = null;
                    response.setContentType("application/"+format);
                    response.setHeader("Content-Disposition", "attachment; filename=\"" + fname.getName() + "\";");
                    try { 
                         istr = new FileInputStream(fname);
                         ostr = response.getOutputStream();
                         int curByte=-1;
                         while( (curByte=istr.read()) !=-1)
                              ostr.write(curByte);
                         ostr.flush();
Can anyone suggest what i need to do
regards

Advertisement

The client should probably parse the html that comes down, and look for <img> links, and request those of the server as well.

November 30, -0001

How to save HTML file with images present in the server to local machine

Hi all In my application i have a option for the user to save HTML files with images present in the server. The HTML file is getting saved but the images are not being saved. The code i am using is below :- l                     File fname = new File

How to display html content with image in Adobe Flash and Flex mobile project?

Hi,   I have a html content with image in it. How to display it in Adobe Flash Builder and Flex mobile project? Which control needs to be used for this?Hello, The only current way is to use an iFrame, or if you only need some html tags you could use

How to upload html file to email

Hi, I have absolutely no html background but was able to come up with a single page layout with graphics, texts and links with the help of online tutorials using Adobe Go Live which I can open the file now in Dreamweaver. My goal is not to come up wi

How to upload html file document with his.files

i can upload only one file and i can't upload html file with his images or some more pages index.html chapter1.html chapterN.html I see this problem so: upload zip file and extract to os(i use linux) and saved link to his index.html. IS IT POSSIBLE.

How can you save a file with CS4 so that it can be opened with CS3?

I fave a file that I have sent someone, but they can't open it because they don't have CS4. How can I save a file, using CS4, so that the file can be opened with CS3? ThanxFrom the help file: http://help.adobe.com/en_US/Illustrator/14.0/WS714a382cdf7

Print html file with barcode from abap report

hi i am printing html file from abap program using gui_execute. i am using netscape.exe , its printing first time and when reprint its not working basically html file contains gif file which has fedex barcode. could you please let me know how to prin

How to save CSV file in application server while making infospoke

How to save CSV file in application server to be used as destination while making infospoke. Please give the steps.........Hi If you want to load your flatfile from Application server,then you need to trasfer your file from your desktop(Computer) to

How to save psd files...

how to save psd files so other can change (with all fonts and Layers) I need to know how to save everything in the psd so others still can use it.??Hi, If you have photoshop and you are working on it and have used layers , fonts , and other things Th

Help Editing code from a published html file with flash detection enabled from flash

hi guys ive publish a html file with flash detection enabled from flash heres the code from the publish html: <!-- saved from url=(0013)about:internet --> <html lang="en"> <head> <meta http-equiv="Content-Type" con

How to make html file from a text field data

hi! I want to know how to make a file with .html extension and the data in this file should be from a text field. like i want to enter some thing in a text area and have to place it in a file on server side in html formate.so you told us what you wan

How to read HTML files using UTL_FILE

Hello Friends, How to read HTML files using UTL_FILE package ? According to Oracle documentation UTL_FILE can read or write OS Text Files. Thanx in advance.. AdiHI Hareesh, i have gone through that blog. i tried it...but i am getting mapping error  n

I am trying to find out how to assign files with particular extensions to the appropriate software. At the moment when I create a file using Word it is apparently given the extension .docx but Word doesn't recognise its own files. How do I alocate th

I am trying to find out how to assign files with particular extensions to the appropriate software. At the moment when I create a file using Word it is apparently given the extension .docx but Word doesn't recognise its own files. How do I allocate t

How to save Numbers file as Excel (XLSX) file ?

I just want to know how to save Numbers files into Excel format. Because other than Mac users can't able to access Numbers format.File, Export To, Excel-Read other 2 answers

Does anyone know how to save a file in CC 10.0 or higher that is viewable in CC 9.2?

I am trying to make my fiels viewable to someone who has Adobe CC version 9.2, but I have version 10.0. Does anyone know how to save my files so the are readable?You will likely get better program help in a program forum The Cloud forum is not about

How to process a file with out any CSV, Delimitaor, fixed length or Copybok

Hi Team, i need to process below file in OSB and need to send mails to the concerns ids... this file will have either 1 mail or multiple mails. sample.txt file with 1 mail content ====================================== START [email protected] [email 

Can't select local html files with web object in captivate 8

I can select pdf's via browse, but it I want to add local html files I have to type the path in manually. I'm guessing this is just a bug, I should be able to choose web pages for the web object even if they are local right?Fireworks is a graphics ed

Using Firefox 3.6.20 and Windows XP Home SP3. Firefox sporatically deletes bookmarks from the bookmarks toolbar. Additionally, when I try to import from a saved HTML file, Firefox does not import the complete file. Results are inconsistent.

Using Firefox 3.6.20 and Windows XP Home SP3. Firefox sporatically deletes bookmarks from the bookmarks toolbar. Additionally, when I try to import from a saved HTML file, Firefox does not import the complete file. Results are inconsistent.A possible

How to connect captivate file in a database (MS SQL SERVER 2008)

Hi... How to connect captivate file in a database (MS SQL SERVER 2008) ??? Kindly response please.. thanks!!!Hi there See if the link below helps you out. Click here to view Cheers... Rick Helpful and Handy Links Captivate Wish Form/Bug Reporting For

How do i share music with 2 iphones using the same apple id?

how do i share music with 2 iphones using the same apple id?Sync them both to the same iTunes music library.  You can also automatically download purchased music to both by going to Settings>iTunes & App Stores and turning Music to On under Automat

How to write triggers on startup and shutdown of the server?

Plz advice. How to write triggers on startup and shutdown of the server? I could write it but nothing happened!!!Small code example for you: [email protected]> @ connect mob/mob [email protected]> create or replace trigger shutdown_trigger 2 before