CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2009
    Posts
    4

    write file into response for jsp display

    I'm looking to embed a swf file into a jsp, the swf is actually created server side and so im totally at a loss as to how to put the file in the response so that the jsp will be able to access the swf and render it.

    I know how to pass the file so the user can download it;

    Code:
    response.setContentType("application/ppt");
    response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
    response.setHeader("cache-control", "no-cache");
    OutputStream out = response.getOutputStream();
    out.write(file);
    I think it might be a method so the page can render it. Any help would be really useful.

  2. #2
    Join Date
    Feb 2008
    Posts
    966

    Re: write file into response for jsp display

    There are TONS of sites out there that explain how to do this. Please take a look at them and if you get stuck, ask in a Scripting forum.

  3. #3
    Join Date
    Oct 2009
    Posts
    4

    Re: write file into response for jsp display

    No i know how to create the embed part on the jsp, I'm asking how to pass the file from the server to the jsp so that jsp can render it and not pass it to the user to download

  4. #4
    Join Date
    Jul 2005
    Location
    Currently in Mexico City
    Posts
    568

    Re: write file into response for jsp display

    What content type? Image, html, pdf?
    Wanna install linux on a vacuum cleaner. Could anyone tell me which distro sucks better?

    I had a nightmare last night. I was dreaming that I’m 64-bit and my blanket is 32-bit and I couldn’t cover myself with it, so I’ve spent the whole night freezing. And in the morning I find that my blanket just had fallen off the bed. =S (from: bash.org.ru)

    //always looking for job opportunities in AU/NZ/US/CA/Europe :P
    willCodeForFood(Arrays.asList("Java","PHP","C++","bash","Assembler","XML","XHTML","CSS","JS","PL/SQL"));

    USE [code] TAGS! Read this FAQ if you are new here. If this post was helpful, please rate it!

  5. #5
    Join Date
    Oct 2009
    Posts
    4

    Re: write file into response for jsp display

    application/x-shockwave-flash

  6. #6
    Join Date
    Oct 2009
    Posts
    4

    Re: write file into response for jsp display

    is it possible?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured