How to download a webpage (JSP)

How to use java to create a file to save a web page

Take a look at the java.net APIs.
And also the [Networking tutorial|http://java.sun.com/docs/books/tutorial/networking/urls/readingURL.html]

Similar Messages

  • How to download my webpage step by step

    I have a webpage and the pc I uploaded the webpage on
    internett is crashed.
    How can I download the webpage to Dreamwevaer 8 on my new G4
    mac, edit the webpage and upload it again?
    I have uase Dreamwevaer som years ago but I have forgotten
    how we startet.
    Please explain how to do this - I have heard that I have to
    set up a site and use ftp to download the webpage.
    I would be very thatnful if anybody would help and
    wt´rite step to step on how to do this¨
    In beforehand thank you very much
    Kind regards Ann, Norway

    In article <e21ihi$ib2$[email protected]>,
    "glennn.php" <[email protected]> wrote:
    > I've always thought Apple would do best if they limited
    their help files to
    > "go buy a PC".
    >
    > what say you, Raizel?
    Nah
    However, if rumour has it, you soon will have the
    best. Rumour is
    Macs will run WINDOWS "native" as oppose to emulator now that
    they're
    made with Intel chip. UGH. Although, if you are familiar with
    games that
    flip or the old Wordperfect screen 1 screen 2, it would be
    kinda fun to
    flip between the 2 OSs -- but a nightmare for software
    licensing!
    I see a nightmare brewing. If the Mac was powerful enough to
    run the 2
    then that means demand that the software publishers have a
    pricing
    scheme to accommodate the scenario. (I'm high on Tetley tea
    <GRIN>
    . My
    guess is the new Mac OS (forgot its name) and Vista (Windows)
    timeframe??????
    PS DISCLAIMER: I'm *NOT* starting a PC/Mac war, just killing
    time and
    having fun! I'm bilingual: Can do Windows or Panther (don't
    know Tiger
    yet).

  • How to download files in jsp code {through save dialog}

    can you help me to download files in jsp code {through save dialog}
    i use the following code but it saves the jsp page instead of the downloaded file but with the name of the wanted file to be downloaded
    response.setHeader("Pragma", "public");
    response.setHeader("Cache-Control", "no-cache");
    *** download file
    if((trans !=null)&&(trans.equals("download")) )
    response.setContentType ("application/x-download");
    response.setHeader ("Content-Disposition","attachment;filename=\""+fileName+"\"");
    %>
    <script>
    window.location.href=<%=gallerypath+fileName%>';
    </script>
    <%
    trans="";
    //System.out.print("download : "+fileName );
    //***************************************

    Can you try below code, It should work...
    <%
    String myFileName = request.getParameter("fileName");
    response.setContentType("application/octet-stream");
    response.setHeader("Content-Disposition", "attachment; filename=\"" + myFileName + "\"");
    String root = "D:/";
    InputStream in = null;
    ServletOutputStream outs = response.getOutputStream();
    try {
    in = new BufferedInputStream
    (new FileInputStream(root + myFileName));
    int ch;
    while ((ch = in.read()) != -1) {
    outs.print((char) ch);
    finally {
    if (in != null) in.close(); // very important
    outs.flush();
    outs.close();
    in.close();
    %>

  • How to download file in jsp

    Hi guys,
    I am a new member to this java community. I meet some problems in doing my project, hope you experts can help me.
    I want to add a download button in my jsp code. When users click the button, a file will be downloaded to his local computer. The files are ASCII files with .asc as extension. My server is Apache 1.3.19 with tomcat 3.2.1 . What kind of code should I add to my jsp?
    Anyone's quick response is greatly appreciated.

    Thanks for your reply.
    I have tried to use the hyper link in html. But since it's ASCII file with .asc extension, every time the link is clicked, the file is opened directly instead of offering save option. So maybe some special code is needed.
    Many software web site provides download page. When user clicks the download button, the file will be transfered to user's computer. Does anyone knows how to do it?
    Thanks.

  • How to download BLOB through JSP

    I am able to successfully insert BLOB in a table(ofcourse, Oracle db)..Now my problem is: If a user logs on to a web page and asks to download the .exe file,then, I should select that .exe file from the table(BLOB column) and should be able to download on his desktop..Is it possible thru' JSP??? I am able to download some jpg's but, they are corrupted after downloading..Can anybody help me on this?? Thanks in advance
    GOpikrishna.

    Try UploadBean JSP component. It includes JSP samples to upload files from a browser to a folder on server or into a database.
    http://www.javazoom.net/jzservlets/uploadbean/uploadbean.html
    I hope it helps.

  • How to download a text file using jsp i

    I want to provide download facility in jsp page.
    if i have exe download is working . If I have a text / html file it is just displaying I want to make it download How to do it?
    regards
    subrahmanayma

    If you want to get an "Save as" dialogue, then you need to set the content-disposition in the header to "attachment". The default value is "inline".
    Best solution is to create kind of a FileServlet and let it stream the right file as a download to the client. You may find the downloadFile() snippets at the bottom of this article useful: http://balusc.xs4all.nl/srv/dev-jep-pdf.html Put it in a FileServlet and call it using for example .

  • How to create download function in JSP?

    Can I know how to make a download function in JSP? Any sample?. Thank You very much!

    http://forum.java.sun.com/thread.jspa?threadID=5312541&tstart=0
    Sorry but whining about it in duplicate threads doesn't help.
    HELP DENIED!

  • How to download file from server to client's local ??

    How to download a file from the server to the client's local machine in a particular folder without users intervention ie. 'Save As" prompt of the browser should be avoided and if the client clicks on "Download" button, the file should get automaticaly downloaded to say, "c:/reports/' on his/her local machine. This is for Java based web appliaction.

    http://jguru.com/faq/view.jsp?EID=10646

  • Help me!! How to use JavaScript with JSP ??

    I am using JDeveloper and I created a screen in JSP which uses a bean for database connectivity and retriving info onto the page.
    The page has a ListBox where list items are populated from the database.My requirement is
    whenever the list is changed the page shuold be refreshed with the selected item info.
    I tried to use 'JavaScript' for triggering the event with 'onChange' event of the ListBox.But the event is not getting invoked. I think JavaScript is not working with JSP.
    Please help me with how to Use javaScript with JSP or any other alternative where I can meet my requirement.
    I have one more question...I have gone through the JSP samples in OTN and I am trying do download the sample 'Travel servlet' which show list of countries...etc
    I have also gone through the 'readme' but I don't know how to extract .jar file.
    I would be great if you could help me in this.
    Thanks!!
    Geeta
    null

    We have a similar need. We have used Cold Fusion to display data from Our Oracle Database. We have a simple SElect Box in HTML populated with the oracle data. When someone selects say the State of Pennsylvania. then we have an On change event that runs a Javascript to go get all the cities in Pennsylvania.
    Proble we are having is that inorder for the Javascript to work , we currently have to send all the valid data.
    Do you know of any way to dynamically query the the Oracle database in Javascript

  • How to use JOptionPane in jsp, instead of javascript message alert box?

    HI,
    How to use JOptionPane in jsp,
    instead of javascript "message alert box"?
    I hate javascript,
    I'd like to only use java in jsp. don't use javascript.
    javascript is client side,
    jsp is server side. i know that.
    how to... instead of javascript box?
    how to use ... message box in webpage?
    don't use applet,,,, don't use javascript,,,
    hm...zzzZzz
    I hate javascript..T.T
    <SCRIPT language=JavaScript>
    alert("hate javascript");
    </SCRIPT>
    ===>>>>
    In this way,,
    JOptionPane.showOptionDialog(null,"I love java")
    I'd like to only use jsp and java and html...in webpage.
    don't use javascript....
    Why? don't sun provide message box in jsp, instead of javascrip box?
    Why?
    Edited by: seong-ki on Nov 4, 2007 8:38 PM

    Drugs are bad, m'kay?

  • How to use datagrid in jsp ?

    Hi All ,
    Can any body let me know , how to use datagrid in jsp pages .I have downloaded the taglibs-datagrid.jar file and taglibs-datagrid.tld. I have saved the .jar File in the WEB-INF/lib and .tld to the WEB-INF directories.
    I wrote a program that is getting a collection from the request and i just want to display the objects in the datagrid.Please help me out of this problem.It's better to explain with example. Waiting for a response.
    Regards,
    Rakesh

    Why do you want to use threads to do this ??
    If you write a message and do a redirection, the message will be displayed until the other page will be loaded into the browser...
    I already launched a thread from a JSP but it was for a four hour process where the user can close his browser windows.

  • How to download a file uploaded in the portal admin console

    Hi All ,
    I have created a content using admin console.
    It has a property called , "file", and it is of type "Binary".and its primary property
    I need to have link in JSP , to download that file/content.
    I am using <templates tag , but not able to download.
    Could you pls suggest how to download a file uploaded to admin console
    Thanks & Regards,
    Srinivas

    Srinivas,
    Check the WLP API http://e-docs.bea.com/wlp/docs102/javadoc/index.html?overview-summary.html
    Search for com.bea.content.manager.servlets.ShowBinaryServlet class and com.bea.content.manager.servlets.DownloadBinaryServlet class. You can use one of these depending on your requirment. I think there is not jsp tag for these classes so you have to use scriptlets.

  • How to download apple loops for Garageband 10.0.1 ?

    How to download apple loops for Garageband 10.0.1 ?

    If iDVD was not preinstalled on your Mac you'll have to obtain it by purchasing a copy of the iLife 09 disk from a 3rd party retailier like Amazon.com: ilife 09: Software or eBay.com.  Why, because iDVD (and iWeb) was discontinued by Apple over a year ago. 
    Why iLife 09 instead of 11?
    If you have to purchase an iLife disc in order to obtain the iDVD application remember that the iLife 11 disc only provides  themes from iDVD 5-7.  The Software Update no longer installs the earlier themes when starting from the iLIfe 11 disk nor do any of the iDVD 7 updaters available from the Apple Downloads website contain them. 
    Currently the only sure fire way to get all themes is to start with the iLife 09 disc:
    This shows the iDVD contents in the iLife 09 disc via Pacifist:
    You then can upgrade from iDVD 7.0.3 to iDVD 7.1.2 via the updaters at the Apple Downloads webpage.
    Export the slideshow out of iPhoto as a QT movie file via the Export button in the lower toolbar.  Select Size = Medium or Large.
    Open iDVD, select a theme and drag the exported QT movie file into the open iDVD window being careful to avoid any drop zones.
    Follow this workflow to help assure the best qualty video DVD:
    Once you have the project as you want it save it as a disk image via the File ➙ Save as Disk Image  menu option. This will separate the encoding process from the burn process. 
    To check the encoding mount the disk image, launch DVD Player and play it.  If it plays OK with DVD Player the encoding is good.
    Then burn to disk with Disk Utility or Toast at the slowest speed available (2x-4x) to assure the best burn quality.  Always use top quality media:  Verbatim, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
    And yes, iDVD 7.1.2 will work with Mavericks.
    Happy New Year

  • How to download drivers and software for hp pavilion dv6-3127tx . product unable to search

    How to download software and drivers for HP Pavilion dv6-3127TX. Unable to search the product in help and support center.
    Mohan Singh

    Hi,
    I can't find a listing for this model either, but you should find the drivers available on the link below work.
    http://h20000.www2.hp.com/bizsupport/TechSupport/DriverDownload.jsp?prodNameId=4331848&lang=en&cc=us...
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • How to download midlet in SDK from tomcat server on localhost

    how to download midlet OVER THE AIR in Java ME SDK 3 from tomcat server running on localhost
    THANKS!

    Hi,
    The most important thing is that you need to ensure that WebLogic is start the Java command with debugging options. This is in the JDev documentation in the topic "Starting a Java Process in Debug Mode".
    If you have JSP's and servlets you have other steps as well. I have included the generic steps for any application server. We have plans to post a 'How to remote debug JSP's deployed on Weblogic' in the near future. Keep posted.
    1. You need to replace WebLogic's JSP engine with OJSP and you need to
    setup debugging parameters for OJSP. This is not specifically in the JDev documentation, but you may be able to apply the information found in the topic "Remote Debugging in OC4J".
    Here are some tips:
    A. You'll probably need to specify the following jars in some WebLogic config file. The jar files are all located in <jdev_install>/lib/
    xmlparserv2.jar
    ojc.jar
    jdev-rt.jar
    ojsp.jar
    ojsputil.jar
    B. Add these jar files to the VM's classpath
    C. The OJSP class name is oracle.jsp.runtimev2.JspServlet. You will need to specify this class where you configure your JSP engine information.
    D. You need to pass the following debug parameters. Again this is set up in the app server configuration file(s):
    debu[i]Long postings are being truncated to ~1 kB at this time.

Maybe you are looking for

  • Voice memo icon

    The voice memo icon on my nano seems to disappear and reappear at will. It's weird, I'm not too worried about it cuz I seldom use voice memo. I think it might be a glitch, I've restored and it still happens. This happening to anyone else?

  • Aperture library in Apple TV?

    Hi! I like the feature where you can use your iPhoto events as screensavers. But is it possible to do so with Aperture? I have recently started to use Aperture instead of iPhoto, so it would be nice if it worked. I have tried but can't find how to. T

  • H5, SAP SCRIPT

    Hi , I am working on Automatic Payment F110 tcode. 1. It is printing several pages, we need 1 page print. 2. Everytime print time Cheque number should be changed. 3.And Company logo also has to be printed. How to do all these & where can i do these c

  • Weird error that came out of now where

    this is the error : Error 2 "bin\Debug\OPC-UA Server1.vshost.exe.manifest;bin\Debug\Quickstarts.EmptyServer.vshost.exe.manifest;obj\x86\Release\OPC-UA Server1.exe.manifest" is an invalid value for the "InputManifest" parameter of the "GenerateApplica

  • Where would a Finder crash log be located?

    Good morning.  On my work MBP (10.9.2), I often get a message about Finder crashing when I login due to a problem with a QuartzComposer framework.  The only solution is hitting the power button, shutting down, powering up, and trying again.  After a