How to make a file downloadable on my JSP page.......

I want to make a file to be downloadable on my webpage. I have developed a simple lindk to the file. But internet explorer opens that file and don't show option to save it on hard disk. If any can mail me some Servlet solution or applet ( preferably servlet ) I will be very thankfull to him
My mail address is
[email protected]
Please send it to me as soon as early as my M.Sc viva is going to held shortl and I have to add it before that viva.

Hi,
generally browsers will ask whether to save it to local drive or open it?, if you click on a link that has link to a file. This you need to set in the browser's options. check your browser's options and set the option to show the dailog box if you click a hyperlink.
have fun!!
--raj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • How to display XML file(as markup) in jsp page..?

    Hi All,
    * I have to display the XML file(as markup) in jsp page (Tree Format)....
    * My XML file is an java.io.file object , and how to view this XML file on my JSP page...........
    Thanks in Advance,
    JavaImran

    You mean you want to see the XML source?
    You need to replace the characters '<' and '&' with corresponding entities '&lt;' and '&amp;'. You can use replaceAll, but do the ampersands first.
    Then I suggest you probably want to put them in a <PRE> block.

  • How to make J2EE engine auto load The JSP Pages

    After I modify some JSP pages, If I just copy them to  the folder in the Server, The pages didn't update.
    How to make it auto update?

    Hello Shen,
    please take in consideration, that JSP page is translated to HttpServlet  component when deployed. It's not accessed via original JSP file.
    You can try to modify the final HttpServlet class file, but then you have to go through pre-compiling.
    Hope it helps,
    regards.
    mz

  • How to open pdf files in FireFox through jsp page?

    hi all,
    i have a problem when i click the link in jsp page. whenever i am clicking the jsp page link it wants to open a pdf file, the pdf file is located in remote system. its working properly in Internet Explorer. but i am opning this in FireFox means its not opening. In firefox url that is not showing the exact path. optionally its showing like that:
    http://172.16.2.21:9090/FMS/source/
    journal/%5C%5C172.16.2.1%5C
    copyediting%5CELS%5C
    Manuscript_Screening%5CMS%5C
    RDTEST%5C02-Process%5C
    RDTEST-D-08-02051.fdf
    and my jsp code whichever working fine in Internet Explorer is :
    <%
    String newpath="\\\\172.16.2.1\\copyediting
    \\ELS
    \\Manuscript_Screening\\MS\\RDTEST\\
    02-Process\\RDTEST-D-08-02051.fdf";
    %>
    <a href="<%=newpath%>" target="dynamic"></a>can any one solve my problem. as soon as possible. thanks in advance.

    hi Edmondo ,
    This is html generated jsp compilation code.
    link1
    can u please give me the solution. thanks in advance......

  • How to make pdf file auto open with adobe reader after downloaded

    how to make pdf file auto open with adobe reader after downloaded

    I note from your system details that you have the plugin for adobe pdf s so I would have expected the files should open in firefox '''without''' you needing to explicitly download them.
    Once the files are open in firefox, you will also get the option to save them permanently to a location on your computer. If you wish I suppose you could set the file type pdf to be associated with and be opened by firefox instead of with the Adobe Acrobat Reader, but that would just seem to be an additional complexity.

  • How to make word files in mac

    how to make word files, presentations orview such files in mac

    Open Office can be opened in MS Word, and vice versa, looks nearly 100% same as Office and Word but is FREE
    tons use it
    http://www.openoffice.org/download/index.html

  • How to make html file on server side from the data entered in text area

    Hi!
    I want to know how to make .html file on server side. Like if i enter the data in text area ( or like we normaly see when we write mail that editor) and we can use html tages in it and when user submit form all the data in that field will be saved on server side as an html formate. Is it possible to do so??? or any ruff idea how to design it???

    Erm ...
    Whats the problem with that?!
    Ok, here the code ...
    String myparameter = request.getParameter("paramname");
    String htmltemplate = "<html>\n"
                         +"<head><title>demo</title></head>\n";
                         +"<body>@parametertag@</body>\n";
                         +"<html>";
    String htmlpage = htmltemplate.replaceAll("@parametertag@",myparameter);
    File yourHTMLfile = new File("wheredoyouwannagotoday.html");
    FileOutputStream fos = new FileOutputStream(yourHTMLfile);
    fos.write(htmlpage.getBytes());
    fos.close();You're done.
    Happy Coding! :-) &copy;

  • How to make Jar files in JBuilder

    I would like to know how to make jar files using JBulider. I have a problem with a project that I am working with in Swing. I have made the project on JBuilder and when I make a jar file it will not run upon clicking.
    Any body with an answer, please help
    Abhi

    It sounds like your Main-Class is not set properly in your manifest. To set your Main-Class, please follow these directions:
    http://java.sun.com/docs/books/tutorial/jar/basics/run.html

  • How to make jar files availabe for deployed EJBs

    Hi,
    I'm interested on how to make jar files availabe for deployed EJBs.
    My EJB is packed in an ear. It uses a util jar. I now just add the jar to the
    classpath, but I think that shouldn't be the way. Is there somthing in the admin
    console to make jars available or do I have to insert it in the ear file? And
    if so, where do I hve to place it?
    Thanks
    Claudia

    Put the util.jar in the ear with your ejb jars - at the same level (i.e. in
    the root) - but do not include them in the manifest.xml.
    Also each ejb jar that refers to util.jar must have util.jar on its internal
    classpath in the manifest.
    "Claudia" <[email protected]> wrote in message
    news:3d537db5$[email protected]..
    >
    Hi,
    I'm interested on how to make jar files availabe for deployed EJBs.
    My EJB is packed in an ear. It uses a util jar. I now just add the jar tothe
    classpath, but I think that shouldn't be the way. Is there somthing in theadmin
    console to make jars available or do I have to insert it in the ear file?And
    if so, where do I hve to place it?
    Thanks
    Claudia

  • 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 want, but what is your question?

  • How to make audio file to use as ringtone on iPhone 5

    Does anyone know how to make a file and then make it a ringtone?

    Make sure iTunes prefs > Import settings is set to AAC.
    In iTunes, find the song you want and note the start/stop time you want the ring tone.
    Right click - get info, click the Options tab and set the start/stop times as above. (Note a 30 second max for ringtones)
    Right click - Create AAC version. This creates a new file.
    Drag this new file from the iTunes window to the desktop.
    Delete the new file from iTunes and also select Delete from hard drive.
    On the desktop, rename the file to what_ever_you_want.m4r (first part you can change to whatever you want & change the extension to .m4r).
    Drag the file back to the iTunes library at top left.
    Make sure iTunes prefs > General has Tones ticked.

  • How to make jar file for this compilation method ?

    can any one tell me how to make jar file for this compilation
    D:\java\browser\IEInJava>javac -classpath jdic.jar;. IEInJava.java
    D:\java\browser\IEInJava>java -cp jdic.jar;. IEInJava
    *this is a compile code:-*
    D:\java\browser\IEInJava>javac -classpath jdic.jar;. IEInJava.java
    *and this is a run code:-*
    D:\java\browser\IEInJava>java -cp jdic.jar;. IEInJavanow how make JAR file ?

    Assuming IEInJava only uses classes inside the jdic jar, this is one way. D:\java\browser\IEInJava> jar cf yourjar.jar IEInJava.classThen to run it you would use D:\java\browser\IEInJava> java -cp jdic.jar;yourjar.jar IEInJavaAnother way would use the jar manifest file to specify the Main-Class and Class-Path.

  • Issue with File Download(messageDownload) on Search Page.

    Hi,
    I created a custom OAF search page which fetches values from one table. The document in getting stored in my custom table in a BLOB colums and NOT in FND_LOBS.
    The table has 3 collumns along with others:
    1st is primary key (Record_Seq) ==> number data type
    2nd to store actual file name (File1Name) ==> varcahar2 data type
    3rd to store the actual uploaded data (File1Data) ==> BLOB data type
    The reason for having the “File1Name” is so that I can display the original file name of the document that was uploaded, instead of just the “view” in the search page results .
    On the File1Data BLOB and created a messageDownload for that under query results table with following details:
    ID : File1Data
    ItemStyle : messageDownload
    FileMIME Type : pdf
    Datatype : BLOB
    View Instance : LacEmpExposureVO1
    view Attribute : File1Name
    File View Attribute : File1Data
    When I click on the "File1Name" data hyperlink, it is opening only the first document corresponding to the first record in the search page results.
    For example, If my search page returns 10 rows then when I click on the file1name on any row, It is open the first row file name only.
    I have a primary key column(RECORD_SEQ) in the Table / EO / VO which is displayed in the search page results.
    Also one weird thing is happening:
    If I try to do this more than 2 times then it is opening the update page with the first record from the search page results…
    I tried to print the context and it is nul the first time, But the second time then context is changing to "update". Dont know how this is happening????
    Any advice is greatly appreciated as it is very crucial for me to get this resolved ASAP. I have looked at several forums and did a lot of things as advised in the forums . But nothing seems to work for me.
    Thanks,
    Mir
    CO code for the search page
    ===========================
    if (pageContext.getParameter("Create")!= null)
    System.out.println("Into LacEmpExposureCO in PROCESS FORM REQUEST with Context of CREATE");
    pageContext.setForwardURL
    ("OA.jsp?page=/lac/oracle/apps/lac/lacempexposure/webui/LacEmpExposureCreatePG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, //Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
    OAWebBeanConstants.IGNORE_MESSAGES);
    else if ("update".equals(pageContext.getParameter(EVENT_PARAM)))
    System.out.println("Into LacEmpExposureCO in PROCESS FORM REQUEST with Context of UPDATE");
    System.out.println("LacEmpExposureCO ==> RecordSeq in PROCESS FORM REQUEST is: " + RecordSeq);
    HashMap params = new HashMap(1);
    params.put("RecordSeq", RecordSeq);
    pageContext.setForwardURL
    ("OA.jsp?page=/lac/oracle/apps/lac/lacempexposure/webui/LacEmpExposureUpdatePG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    params,
    true, //Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO, // Do not display breadcrumbs
    OAWebBeanConstants.IGNORE_MESSAGES);
    else {           
    String strEvent = pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM);
    System.out.println(strEvent);
    System.out.println("Into the last ELSE part in LacEmpExposureCO.java");

    Duplicate post -- Issue with File Download(messageDownload) on Search Page.

  • How to make session invalid when user refresh the page?

    How to make session invalid when user refresh the page?

    I have a <form> in a JSP file that has another JSP file as an action.
    I have main.jsp that has <form> with action.jsp file as an action.
    Now when I submit the <form>, request forwarded to action.jsp and it will take the action. But this file is taking so long, hence user refresh the page again and again, hence duplicate request processing is occuring.
    I want to prevent this.

  • How can i view a downloaded word document in pages?

    how can i view a downloaded word document in pages?   i tried to download a file, which worked, but i can't view it since i don't have word office

    Not sure what you are saying but Pages just opens Word documents, drag the Word document onto Pages' icon.
    Or open the Word document from the Open dialog.
    If you are talking about testing a Word document after you have exported it from Pages then you will need of course to have Word to open it but there are free clones of Word as well such as LibreOffice, Openoffice and Neoffice that will do that as well.
    Peter

