How to specify relative path for background image  in xsl

Hi,
I am generating a PDF from Apcahe FOP. I have an xsl for that, in the xsl fo:block I am displaying a background image. When the image path is absolute like..C:\image\logo.png it works fine. But I want to have the image in my WebContent\images folder and my xsl file is in WebContent\xsls folder. So when I try giving the relative path as ../images/logo.png, the image is not displayed.
Can anyone tell how to do this???
Thanks,
Sanjeev.

I have a fo:block like this :
<fo:block border-style="solid" border-width="0.2pt" text-align="left"
                         background-image="url('http://localhost:8080/Project/images/table_header_center.png')"
                         font-size="8pt" font-weight="bold" color="white" padding-top="1pt"
                         padding-bottom="1pt">
                         <xsl:value-of select="tr/td/span" />
                    </fo:block>In the above code you can see that the the background-image="url('http://localhost:8080/Project/images/table_header_center.png')"
has been given as absolute. The images folder is in my WebContent directory. I want this path to be relative to the context of my application , something like background-image="url('../images/table_header_center.png')".
Thanks.
sanjeev.

Similar Messages

  • How to specify relative path for file name in java class

    I have a directory structure like this.
    C:\Aurora\com\optemys\aurora\validation
    I have a class Test.java under the validation folder.
    I have various files under the same folder i.e validation.
    If I want to access the file "test.properties" in Test.java, how can I just specify "test.properties" & not "C:\Aurora\com\optemys\aurora\validation\test.properties".
    I dont want to hardcode any file path into the class. How can I specify the relative file name into the class.
    Thanks In Advance
    Sachin

    switch the name in Test.properties and use
    this.getClass().getResourceAsStream(fileName)

  • Get the relative path for java class

    How to get Relative path for java class which is inside in web-inf directory in webapps

    ajay.manchu wrote:
    Hi gimbal2,
    My Requirement is i need to run a java class from batch file,when i created batch file in that i need to mention the complete path of the java class,so instead of mentioning that i want to provide only java class name,thats why i asked that one..
    can u help me regarding that....
    Thanks in advanceI wonder how that would work then. Let's take a fictive example. You have a class com.mycompany.myapp.Foo. This would mean that the class is stored in some directory like this:
    c:/webrootdir/myapp/WEB-INF/classes/com/mycompany/myapp/Foo.classTo be able to run such a class from the commandline using Java, you would have to invoke this command:
    java -cp c:/webrootdir/myapp/WEB-INF/classes com.mycompany.myapp.FooHow would knowing the exact path to this class help you?

  • Using relative path for in file/ftp adapter

    Hi All,
    How to have a relative path for file/ ftp adapter's inbound/outbound operation?
    Example: Consider $ORA_HOME = /home/oracle --> This environment variable can be different on different machines
    i want to drop a file in to $ORA_HOME/folder1/folder2 (Or poll for a file).
    <partnerLinkBinding name="FTP">
    <property name="wsdlLocation">FTP.wsdl</property>
    <property name="out_dir" type="LogicalDirectory">What do i write here???</property>
    <property name="retryInterval">60</property>
    </partnerLinkBinding>
    if i cant configure this in partner link section or in activation agent sction, how else do i achieve this?
    i am using 10.1.3.* version.
    Thanks in advance.
    Roshan.

    You can achive it using the deployment scripts if the directory is changing on the basis of the environment
    If you want to change at run time than you can use the jca properties to set using the variables at runtime.
    Regards,
    Ajay

  • Relative Path for Jquery into Content Editor Web Part

    Hi;
    I'd add a Content Editor Web Part (CEWP) to a web part zone. I'd edit that CEWP in HTML view and add my script which load Jquery and my question :  how to use a relative
    path for Jquery :
    <SharePoint:ScriptLink Name="SP.js" runat="server" OnDemand="true"
      Localizable="false" />
    <script src="/sites/XXX/Style%20Library/Scripts/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    My code
    </script>
    Regards

    Hi;
    Firstly, I have used : 
    <script src="/Style%20Library/Scripts/jquery.min.js" type="text/javascript"></script>
    But any result and any change and If I add /Sites/XXX/ : it works correctly ?
    My code is :
    <SharePoint:ScriptLink Name="SP.js" runat="server" OnDemand="true"
        Localizable="false" />
    <script src="/sites/XXX/Style Library/Scripts/jquery.min.js" type="text/javascript"></script>    
    <script type="text/javascript">
    ExecuteOrDelayUntilScriptLoaded(displayTitle, "SP.js");
    var site;
      var context;
      function displayTitle() {
        //Get the current client context
        context = SP.ClientContext.get_current();
        //Add the site to query queue
        site = context.get_web();
        context.load(site);
        //Run the query on the server
        context.executeQueryAsync(onQuerySucceeded, onQueryFailed);
    function onQueryFailed(sender, args) {
      alert('request failed ' + args.get_message() +
        '\n' + args.get_stackTrace());
    function onQuerySucceeded(sender, args) {
        $("#layoutsTable table th span").html("Bienvenue sur le site " + site.get_title() + " - Direction Technique");
        $("#zz17_V4QuickLaunchMenu ul.root li span:contains('Biblioth')").parent().parent().hide();
        $("#zz17_V4QuickLaunchMenu ul.root li span:contains('Listes')").parent().parent().hide();
    </script>

  • How to get the path of the image stored in sap??

    Hi All
    The problem is
    While making an entry in standard there is a field called documents through which we attach our images in sap.
    How to get the path of the image stored with the corresponding order so that the image can be displayed while we are creating a report.
    I know how to upload the image while creating a report using docking control.
    I am not able to get the path of the image stored...
    Please Help
    Thanks in advance..
    Pooja

    I am not aware of exactly which tables are used for storing the attached doc. details, but we have worked in the similar requiremnent.
    What you can do is .... before uploading the image to any order, try swich on the SQL trace ST05 and after upload switch off.
    The log will display what are the tables involved while storing the image. And you can easily find out the image location.

  • Css/js relative path for embedded server

    We have recently begun using relative paths for css and js files in our deployed applications:
    <link href="../../resources/css/global3.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" src="../../resources/script/globalScript.js" type="text/JavaScript"></script>
    I cannot figure out where to put the resources folder on my local machine so the pages will link correctly when running a project on my embedded server in JDev. Can anyone please help?

    Hi,
    the embedded OC4J has its configuration files at
    \jdeveloper_installdir\jdev\system\oracle.j2ee.<version>\embedded-oc4j
    However, if you use relative addressing then web applications try to find them relative to the public_html directory of the Viewlayer project
    Frank

  • How to use relative paths in Captivate 8 / Cómo usar URL's relativas en Captivate 8

    Hello, I have developed a bunch of courses which will be migrated to a new site and I am having trouble changing the absolute paths into relative URL's to resources such as PDF files inserted into the scorm packages. I cannot find information on how to use relative paths in Captivate. Please help. Thank you.

    I have the same issue with relative links using Captivate 8.  I am trying to load Captivate modules into an LMS using relative links to document files within the LMS.  The links work fine during a site page test so not an issue in the LMS, but from the Captivate module they aren't working....
    Help?

  • How to specify Host Server for Replicated Virtual Desktops within RDVH Collection

    My question about how to specify Host Server for Replicated Virtual Desktops within Collection.
    I know there is a aswered thread on this, but that solution (wait a week) didn't work for me.
    So i have 2 servers, RDS01 and RDS02 with both 15 Hyper-V VM's and replicating to eachother. That part works fine.
    Now I wanted to make it easy for my users I build a Connection Broker: RDCB
    All went fine in that setup, but when I want to add the existing VM's from RDS01 and RDS02 to the collection it just radomly adds running ones and replicated ones.
    So both RDS01 and RDS02 have 15 VM's running and 15 replica's in stopped state, but when I look in my collection, it says RDS01 has 23 and RDS02 has 7 VM's. When I add them all, I see he wants to add a lot of stopped states replica's from RDS01 instead of
    the running ones from RDS02.
    How can I specify which one he should use? Or need I disable replication first, setup the whole RDCB collection thing, and then turn replication back on? Or does Hyper-V replication not work at all when used in a collection?
    I hope someone can help out here. I'm googling and trying for 1,5 week now, but i can;t get it right.
    Thanks in advance.

    Hi Robin,
    Thanks for your patience.
    After you removed Replication from 1 machine on both RDS01 and RDS02, please restart that machine. After that, please add this machine to the RD collection again to test how the issue goes.
    As we know, Hyper-V Replica provides asynchronous replication of Hyper-V virtual machines between two hosting servers. It is simple to configure and does not require either shared storage or any particular storage hardware. Any server workload that can be
    virtualized in Hyper-V can be replicated. Replication works over any ordinary IP-based network, and the replicated data can be encrypted during transmission. Hyper-V Replica works with standalone servers, failover clusters, or a mixture of both. The servers
    can be physically co-located or widely separated geographically. The physical servers do not need to be in the same domain, or even joined to any domain at all.
    Currently, would you please add only running state VMs to the RD CB collection? And would you please capture some screenshots of the error message? Thanks very much for your cooperation.
    Best regards,
    Sophia Sun
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • How to not print a certain background image?

    Hello all,
    I wonder how can one make a certain background image automatically not to be printed ...
    changing the transparency to 0% every time is not very elegant ...
    cheers
    North

    A big red button in the middle of the screen that says Whatever.
    Peter

  • HOW TO FIND MENU PATH FOR A TCODE

    PLZ TELL ME HOW TO FIND MENU PATH FOR A TCODE .
    I HAVE MADE A MENU ENHANCEMENT  WITH TCODE +DW2.
    IT MENU PATH IS NOT TRACEABLE.

    Hi Madan,
    It is in the transaction code <b>S001</b>.
    Check my previous post on this.
    It is not listed on the SAP Menu. Thats why SEARCH_SAP_MENU returns nothing...
    <b>Go to the Initial Screen and then type /n in the TCODE.
    From there now type S001 to go to transaction S001.</b>
    The other ways do not work. Like combining both in a single step : "/ns001".

  • PNG fix for background images?

    I am putting together an artsy-fartsy design with lots of
    stylish wavy lines, fine gradients and dropdown shadow effects and
    was wondering if there was a PNG fix for background images. Most
    out there seem only to apply to images included in the html.
    Otherwise I can use JPEGs with a bit of the background included
    behind them (I hate doing this)...

    Hi,
    Hmmm. I think you have a great point there. In my opinion, I
    think that there is no png fix for background images. Use jpegs
    with background. I do the same.
    Gaurav
    www.gauravchandra.com

  • How to find Related Tables for the Tcode given.

    How to find Related Tables for the Tcode given. (master data)
    Thanks in advance.

    Hi Sridhar,
    Welcome to SDN.
    The tables for a given transaction can be seen in the transaction SE80.
    First goto SE93.
    Give ur Tcode and find the program name.
    Now goto SE80. select program in the first dropdown and give the program name in the second box. U can find the list of tables used.
    One more way is : use ST05.
    and One more is using FM 'get_tables'
    Thanks,
    Shailaja
    Edited by: Shailaja on Jul 11, 2008 12:33 PM

  • Relative path for images in RTF templates

    Hi everybody!
    When I insert an image in a RTF template, I put its path into the web dialog, in order to see correctly the picture when I open the report from the xmlp server, in this way: url:{"http://servername/analytics/res/Images/image.bmp"}
    How can I make this path relative, in order to see the images even if the server name changes?
    Thanks so!
    Francesco

    Hi Tim,
    I am using BIP 10.1.3.3.2. I am able to access system variable CURRENT_SERVER URL.
    Steps:
    <?param@begin:CURRENT_SERVER_URL?>
    <xsl:value-of select="$ CURRENT_SERVER_URL"/>
    CURRENT_SERVER_URL is getting printed in BI Publisher. Value displayed is http://xx4697.xxx.co.in:9704/xmlpserver.
    Now we are importing xsl into RTF template. File aaa.xsl is stored at [BIP_Installation_Directory\oc4j_bi\j2ee\home\default-web-app]
    We have hardcoded the path for XSL in RTF. The path is <?import: http://xx4697.xxx.co.in:9704/aaa.xsl?>
    As we want to set dynamic path we changed hardcoded xsl path to <?import: {$CURRENT_SERVER_URL}/../aaa.xsl?> but it is not working. Sometimes BIP is taking local path of MyDocuments folder and sometimes Desktop path. If I put that XSL file in MyDocuments folder or Desktop, it is working fine. But ideally it should refer [BIP_Installation_Directory\oc4j_bi\j2ee\home\default-web-app] path...
    Thanks,
    Amit D

  • How to create a relative path for Flash video on a CDROM

    Hello - I need to distribute a web site to a client on a
    cross-platform Hybrid CDROM so that they can edit and make
    adjustments. This website also includes 2 flash videos that need to
    be included on the CDROM.
    My problem is this: I encoded the video in the Flash Encoder
    app and brought them into the main Flash app for conversion into
    swf files. I also used the media controller parameter to add a
    control skin to the movies. I now have 2 swf files associated with
    the flv video file, and I understand that all 3 of these must stay
    together for the video to work properly. The video plays correctly
    along with the controller skin on my Mac however only the
    controller shows up but no video on the CDROM. I believe that this
    has something to do with absolute vs. relative file paths for the
    video flv file to the swf controller file.
    I do not know how to change this path - I know "where" to
    change it within the controller parameter options box but do not
    know what syntax exactly to place here. How do you specify a
    relative path here? When I try to do it I get an error saying that
    the flv file cannot be found.
    I am trying to use the following syntax: /video/welding.flv
    where video is the name of the folder and welding is the name of
    the file. I have done numerous Google searches on this subject and
    stil cannot find an answer, so any help is appreciated.

    OK - I assigned the FLVPlayback component the instance name
    of videoPlayer to keep it simple. And I copied the above code into
    an Actions - Frame on Frame 1. FYI - The name of the video has been
    changed from welding to Timet Sponge.
    Now I get the following error messages:
    **Error** Scene 1, Layer 'Layer 1', Frame 1, Line 1: 1119:
    Access of possibly undefined property contentPath through a
    reference with static type fl.video:FLVPlayback.
    videoPlayer.contentPath = "";
    **Error** Scene 1, Layer 'Layer 1', Frame 1, Line 2: 1120:
    Access of undefined property _global.
    _global.videoURI = "video/Timet Sponge.flv";
    **Error** Scene 1, Layer 'Layer 1', Frame 1, Line 3: 1120:
    Access of undefined property _global.
    videoPlayer.contentPath = _global.videoURI;
    **Error** Scene 1, Layer 'Layer 1', Frame 1, Line 3: 1119:
    Access of possibly undefined property contentPath through a
    reference with static type fl.video:FLVPlayback.
    videoPlayer.contentPath = _global.videoURI;
    **Error** Scene 1, Layer 'Layer 1', Frame 1, Line 1: 1119:
    Access of possibly undefined property contentPath through a
    reference with static type fl.video:FLVPlayback.
    videoPlayer.contentPath = "";
    **Error** Scene 1, Layer 'Layer 1', Frame 1, Line 2: 1120:
    Access of undefined property _global.
    _global.videoURI = "video/Timet Sponge.flv";
    **Error** Scene 1, Layer 'Layer 1', Frame 1, Line 3: 1120:
    Access of undefined property _global.
    videoPlayer.contentPath = _global.videoURI;
    **Error** Scene 1, Layer 'Layer 1', Frame 1, Line 3: 1119:
    Access of possibly undefined property contentPath through a
    reference with static type fl.video:FLVPlayback.
    videoPlayer.contentPath = _global.videoURI;
    Total ActionScript Errors: 4, Reported Errors: 4

Maybe you are looking for

  • How do you remove songs from icloud so space not taken on devise?

    I downloaded my current purchases and previous purchases into my icloud on my ipad . I did not know it would take up the space on the ipad. But, I cannot figure out how to edit these songs in icloud so that All the purchases are not there. How do I g

  • JW Player

    I a trying to watch videos from pbs.org on a Windows Surface Pro with Windows 8.1 they play in Firefox but not in IE 11 it uses th JW Play 6.6.392 any help I had allways been able to before not sure what changed IE 11 or PBS Philip Kuffner

  • SDK's for CC Applications

    As a Technology Partner Silver we have paid for access to SDKs. As for now we can download Photoshop CC SDK only. When will be available SDK for InDesign and Illustrator and why nobody answers the emails at [email protected] Regards Bartek

  • Problems when I try to,to change applet

    ublic class Appletfortree5 extends JApplet implements ActionListener {      ArrayList arrl ;      //Hack to avoid annoying error message.      public Appletfortree5() {           getRootPane().putClientProperty("defeatSystemEventQueueCheck",         

  • FocusGained after caretUpdate in JTextArea

    I have built a display with a JTextArea as well as several JTextFields; all share common cut,copy,paste actions. And all but one action works properly. However, when I select text activating the Cut menu item, then select Cut in the menu, the caretUp