Path in IFrame

Hi All,
I have an IFRAME and i want to display a HTML file in iframe. Please let me know how to link the both ?
I am trying to give as "c://Document and settings/username/desktop/filename" but its throwing runtime exception as Invalide URL.
Please let me know how to find out the path of my HTML fine to link in to Iframe.
-Pavan

Pavan,
Upload the file into KM and metion the file path in your inframe.
To upload the doc into KM
Add the content management role to your user id
Content management -> explorer -> documents -> folder -> new -> upload
Ram

Similar Messages

  • Failed to solve variable web.framesrc.afrPushIframe using path .//IFRAME[@name='afr::PushIframe']/@src

    I get this problem Failed to solve variable web.framesrc.afrPushIframe using path .//IFRAME[@name='afr::PushIframe']/@src
    So far in the posts i only see this problem . Please let us know how to solve this?
    Thanks
    Sankar

    Tses wrote:
    Am I the only one in the world who tried ΟLT 12c with ADF 11g R2 PS3 ?
    :-(Hi! You're not alone :)
    We tried to record some load tests (OpenScript 12.2.0.1 Build 223) for our ADF R2 application.
    But during the playback I had the same error: "Failed to solve variable web.framesrc.afrPushIframe using path .//IFRAME[@name='afr::PushIframe']/@src ".
    Haven't you found the solution yet?
    By the way, when I use operation "Revert to Recorded" for all nodes of my test and playback it again, I see in results that the script has passed without errors, but nothing has changed in database.
    Thanks.
    Natalie

  • IFrame ?

    Hi, I want to make a portlet which ask from user some information and displays related information in that portlet only. I am using a pageflow which calls an action and displayes the related information page.
    This portlet is a part of portal which has many portlets. When user submit the informtion in this portlet then whole page get refreshed. I found that IFrame could be a solution for this which will refresh that portlet window only. Pls. let me know how to use it? I tried to give potlet path in IFrame src but it didn't work. Pls. help.

    the whole page will refresh, but you can cache the other portlets for performance. will that work for u?
    Kunal Mittal

  • OLT 12.2.0.1 & ADF 11g R2 (11.1.2.3)

    Hi,
    I am evaluating the OLT ADF Module for testing applications developed with JDeveloper/ADF 11g R2.
    Unfortunately, the latest version of JDeveloper/ADF 11.1.2.3(PS3) looks like not compatible with OLT release 12.2.0.1 (Openscript 12.2.0.1 Build 238). During the playback I get the error “Failed to solve variable web.framesrc.afrPushIframe using path .//IFRAME[@name='afr::PushIframe']/@src“ even in a very simple “hello world” application.
    Conversely the same project running in JDeveloper/ADF 11.1.2.1 (PS1) works fine.
    In the OpenScript Users’ Guide there is no reference for ADF R2 but only for only for the ADF R1.
    Is the ADF 11g R2 supported in the current release of OLT ?
    Additionally if anyone has any tip for how to use the OLT 12.2.0.1.0 with ADF R2 PS3 it would be very helpful to share it with me.
    Yiannis

    Tses wrote:
    Am I the only one in the world who tried ΟLT 12c with ADF 11g R2 PS3 ?
    :-(Hi! You're not alone :)
    We tried to record some load tests (OpenScript 12.2.0.1 Build 223) for our ADF R2 application.
    But during the playback I had the same error: "Failed to solve variable web.framesrc.afrPushIframe using path .//IFRAME[@name='afr::PushIframe']/@src ".
    Haven't you found the solution yet?
    By the way, when I use operation "Revert to Recorded" for all nodes of my test and playback it again, I see in results that the script has passed without errors, but nothing has changed in database.
    Thanks.
    Natalie

  • Open Script - ADF Load Test

    Hello,
    Has anyone seen this error when recording a custom ADF application via OpenScript Load Test?
    "Failed to solve variable web.framesrc.afrPushIframe using path .//IFRAME[@name='afr::PushIframe']/@src ".

    Hello
    I'm not quite sure to understand your question....
    What you can do with OTM is:
    Create a OpenScript Test case : go to tests tab, click add, choose Oracle OpenScript as type and browse to find the scenario
    Or
    Edit an existing Manual Test case: go to tests tab, right click on the test case or use the filter feature to find out your test case, then change the type from manual to oracle openscript.
    Or
    Edit an existing Manual test case and just attached the openscript script as a reference but you would not be able to run the test from OTM.
    Then you can execute the test from OTM, by right clicking on the test case and "Run this test".
    Hope it's clear enough
    Let us know if you need more information.
    Cheers
    JB

  • Iview as hyperlink

    Hi all,
    Can i create Iview and make it as hyperlink  ,i mean when user click on that iview same url will open in window.
    thank you

    <iframe src="give the path here"></iframe>
    But I wonder what...Iframes is all about placing a source (url) withing another page.
    I think your question is more about opening in a new window.
    If so you would need to go about doing what I mentioned earlier.
    Alternatively instead of epcm.donavigate do in a JSP:
    <a href = "/irj/portal/mylink" target = "_blank">Click here to open in new window</a>
    where my link should be the quicklink property of your target page.
    If these answers helped, consider rewardingpoints.
    Best regards.
    null

  • HTML app-storage path iframe targeting question

    In my HTML/Javascript app, I'm displaying html content that
    lives in my app-storage area in an iframe. I assign the src to the
    iframe dynamically in javascript. This works on the mac, but when I
    view in Windows, the iframe is empty.
    Here is how I create the src path:
    var docs =
    air.File.applicationStorageDirectory.resolvePath("preview/index.html")
    var url = new air.URLRequest(docs.nativePath);
    $('previewFrame').src = url.url;
    This creates a path similar to the following:
    mac: /Users/{username}/Library/Preferences/{appID}/Local
    Store/preview/index.html
    pc: C:\Documents and Settings\{username}\Application
    Data\{appID}\Local Store\preview\index.html
    Here is the iframe setup:
    <iframe id="previewFrame" src="preview.html" sandboxRoot="
    http://localhost"
    documentRoot="file:/" allowcrossDomainxhr="true"></iframe>
    I tried changing the src path to use .url instead of .native
    path, like this
    var docs =
    air.File.applicationStorageDirectory.resolvePath("preview/index.html")
    var url = new air.URLRequest(docs.url);
    $('previewFrame').src = url.url;
    This creates the following path:
    app-storage:/preview/index.html
    But if I change my iframe documentRoot to "app-storage:/", or
    leave it as "file:/", I see nothing in the iframe, on either mac or
    PC.
    Can anyone point me to what I'm missing?
    Thanks!

    Hi gizmogwai
    Is there a way I can load the image and use the bridge to
    send it to the iframe?
    inside the iframe, I have <img src='...'> that needs to
    show the image, and the problem is that I can't find a way to point
    the src attribute to the image stored on the application storage
    directory.
    Can you give me an example of what you meant?

  • Snippet,  iframe not playing the game. Flashskins player. What's the Path?

    Hi guys and girls...
    I'm having snippet flash player problem. Searched around ALOT and seems like I've tried everything. I'm sure I haven't though. Maybe someone can suggest something else?
    So iweb 08, trying to embed a flashplayer, using an iframe.
    I have my files on idisk in SITES, same place as index.html. Took me ages just to get that right. BTW is it?
    I am trying to use a flashskins flashplayer in iweb. On a g4, runing tiger. The guy from flashskins told me to enbed a iframe that will point to my files, cause I just could'nt get it to work by putting the flashobject file into the snippet. They suggest this code
    <iframe width="342" height="119" frameborder="0" src="PATH TO YOUR FLASHSKIN PLAYER/audioplayer7.swf"</iframe>
    So my Q is..
    what's the correct path to my files.?
    is it http://web.me.com/yourusername/Web/Sites/mediaplayerws.swf
    or //Volumes/yourusername/Web/Sites/mediaplayerws.swf
    or idisk.mac.com/yourusername/Web/Sites/mediaplayerws.swf
    or something else?
    And.. is everything else I'm doing correct. It's giving me a heart attack...
    Anyways if any angels out there can shed some light on this one. You might just save my computer from certain vocal abuse : )
    Thanks in advance.
    m

    Hi,
    Thanks R.
    I don't mind about background colour. I want to keep it fairly simple so it actually loads for people. The main goal is for the music to get to ears.
    SO I need to change my page to white? Bummer. Yours is black though. Ok I'll try that.
    And, are you saying IE won't play flashskins at all?
    So should I scrap that idea and use an object perhaps?
    I should say that within iweb the iframe appears with a message +"NOT FOUND" "The requested URL was not found on this server+" And shows the address I pointed to web.me.com/myname/Web/Sites/mediaplayerws.swf
    What a puzzle this is turning out to be.
    Thanks for you time. I read your whole site last week, loved it. It got me into this caper, after years of putting off learning a web design program. I know so many music programs and the like that the last thing I needed was to learn another language (program). But your site showed me I can get something simple, tasteful, and effective. I'm on the final stretch, just this d a m n Mplayer.
    Rock on,
    m
    Message was edited by: The...........Haggis

  • I am told that my browser does not support iframes when trying to access a web site.

    This is Google's cache of http://sitetrail.com/askearth.com. It is a snapshot of the page as it appeared on Sep 19, 2010 10:44:02 GMT. The current page could have changed in the meantime. Learn more
    Full version These search terms are highlighted: history askearth com
    * Contact Us
    SiteTrail - Website News and Analysis
    * Business
    * Dev & Design
    * Entertainment
    * Mobile
    * Social Media
    * Tech
    Search in SiteTrail askearth.com (visit site) This data was last updated 6 months ago (update data).
    Site Profile Estimated Value: $5,582.16 USD Estimated Revenue: $7.60 USD per day $227.90 USD per month $2,772.81 USD per year Estimated Pageviews: 3,355 per day 100,648 per month 1,224,551 per year Alexa Rank: #447,581 Google Index: show google links Yahoo Index: show yahoo links Bing Index: show bing links History: show history Site Title: Interesting Questions - AskEarth Site Traffic
    Site Server Server IP Address: 140.174.79.37 Server IP Decimal: -1934733531 Server IP Location: Pordenone, Friuli-Venezia Giulia, Italy
    Your browser does not support iframes. Whois Information Welcome to the Network Solutions(R) Registrar WHOIS Server.
    The IP address from which you have visited the Network Solutions Registrar WHOIS database is contained within a list of IP addresses that may have failed to abide by Network Solutions' WHOIS policy. Failure to abide by this policy can adversely impact our systems and servers, preventing the processing of other WHOIS requests.
    To see the Network Solutions WHOIS Policy, click on or copy and paste the following URL into your browser:
    http://www.networksolutions.com/whois/index.jhtml
    If you feel that you have received this message in error, please email us using the online form at http://www.networksolutions.com/help/email.jsp with the following information:
    Whois Query: askearth.com YOUR IP address is 174.129.155.56 Date and Time of Query: Tue Feb 23 00:49:37 EST 2010 Reason Code: IE DNS Records Host Class Type IP TTL Target Other askearth.com IN A 140.174.79.37 7199 askearth.com IN NS 7200 ns53.worldnic.com askearth.com IN NS 7200 ns54.worldnic.com askearth.com IN SOA 7200 mname: NS53.WORLDNIC.com rname: namehost.WORLDNIC.com serial: 108121504 refresh: 10800 retry: 3600 expire: 604800 minimum-ttl: 3600 HTTP Headers HTTP/1.1 302 Found Date: Tue, 23 Feb 2010 05:59:34 GMT Server: Apache/2.2.11 (Unix) mod_fastcgi/2.4.2 PHP/4.4.9 with Suhosin-Patch mod_ssl/2.2.11 OpenSSL/0.9.7m mod_apreq2-20051231/2.6.0 mod_perl/2.0.3 Perl/v5.8.7 Location: http://askearth.com/go/home Content-Length: 417 Connection: close Content-Type: text/html; charset=iso-8859-1
    HTTP/1.1 200 OK Date: Tue, 23 Feb 2010 05:59:35 GMT Server: Apache/2.2.11 (Unix) mod_fastcgi/2.4.2 PHP/4.4.9 with Suhosin-Patch mod_ssl/2.2.11 OpenSSL/0.9.7m mod_apreq2-20051231/2.6.0 mod_perl/2.0.3 Perl/v5.8.7 Set-Cookie: id=11010246; EXPIRES=Sun, 01-Apr-29 00:00:00 GMT; PATH=/ Set-Cookie: pass=u0zit0yv; EXPIRES=Sun, 01-Apr-29 00:00:00 GMT; PATH=/ Set-Cookie: since=1266904775; PATH=/ Connection: close Content-Type: text/html Firefox Add-on SiteTrail Firefox Add-onPerform SiteTrail lookups via right-click menu straight from your web browser! Popular Lookups
    * google.com#1
    * facebook.com#2
    * youtube.com#3
    * yahoo.com#4
    * live.com#5
    * baidu.com#6
    * wikipedia.org#7
    * blogspot.com#8
    * msn.com#9
    Browse Lookups
    A B C D E F G H I
    J K L M N O P Q R S T U V W X Y Z Recent Lookups
    * askearth.com#447,581
    * evdenevenakliyatv.com#442,990
    * mytaskhelper.com#756,476
    * fikralari.net#639,299
    * typemytape.com#1,547,530
    * tmmod.info#1,078,434
    * torrentplus.org#233,938
    * communitycollegelistin...#430,008
    * cadbury.co.uk#104,852
    * myhobbyblogs.com#297,443
    Random Lookups
    * solidmastermind.com#931,183
    * homelegance.com#277,584
    * homepage-anleitung.de#1,091,134
    * icicigroupcompanies.co...#1,513,887
    * ptiboo.ch#744,058
    * fachportal-paedagogik....#312,102
    * lcpo.com#336,926
    * spitinet.gr#904,561
    * sportingpulse.com#37,069
    * v-pillsbuyutucuhap.com#543,342
    * sameskyboard.com#51,252
    * alparslanpazarlama.com...#1,444,281
    * ventausa.com#221,470
    * dentalmag.org#234,937
    * digitalfoci.com#1,214,872
    * blank-label.com#273,247
    * efun.ir#446,350
    * greatamericandays.com#579,258
    * it007.com#58,123
    * hairyclipz.com#760,892
    Navigation
    * Contact Us
    Categories
    * Business
    * Dev & Design
    * Entertainment
    * Mobile
    * Social Media
    * Tech
    Recent News
    * VP of Twitter Says Twitter is NOT A Social Network
    * Google Puts White Spaces To Use
    * YouTube Instant Experiment Gives Creator a Job At YouTube
    * YouTube Time Machine – A New Website To Waste Hours On
    * Google’s New Instant Search – Saving 11 Hours Every Second
    * Facebook Notes Gets New Tools
    Recent Lookups
    * askearth.com#447,581
    * evdennakliyateve.com#442,990
    * mytaskhelper.com#756,476
    * maximumwoman.com#639,299
    * typemytape.com#1,547,530
    * tmmod.info#1,078,434
    © 2010 SiteTrail. All Rights Reserved.

    I'm not clear on where you are seeing that text. When I view Google's cached page from the page found in this search
    https://www.google.com/search?q=site%3Asitetrail.com%2Faskearth.com
    It doesn't match yours exactly. There is an iframe with a Google map in it in the "Hosting Analysis" section, which in your pasted page seems to be the "Site Server" section.
    Which Google site did you search?

  • Inline XML Publisher PDF rendered using IFRAME in Self Service

    Hi,
    We have created an XML Publisher Report (PDF) which renders inline in a SelfService Page.
    When we click on the Save Icon in the IFRAME, The File Name is really long including the Applications URL, DBC File, File Name etc.
    Ex: http___it21.marvell.com_8005_OA_HTML_xdo_doc_display.jsp_dbcName=it21_devt&fileName=MVL_HR_EMP_APPRAISAL_DETAIL-1163094244_out.pdf.pdf&mFileLength=50068&p_output=_devt_prod_prodcomn_html_fwk_t_MVL_HR_EMP_APPRAISAL_DETAIL-1163094244_out.pdf
    The requirement is to change the File Name to PerformanceAppraisal.pdf
    Below is the code used to render the inline PDF.
    - The XMLString has the complete XML generated.
    public void renderInlinePDF(OAPageContext pageContext, OAWebBean webBean, OAApplicationModule am, String XMLString, String templateName)
    System.out.println("---MVLReviewPerformanceXMLUtil.renderInlinePDF----------------- XMLString "+ XMLString);
    System.out.println("---MVLReviewPerformanceXMLUtil.renderInlinePDF----------------- templateName "+ templateName);
    BlobDomain xmlData = new BlobDomain(XMLString.getBytes() );
    pageContext.writeDiagnostics(pageContext, "------------- xmlData : "+xmlData.toString(), 4);
    pageContext.writeDiagnostics(pageContext, "------------------------------------------------------------------- ", 4);
    String redirectURL = null;
    try
    pageContext.writeDiagnostics(pageContext, "------------- redirectURL 1 : "+redirectURL, 4);
    redirectURL = DocumentHelper.getOutputURL(
    pageContext
    ,"XXGT"
    ,templateName
    ,xmlData.getBinaryStream()
    ,"PDF"
    ,null
    ,"en"
    ,"US"
    pageContext.writeDiagnostics(pageContext, "------------- redirectURL 2 : "+redirectURL, 4);
    System.out.println("---MVLReviewPerformanceXMLUtil---------------------------- redirectURL = "+ redirectURL);
    catch(Exception e )
    throw new OAException("Error in redirect");
    OAHTMLWebBean frame=(OAHTMLWebBean)webBean.findChildRecursive("IFRAME");
    pageContext.writeDiagnostics(pageContext, "------------- IFRAME is NULL"+frame, 4);
    if (frame == null)
    pageContext.writeDiagnostics(pageContext, "------------- IFRAME is NULL", 4);
    OAHTMLWebBean outRegion = (OAHTMLWebBean)createWebBean(pageContext,HTML_WEB_BEAN, null, "IFRAME");
    outRegion.setHTMLAttributeValue("src",redirectURL);
    outRegion.setHTMLAttributeValue("width", "100%");
    outRegion.setHTMLAttributeValue("height", "100%");
    outRegion.setHTMLAttributeValue("title","PerformanceReview");
    outRegion.setHTMLAttributeValue("name","PerformanceReview");
    OAWebBean iFramePlaceHolder = (OAWebBean) webBean.findChildRecursive("IFrameRegionPlaceHolder");
    iFramePlaceHolder.addIndexedChild(outRegion);
    // pageContext.getPageLayoutBean().addIndexedChild(outRegion);
    pageContext.writeDiagnostics(pageContext, "------------- IFRAME AddIndexedChild", 4);
    XML Publisher version 5.6.3
    Any help in this regard will be highly appreciated.
    Thanks,
    Sujay

    Thanks Balusc!!
    I have made use of your code to display PDF files in an IFRAME tag too!!! I just dint believe that this would be possible. Please just take a look at my JSP page.
    <h:form id="CaseLookUp">
         <%
         String path = request.getContextPath()+"";
         out.print(path);
         %>
    <iframe scrolling="auto" src="<%=path%>/imageServlet?file=D:\70-229 V5.pdf" width="80%" height="600" ></iframe>
         </h:form>

  • Questions on Iframes and PAR structures

    Hi,
    I have a few questions on Iframes, JSP's and PAR structure for Portal Application Projects in NWDS.
    1. Can I change the source of an iframe from one jsp to another instead of one html to another.
    2. My Jsp's are in Portal-Inf/pagelet because whenever I add a new JSP I add a new Portal application object. So how do you refer to the relative path in the calling JSP. e.g <iframe name = "myframe" src ="<relative path>BlankPage.jsp" width="100%">. What would be the relative path. I tried pagelet\jspname.jsp but it does not work.
    3. In general how do you type the relative path for objects in a PAR project structure?

    Hi Prem,
    1.Yes,you can.
    2.You dont have to,you can copy and paste as many as Jsp's inside the pagelet.I use beans to customize the BHTML UI properties.So you can make your IFRAME source tag as variable.
    <iframe
         id="Nedbrowser"
         name="Nedbrowser"
         style="relative"
         width="<%=myBean.getFrameWidth()%>"
         height="<%=myBean.getFrameHeight()%>"
         frameborder="yes"
         marginheight="0"
         marginwidth="0"
         scrolling="yes" 
         src="<%=myBean.getUrl()%>">
    </iframe>
    Your approach of setting relative path wont work as it is.You have to do something more
    1. in JSP you have to use a import statement like
    <%@ page import="com.sapportals.portal.prt.resource.IResource" %>
    <% IResource rs = componentRequest.getResource(IResource.JSP , "pagelet/BalnkPage.jsp");  %>
    and in the IFRAME tag you can do something like this
    <iframe
         id="Nedbrowser"
         name="Nedbrowser"
         style="relative"
         width="300"
         height="400"
         frameborder="yes"
         marginheight="0"
         marginwidth="0"
         scrolling="yes" 
         src="">
    </iframe>
    <% Nedbrowser.setSrc(rs.getResourceInformation().getURL(componentRequest)); %>
    3.There are so many forum pages on this matter.Just go ahead and search for IResource in SDN.
    Goodluck
    regards
    Senthivel

  • Error when displaying a pdf file in an iFrame

    Hi,
    I would like to display a pdf file in my Java Web Dynpro application. I am using an iFrame element.
    The code I used is:
    // test if the file exists
    if( path != null)
         path = "D:\\Echanges\\Facture\\" + path + ".pdf";
    if (isFile(path)) // test if the file exist
         wdContext.currentContextElement().setPath(path); // we set the path of the file for the iFrame url
    else
         wdContext.currentContextElement().setPath("D:\\Echanges\\errorDocAccess.htm"); // here we set the path of an error file to display in the iFrame
    In the context, path is declared as a String variable and mapped to an iFrame. What happen when I lauch the program is the followig error:
    com.sap.tc.webdynpro.services.exceptions.InvalidUrlRuntimeException: Invalid URL=D:/Echanges/errorDocAccess.htm
    I have checked the path of the error file and it is valid. How do I get to display my file ? The path is on the same server as the portal.
    Thanks a lot for your help.
    Thibault Schalck

    Not solved

  • Using IFRAME in JSF to display a PDF file

    2 all,
    How do i display a PDF file inside a JSF page in a IFRAME tag?
    I store the PDF file location (like d:\images\pdf1.pdf) in my database. I cant give this location directly into the src attribute cos then the file will be rendered to only users who have access to that folder (the application is a internet application). IFRAME would be ideal as the display is very very neat (esp for pdf files).
    To get this working i tried the examples given in balusc blogs (on image servlet) but the problem is that my servlet is not getting called. Find below the web.xml and imageDisplay.jsp pages that i tried
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>WorkFlowTool</display-name>
    <context-param>
      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
      <param-value>server</param-value>
    </context-param>
    <filter>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
      <init-param>
       <param-name>maxFileSize</param-name>
       <param-value>20m</param-value>
      </init-param>
    </filter>
    <filter>
      <display-name>SecurityCheckFilter</display-name>
      <filter-name>SecurityCheckFilter</filter-name>
      <filter-class>filters.SecurityCheckFilter</filter-class>
    </filter>
    <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <url-pattern>/faces/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <url-pattern>*.faces</url-pattern>
    </filter-mapping>
    <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
      <filter-name>SecurityCheckFilter</filter-name>
      <url-pattern>/faces/*</url-pattern>
    </filter-mapping>
    <listener>
      <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
    </listener>
    <servlet>
      <servlet-name>Faces Servlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
      <servlet-name>Image Servlet</servlet-name>
      <servlet-class>servlets.ImageServlet</servlet-class>
      <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
      <servlet-name>Image Servlet</servlet-name>
      <url-pattern>/imageServlet/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <session-config>
      <session-timeout>60</session-timeout>
    </session-config>
    <welcome-file-list>
      <welcome-file>/jsp/index.jsp</welcome-file>
    </welcome-file-list>
    <error-page>
      <error-code>500</error-code>
      <location>/jsp/error.jsp</location>
    </error-page>
    <resource-ref>
      <res-ref-name>jdbc/JDDS</res-ref-name>
      <res-type>java.lang.Object</res-type>
      <res-auth>Container</res-auth>
      <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    </web-app>
    imageDisplay.jsp
    <HTML>
    <HEAD>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
    <f:loadBundle basename="messages" var="msg" />
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <LINK rel="stylesheet" type="text/css" href="../theme/Styles.css"
         title="Style">
    </HEAD>
    <body topmargin="0" leftmargin="0">
    <f:view>
         <h:form id="CaseLookUp">
              <h:dataTable value="#{pc_ImageDisplay.dataModel}" var="var">
                   <h:column id="one">
                        <f:facet name="header">
                             <h:outputText value="H1" id="HOne"/>
                        </f:facet>
                        <h:outputText value="#{var.caseID}" id="IDONE"/>
                   </h:column>
                   <h:column id="two">
                        <f:facet name="header">
                             <h:outputText value="H2" id="HTwo"/>
                        </f:facet>
                        <h:graphicImage value="imageServlet?file=#{var.PODocPath}" id="image"/>
                   </h:column>
              </h:dataTable>
         </h:form>
    </f:view>
    </body>
    </HTML>The image servlet is what i got from balusc's site (http://balusc.blogspot.com/2007/04/imageservlet.html).
    I dont know why my servlet is not getting called. Can someone help me with this pls?
    okay let me post the modified code for my image servlet here
    public class ImageServlet extends HttpServlet {
         private static final long serialVersionUID = 1L;
         public void doGet(HttpServletRequest request, HttpServletResponse response) {
            // Define base path somehow. You can define it as init-param of the servlet.
    //        String imageFilePath = "/images";
            // In a Windows environment with the Applicationserver running on the
            // c: volume, the above path is exactly the same as "c:\images".
            // In UNIX, it is just straightforward "/images".
            // If you have stored images in the WebContent of a WAR, for example in the
            // "/WEB-INF/images" folder, then you can retrieve the absolute path by:
            // String imageFilePath = getServletContext().getRealPath("/WEB-INF/images");
            // Get file name from request.
            String imageFileName = request.getParameter("file");
            System.out.println("Inside the image servlet ---->>>> " + imageFileName);
            // Check if file name is supplied to the request.
    //        if (imageFileName != null) {
    //            // Strip "../" and "..\" (avoid directory sniffing by hackers!).
    //            imageFileName = imageFileName.replaceAll("\\.+(\\\\|/)", "");
    //        } else {
    //            // Do your thing if the file name is not supplied to the request.
    //            // Throw an exception, or show default/warning image, or just ignore it.
    //            return;
            // Prepare file object.
            File imageFile = new File(imageFileName);
            // Check if file actually exists in filesystem.
            if (!imageFile.exists()) {
                // Do your thing if the file appears to be non-existing.
                // Throw an exception, or show default/warning image, or just ignore it.
                return;
            // Get content type by filename.
            String contentType = URLConnection.guessContentTypeFromName(imageFileName);
            // Check if file is actually an image (avoid download of other files by hackers!).
            // For all content types, see: http://www.w3schools.com/media/media_mimeref.asp
            if (contentType == null || !contentType.startsWith("image")) {
                // Do your thing if the file appears not being a real image.
                // Throw an exception, or show default/warning image, or just ignore it.
                return;
            // Prepare streams.
            BufferedInputStream input = null;
            BufferedOutputStream output = null;
            try {
                // Open image file.
                input = new BufferedInputStream(new FileInputStream(imageFile));
                int contentLength = input.available();
                // Init servlet response.
                response.reset();
                response.setContentLength(contentLength);
                response.setContentType(contentType);
                response.setHeader(
                    "Content-disposition", "inline; filename=\"" + imageFileName + "\"");
                output = new BufferedOutputStream(response.getOutputStream());
                // Write file contents to response.
                while (contentLength-- > 0) {
                    output.write(input.read());
                // Finalize task.
                output.flush();
            } catch (IOException e) {
                // Something went wrong?
                e.printStackTrace();
            } finally {
                // Gently close streams.
                if (input != null) {
                    try {
                        input.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                        // This is a serious error. Do more than just printing a trace.
                if (output != null) {
                    try {
                        output.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                        // This is a serious error. Do more than just printing a trace.
        }

    Thanks Balusc!!
    I have made use of your code to display PDF files in an IFRAME tag too!!! I just dint believe that this would be possible. Please just take a look at my JSP page.
    <h:form id="CaseLookUp">
         <%
         String path = request.getContextPath()+"";
         out.print(path);
         %>
    <iframe scrolling="auto" src="<%=path%>/imageServlet?file=D:\70-229 V5.pdf" width="80%" height="600" ></iframe>
         </h:form>

  • Printing an iframe with pdf using javascript is not working in IE8 and above

    I have a problem with printing and Iframe with PDF in IE 8 and above
    Following is my javascript:
    var urlValue="";//Path of the file to be printed
    var div = document.getElementById("printerDiv");
    div.innerHTML = '<iframe src="' + urlValue + '" id="frame" name="frame" style="width:100%;height:100%;"></iframe>';
    frame.focus();
    frame.print();
    This same thing is working fine in other browser but for IE is just not invoking the print dialog.
    Also I tried to get the frame.print(); on load of the frame but even that is not working exactly as that way it print the parent window in output.
    Few things I tried like:
    1) div.innerHTML = '<iframe src="' + urlValue + '"
    onload="this.contentWindow.print();"></iframe>';
    2) frame.contentWindow.focus();
    frame.contentWindow.print();
    3) window.document.getElementsByTagName('iframe')['frame'].onload = (function () {
    frame.focus();
    frame.print();
    I need to get the print of only the content which is in Iframe which I am binding in "printerDiv" by javascript.
    Any perfect/different solution from which I have tried then please post here?
    Thanks.

    PDF documents are hosted in an ActiveX or netscape plugin control which have their own printing functions.
    Start>Adobe Reader>Edit>Preferences - to adjust what functionality the PDF document viewer addon displays (menus etc).
    Tools>Manage Addons>Show all addons
    make sure you have both the x86 and x64 versions of your PDF reader Active X control installed and enabled. I would recommend also that you update to the latest version of the vendors' (Adobe?) plugin.
    Possibly you have disabled scripting of ActiveX controls in the IE security zone that your parent page maps to. Also there is an IE security zone feature that prevents navigation to a domain in a zone of lower integrity.
    Tools>Internet Options>Security tab, click "Reset all zones to default".
    when asking developer related questions it is helpful if you can include a link to your website.
    Rob^_^

  • OpenDOC in iframe

    Hi All,
    has anyone able to use iframe with the PIK (Portal Integration Kit) so that the websphere portal menus isn't lost when clicking on a report ?  Is there a way to lock the "Document List" portlet which is part of the PIK in an iframe basically?

    you can use opendocument to open an excel file with using just the file name in the repository.
    for example
    stringvar path:= "/businessobjects/enterprise115/desktoplaunch/opendoc/openDocument.jsp?sDocName=myexcelfile";
    WEIFrame ("myiframe", path, 600, 400, "no")
    note that in a web viewer you don't get the full excel toolbar. also, not being an excel user, i am not sure how you would pass any context parameters to excel.

Maybe you are looking for