Maybe you are looking for

  • Cash Forecasting Report

    Hello, Can anyone explain the term cash forecasting report ? Typically, what infocubes feed cash forecasting report ? Please let me know. Thank you. Edited by: Seetha Manikam on Sep 8, 2008 10:12 AM

  • Created .rpd file but how do I connect in OBIEE Answers?

    I have created a .rpd file using an Essbase connection but am now stuck on how I connect an Answer query to it in the OBIEE dashboard tool itself. When I create a new analysis, I do not see my newly created .rpd in the list of available connections.

  • Maps App and memory cards

    Hi,  The MAPS app, is incapable of finding adresses eventhough I copied said adress from the MAPS app onto my adress book. What is the matter with this app??? Also I can't find a way to calculate an itinirary between two destinations other if one of

  • Refl.Method.invoke(int)

    Hi, I would like to invoke a method having primitive int argument through the reflection api. Class[] parTypes = new Class[] {int.class}; Method setIdMethod = myclass.getMethod("setHID", parTypes); int cnter = 0; Object[] args = new Object[] {cnter};

  • Backup and Recovery of Planning Application

    Hi, We have created a planning application and build the metadata successfully. Now there is some problem with Essbase Server. We want to reinstall only Essbase Sever not all the products. My concern is to retain the metadata. Please guide me procedu