Problem in opening pdf  or fdf  File in JSP page through firefox in Linux

Hi,
In my Webapplication , i have given link to FDF document available in server in a JSP page on click of which the corresponding FDF document should open in a new browser.
Consider the location of FDF file in my server is
ServerIP/MS/RDTEST/RDTEST-D-08-10245.fdf
In my JSP link to FDF file is provided as follows.
newpath="smb://"+username+":"+password+"@"+serverip+"/MS/RDTEST/RDTEST-D-08-10245.fdf" ;
<a class ="one1" href="<%=newpath%>" target="dynamic" > RDTEST-D-08-10245 </a>My Requirement is When i click on the link it should open the corresponding fdf file in the browser by following the link provided.
But it is not working if i try in this way.
Can anybody suggest how to proceed with this issue.
Any other ways are there to open fdf file exisitng in server in Firefox in A Linux machine.
What settings to be made in firefox to support FDF or PDF features.
What prerequisites needed in Linux to enable FDF or PDF features.
I have Adobe Acrobat professional 5.0 installed in my Linux machine.
Thanks in advance.

Is your problem
-. That a new browser window doesn't open?
Solution: [Lookup the 'target' attribute|http://www.w3schools.com/HTML/html_links.asp]
- That your file content isn't streaming to the browser?
Solution: Your code assumes the browser understands and supports samba. This isn't always the case (IE for example). And you're providing a direct link to your file with the username and password - security concerns as well as possible portability issues. You'd be better off writing a [file servlet to download your files|http://www.google.com/search?q=file+download+servlet]

Similar Messages

  • Problem in opening PDF or FDF in Firefox?

    Hi all,
         I am using tomcat 5.5. In one of jsp code, I have used a hyperlink to open a PDF or FDF file placed in server .My requirement is while clicking the hyperlink the PDF or FDF file should be opened in browser window itself. The file is located in remote server connected through LAN.
    For eg :
    <html>
    <body>
    <%
    String test= "//123.45.6.78/XXXX/YYYY/RD/RDTEST-D-08-01178.fdf";
    %>
    <a  href="<%=test%>" target="dynamic" >test.pdf</a>
    </body>
    </html>When this jsp page is opened in IE and if I click on the link, PDF or FDF files is getting opened well in browser.
    While clicking the link in Firefox browser, the path set in anchor tag is changed to
    http://localhost:8080/ManuscriptCheck/\\123.45.6.78\XXXX/YYYY/RD\RDTEST-D-08-01178.fdf
    Where http://localhost:8080/ManuscriptCheck/ is my Web application URL.
    How to overcome this issue to have the file url as such without web application url appending before it?
    Can Any body guide me. Thanks in advance.

    The right way for doing this is Create a Servlet that will read the pdf files from the remote server and stream the file contents through the HttpServletResponse. You can find an example here.
    [http://balusc.blogspot.com/2007/07/fileservlet.html|http://balusc.blogspot.com/2007/07/fileservlet.html]
    The client browser will no longer be in need to have access to a given remote server.

  • How to open pdf or fdf file through firefox 3.0.5?

    Hi all,
         I am trying to open a fdf file through firefox in linux machine by clicking the link on that it wants to open a fdf file from remote location. When I am trying to open then it will show an error message in error console like:
    Security Error: Content at http://172.16.3.116:8080/ManuscriptScreening/source/journal/ProductionEntry.jsp may not load or link to smb://editor:edit*[email protected]/Copyediting/ELS/Manuscript_Screening/MS/RDTEST/02-Process/RDTEST-D-08-10245.fdf
    Can any body give me a solution for this problem? I am using smb to fetch files from server. In my linux machine we are using Adobe Acrobat 5.0 professional version and also Adobe Reader 8. The link is available in jsp page.

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).<br />
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]<br />
    <br />
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.<br />
    You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.<br />
    You have to close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • Since I have connected my iPad with the MacBook through ICloud I have problems in Preview of opening PDF- and JPG-files. Does anyone have a solution for this?

    Since I have connected my iPad with the MacBook through ICloud I have problems in Preview of opening PDF- and JPG-files. Does anyone have a solution for this?

    I'm not sure I understand the connection between iCloud and this problem.  Is it simply a problem of coincidental timing (ie, the problem happened after you set up iCloud)?  If so, there's almost certainly no connection between these two events.
    Where are you getting the files you're trying to open, and what specifically happens when you try to open them?

  • Cannot download or open pdf or wrd files online

    My adobe reader XI does not open pdf or wrd files online.  Neither can I download another version of Adobe.  I have reset my computer to a previous date, but evidently it cannot go back further than my problem.  I believe this trouble began when I accepted a new version of Yahoo, but I didn't have the requirements to run it, so they said.  Thus when deleted I believe it took off whatever runs my downloads.  I think I had Adobe Acrobat too, but its gone now.  Cannot download that either.  What can I do to fix this problem?

    Hi Karen,
    Try using this cleaner:
    http://labs.adobe.com/downloads/acrobatcleaner.html
    Then reinstall: http://get.adobe.com/reader/enterprise/
    Let us know if this helps!
    Looking forward to hearing back from you.
    Kind regards, Stacy

  • Problem with opening pdf

    Hello,
    I dont even know if its  right place to ask but I will give it a try , I do apologise if this is not right place to ask ...When I am opening pdf document attached to the mail sent through sap I am getting an error saying
    THE ROOT OBJECT IS MISSING OR INVALID. I dont understand if its programming error or file error ..plz advise..
    regards...
    Edited by: BrightSide on Jan 8, 2010 10:36 AM
    Edited by: BrightSide on Jan 8, 2010 10:36 AM

    Hello,
    Thanks for your reply.
    Code:
    *Get Function module name for given smartform
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname = 'ZTEST_SMARTFORM'
        IMPORTING
          fm_name  = fm_name.
    CALL FUNCTION fm_name
        EXPORTING
          control_parameters = ssfctrlop
          output_options     = ssfcompop
        IMPORTING
          job_output_info    = it_otf_data
        TABLES
          it_kna1            = it_kna1.
      it_otf_final[] = it_otf_data-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
      format                = 'PDF'
    IMPORTING
       bin_filesize          = bin_filesize
        bin_file              =
    TABLES
       otf                   = it_otf_final
       lines                 = it_pdfdata[]
    EXCEPTIONS
      err_max_linewidth     = 1
      err_format            = 2
      err_conv_not_possible = 3
      err_bad_otf           = 4
      OTHERS                = 5.
    DATA binary_content TYPE TABLE OF solix.
    DATA:it_pdfdata   TYPE TABLE OF tline WITH HEADER LINE.
    DATA:it_pdf       TYPE  TABLE OF  solisti1 WITH HEADER LINE.
      CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
        EXPORTING
          line_width_dst              = '255'
        TABLES
          content_in                  = it_pdfdata[]
          content_out                 = it_pdf[]
        EXCEPTIONS
          err_line_width_src_too_long = 1
          err_line_width_dst_too_long = 2
          err_conv_failed             = 3
          OTHERS                      = 4.
    CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
        EXPORTING
          line_width_dst              = '255'
        TABLES
          content_in                  = it_pdfdata[]
          content_out                 = it_pdf[]
        EXCEPTIONS
          err_line_width_src_too_long = 1
          err_line_width_dst_too_long = 2
          err_conv_failed             = 3
          OTHERS                      = 4.
    *convert string to raw.
      CLASS cl_bcs DEFINITION LOAD.
      DATA:
      lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
      lo_send_request = cl_bcs=>create_persistent( ).
    Message body and subject
      DATA:
      lt_message_body TYPE bcsy_text VALUE IS INITIAL,
      lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
      DATA: gt_stxftxt TYPE TABLE OF stxftxt,
            gs_stxftxt TYPE stxftxt.
    *-Email body
      REFRESH:  gt_stxftxt.
      SELECT *
        FROM stxftxt
        INTO TABLE gt_stxftxt
        WHERE formname = 'ZINVEMAILTXT'.
      IF sy-subrc = 0.
        SORT gt_stxftxt BY linenr ASCENDING.
        LOOP AT gt_stxftxt
          INTO gs_stxftxt.
          APPEND gs_stxftxt-tdline TO lt_message_body.
        ENDLOOP.
      ENDIF.
      lo_document = cl_document_bcs=>create_document(
      i_type = 'RAW'
      i_text = lt_message_body
      i_subject = 'Order Shipment Notification' ).
    Add attachment
        CALL METHOD lo_document->add_attachment
        EXPORTING
          i_attachment_type    = 'PDF'
          i_attachment_subject = 'health'
          i_att_content_hex    = conhex.
    Pass the document to send request
      lo_send_request->set_document( lo_document ).
    Create sender
    Create recipient
    Send email
      DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
      lo_send_request->send(
      EXPORTING
      i_with_error_screen = 'X'
      RECEIVING
      result = lv_sent_to_all ).
      COMMIT WORK.

  • Opening PDF and PPT files without using BuddyApi

    Hi, please excuse my newness.
    I'm wanting to open pdf and ppt files through Director (I'm using 11.5) but I'm struggling with finding the right code to make it work. I saw that a lot of people are recommending Buddy Api. However I'm cheap and was hoping that there would be a way to open files without having to resort to using/paying for this xtra. Is there a reason why opening files in Director seems to be such a hassle?
    Thanks in advance.

    I'll also add that from my understanding, an unregistered version of Buddy API can be used in commercial applications.
    Buddy API is a great Xtra and if you're going to be developing applications with Director, this Xtra will be a valuable purchase. Buddy Xtra is recommended a lot in the Director forums for a good reason.
    Dean
    Director Lecturer / Consultant / Director Enthusiast
    http://www.deansdirectortutorials.com/
    http://www.multimediacreative.com.au

  • Adf11g how to open pdf or html files from  webservice

    hi all,
    adf11g how to open pdf or html files from webservice .

    Hi,
    This is standard functionality, that you can read more about in the OLM User Manual. You can upload the files to an OLM content server or to any other content server that can be accessed with a URL.
    Regards Anders Northeved

  • On iPad can I open a Microsoft word file with apple pages app?

    On iPad, can I open a Microsoft word file with apple pages application?  If so how do I perform this activity?

    Yes you can open Word files. If it is an email attachment you can simply tap and hold down on the icon and select "open in" and then select Pages - as long as you have the Pages app on the iPad.
    Where is the file on your iPad or how do you want to move it to the iPad?

  • How can I get a list of open web pages in Firefox (in Linux)?

    I would like to know how to get a list of open web pages in Firefox (in Linux), because I have a shortcut to open a web page and I want to get it to see if Firefox has the page open first so that it doesn't open duplicates.

    You see the "List All Tabs" button in current Firefox versions if there are that many tabs open that you get the Tab bar scroll buttons appearing.
    Add code to the userChrome.css file below the default @namespace line.
    *http://kb.mozillazine.org/userChrome.css
    The customization files userChrome.css (user interface) and userContent.css (websites) are located in the chrome folder in the Firefox profile folder.
    *http://kb.mozillazine.org/Editing_configuration
    <pre><nowiki>@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    #tabbrowser-tabs ~ #alltabs-button { visibility:visible!important; }
    </nowiki></pre>
    * Permanent List-all-tabs Button: https://addons.mozilla.org/firefox/addon/permanent-listalltabs/

  • Opening a Java Window from a jsp page on the client side

    Hi all,
    Thanks in advance to all who could help me for this problem.
    I've written some jsp pages. In one of them, I open a new Java Window,
    which is a simple Java Frame. If I test this directly on the Tomcat
    server, everything works well.
    But when I call the jsp page through a web browser of a distant client
    (normal use), and when I want to see the java window, no window pops
    up. It appears that the Java Window pops up on the server, and not on
    the client side, which is what I wanted.
    Could someone tell me how to make the Java frames appear on the client
    side ? (Is it linked to the code or to the configuration of Tomcat ?)
    Thanks in advance,
    Alexis.

    JSP always run on the server. On the client you only see the results.
    But you can use applets on the client side: http://java.sun.com/docs/books/tutorial/uiswing/components/applet.html

  • Forwarding to an xml file from jsp page

    hi
    i am subhash. i have problem in forwarding an xml file from jsp page.
    i have a jsp page in which i have a button. upon click, its form method is triggered and the action is set to "serverpage.jsp". In that jsp page i have to move to an xml file. I would like u to send a sample code also for the same.
    Thank You,
    Subhash..

    Refer to the Generating XML from JSP section.
    http://java.sun.com/developer/technicalArticles/xml/WebAppDev2/

  • 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 can i render a dynamic html file in jsp page

    Hi everybody,
    i am trying to render a dynamic html file in jsp page with the result of querying a database.
    The response of the query is a xml document. And i have a stylesheet to transfer it to html.
    How can i render the html in a jsp file?

    I am using below code for HTML files
    private var appFile:String="index.html";
    if (StageWebView.isSupported)
                        currentState = "normal";
                        webView.stage = stage;
                        webView.viewPort = new Rectangle( 10, 130, (stage.stageWidth)-20, 750 );
                        var fPath:String = new File(new File("app:/assets/html/aboutus/"+ appFile).nativePath).url; 
                        webView.loadURL(fPath);
                        addEventListener(ViewNavigatorEvent.REMOVING,onRemove);
                    else {
                        currentState = "unsupported";
                        lblSupport.text = "StageWebView feature not supported";
    above code is working fine for me.

  • How can i call java class file in jsp page

    Hai,
    i wants to call .class file in jsp page.
    my class file is in C:\jsdk\bin.
    Thanks

    I'm not entirely sure what you mean by "calling a class file", but I'm going to assume that you want to do something like the following in your page:
    <%
    MyClass myClass = new MyClass();
    myClass.someMethod();
    %>etc
    If that's the case, then all you have to do is make sure that the class is in the servlet engine's classpath. You'll probably also need to include an appropriate import statement at the top of the page.
    Hope that helps.

Maybe you are looking for