How to reference images from CSS for a portal component

how can I reference an image stored in the standard "/images" folder in a .PAR file from a CSS file?
I tried
.myHTMLelement {
   background-image: url('/images/TAB.bmp ') }
but it does not work (the image can't be found).
I don't want to use the API
request.getWebResourcePath() + "/images/saplogo.gif
in my JSP because this needs to get into a CSS file.

Hmmm,
When project is deployed, the JSP's are usually located in private section:
<i>\usr\sap\EED\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\projectname\pagelet\someJSP.jsp</i>
but the CSS is in public section:
<i>Z:\usr\sap\EED\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\portalapps\projectname\css\someCSS.css</i>
Now if you want to include the CSS in JSP I think you HAVE TO use the <i>getWebResourcePath</i> method:
<link rel="stylesheet" href='<%=componentRequest.getWebResourcePath()+"/css/someCSS.css"%>' type="text/css" />
or directly define the style:
<style type="text/css">
<!--
.dtn-node {
      background-image: url(<%=componentRequest.getWebResourcePath()+"/mimes/normal.css"%>/images/arrow15x10.gif);
      background-repeat: no-repeat;
      padding-left: 11px;
      padding-bottom: 7px;
      text-align: left;
-->
</style>
Just check your deployment and fit it to your needs...
Hope this helps,
Romano
PS: for example look at this:
<i>\usr\sap\EED\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.pct.pdk.htmlbcontrols\pagelet\all_examples.jsp</i>

Similar Messages

  • How to load images from css file in JavaFX 8

    I have this css file which loads images in JavaFX 8 application:
    #pill-left {
        -fx-padding: 5;
         -fx-border-image-source: url("/com/dx57dc/images/left-btn.png");
        -fx-border-image-slice: 4 4 4 4 fill;
        -fx-border-image-width: 4 4 4 4;
        -fx-border-image-insets: 0;
        -fx-border-image-repeat: stretch;
         -fx-background-color: null !important;
    #pill-left:selected { -fx-border-image-source: url("/com/dx57dc/images/left-btn-selected.png"); }
    #pill-left .label {
        -fx-text-fill: #d3d3d3;
        -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
    #pill-left:selected .label {
        /* -fx-text-fill: black; */
        -fx-text-fill: white;
        -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
    #pill-center {
        -fx-padding: 5;
         -fx-border-image-source: url("/com/dx57dc/images/center-btn.png");
        -fx-border-image-slice: 4 4 4 4 fill;
        -fx-border-image-width: 4 4 4 4;
        -fx-border-image-insets: 0;
        -fx-border-image-repeat: stretch;
         -fx-background-color: null !important;
    #pill-center:selected { -fx-border-image-source: url("/com/dx57dc/images/center-btn-selected.png"); }
    #pill-center .label {
        -fx-text-fill: #d3d3d3;
         -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
    #pill-center:selected .label {
        -fx-text-fill: black;
        -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
    #pill-right {
        -fx-padding: 5;
        -fx-border-image-source: url("/com/dx57dc/images/right-btn.png");
        -fx-border-image-slice: 4 4 4 4 fill;
        -fx-border-image-width: 4 4 4 4;
        -fx-border-image-insets: 0;
         -fx-border-image-repeat: stretch;
        -fx-background-color: null !important;
    #pill-right:selected { -fx-border-image-source: url("/com/dx57dc/images/right-btn-selected.png"); }
    #pill-right .label {
         -fx-text-fill: #d3d3d3;
        -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
    #pill-right:selected .label {
        -fx-text-fill: black;
        -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
    The images are located at the Java package com.dx57dc.images
    In Java 7_25 this code works as expected but in JavaFX 8 b99 I get this error:
    ava.lang.NullPointerException
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1129)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
    at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
    at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:233)
    at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:199)
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1249)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
    at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
    at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:233)
    at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:199)
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1249)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
    at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
    at com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:99)
    at com.sun.javafx.tk.quantum.AbstractPainter.paintImpl(AbstractPainter.java:210)
    at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:95)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
    at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:129)
    at java.lang.Thread.run(Thread.java:724)
    D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
    20 total resources being managed
    4 permanent resources (20.0%)
    1 resources locked (5.0%)
    7 resources contain interesting data (35.0%)
    0 resources disappeared (0.0%)
    D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
    20 total resources being managed
    4 permanent resources (20.0%)
    1 resources locked (5.0%)
    7 resources contain interesting data (35.0%)
    0 resources disappeared (0.0%)
    D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
    20 total resources being managed
    4 permanent resources (20.0%)
    1 resources locked (5.0%)
    7 resources contain interesting data (35.0%)
    0 resources disappeared (0.0%)
    What is the proper way to load images from css in Java 8?
    Ref
    How to load images from css file in JavaFX 8 - Stack Overflow

    There is nothing special to do - you execute the statement from your program just like any other SQL statement.  The only thing to be aware of are the privilege/permission issues:
    When loading from a file on a client computer:
    READ CLIENT FILE privilege is also required for the database user.
    Read privileges are required on the directory being read from.
    The allow_read_client_file database option must be enabled.
    The read_client_file secure feature must be enabled.
    Revoking these privileges is also the only way you can prevent a user from executing the statement.

  • How reference images in css

    Hi Everybody,
    how can i reference images in css of a JspDynPage? Until now i used the following piece of code which only works if i put the css inside my jsp file. What could be the reason? When i put the css part in a seperate file the images are not referenced.
    index.jsp:
    <%     String mimeUrl = componentRequest.getWebResourcePath(); %>
    <link rel="stylesheet" href='<%=mimeUrl+"/css/myStyle.css"%>' type="text/css" />
    <ul class="glossymenu">
         <li><a href="http://www.dynamicdrive.com/style/"><b>CSS</b></a></li>
         <li><a href="http://www.dynamicdrive.com/forums/"><b>Forums</b></a></li>     
    </ul>
    myStyle.css:
    <style>
    .glossymenu{
         position: relative;
         padding: 0 0 0 34px;
         margin: 0 auto 0 auto;
         background: url(<%=mimeUrl%>/images/menub_bg.gif) repeat-x;     
         height: 46px;
         list-style: none;
    </style>
    regards,
    Seed
    Edited by: seed_mopo on Aug 18, 2008 10:42 AM

    Hi,
    the jsp code in your css file is never executed by the server. This line of code in your css file will remain the same (check by accessing the css file via your browser):
    url(<%=mimeUrl%>/images/menub_bg.gif)
    your options are:
    - add the full path in your css file (add the <%=mimeUrl%>/images/menub_bg.gif as a temporary printout to your jsp and view the full path)
    - put this section or all of the css definition locally in your jsp file
    - create a jsp file with all the css definitions that is included as a jsp file
    JSP code will only execute within jsp pages which are rendered by the application server. Any code added to external files such as js or css files will not render.
    Cheers,
    Dion

  • How to copy images from another MC in reversed order??

    Hi everyone,
    I'm new to AS3 and have been fighting and searching for a solution to this problem for a week now, and I'm VERY close!
    I crated a MC holding of a series of images (about 50) and I jump around in it using plenty AS3 scripts (most of which I don't fully understand yet, but I'm working on that to! )
    I had to find a way to "rewind" (= play backwards) the MC. Since there is a stop(); command in almost every frame, prevFrame does not work and if I put that in a loop, it goes WAY to fast (but worked).. So I could think of only one way...
    Create a new (reverserd) MC with the same image sequence ald reverse it manually and play that one.
    This all works fine (very proud of it ).
    Now my question:
    To get this to work for multiple image sequences, I have to load all images twice (once in MC_1 and again in MC_2 and select them and reverse them).
    Not a big one, unless you want to create MANY of those SWF's...
    Is it possible to load the 50 images of the first MC in reverse into the second MC dynamically? JUST the images, noting else.
    extra info: the MC_2 is already in the lib(empty) and placed on the stage.
    something like:
    var pointer:Number=1;
    for (var:i:Number=50;i>=0;i--) {
    get MC_1.picure(var);
    put it in MC_2.frame(pointer);
    pointer = pointer + 1;
    All help is welcome and please take into account that I have little experience and copy most of my scripting from people like you
    T.I.A.
    Melluw

    I tried your advice (thanks for that)
    The event I already have is the mouse leave
    I //-d out the part I removed (what did work)
    The code I ended up with is:
    function Start() {
    stage.addEventListener(Event.MOUSE_LEAVE, cursorHide);
    function cursorHide(evt:Event):void {
    var currFrame = MC_1.currentFrame;
    if (CCW == true) {  //it is true in this case
      movStart = (50 - currFrame);
    else {
      movStart = currFrame;
    if (movStart>25) {
      MC_1.prevFrame();
    // removed swapChildren(MC_1, MC_2); // This is the part I removed
    // removed MC_2.gotoAndPlay(movStart);
    else {
      MC_1.gotoAndPlay (movStart);
    And if I leave the stage on the part where movStart is indeed >25
    Nothing happens,
    So I guess this is not what you meant
    Subject: Action Script 3 how to copy images from another MC in reversed order??
    I cannot direct you in the loading of the images approach, it will be too complicated, and will probably not work anyways... when you move away from a frame that has dynamic content, you lose the content.  So basically, there is nothing practical in taking that approach.
    I do niot understand what the problem will be with the enterFrame/prevFrame approach. If everything you can do with the mouse is already used (which I doubt) by the first mc, then there is nothing else you can do with this file.  You probably just need to rethink your control scheme.  You should search Google for "AS3 slideshow tutorial", and to lighten up your design, add "XML" in that search.
    >

  • How to move images from Picasa to Lightroom 5 on a mac?

    How to import images from Picasa to Lightroom 5 on a mac?

    Hi, lnmyers,
    I have thousands of pictures stored in Picasa, all of which are stored in my Picasa Web Albums. They are no longer in a directory on my hard-drive, that particular hard-drive having died ages ago. Thank goodness I uploaded them to Picasa's cloud before the hard-drive died. Should that ever darken, I am in trouble. I digress. I downloaded the pictures I wanted from Picasa Web Albums to my new external hard-drive that I set up and attached to my mac. For example:  I had a an album called "California 2013" stored in the Picasa cloud. I downloaded the entire album to a folder on my Seagate external drive that I call Lightroom within which I have a folder called California 2013. It took about twenty minutes to get them all (300+ photos). Then, I pointed LR to the California 2013 folder on the Seagate external drive when I wanted to catalogue the pictures into LR. I did not worry about metadata; I took whatever came with the pictures and didn't worry about it. I added copyright, keywords, and ownership info with LR. 
    I hope that helps.

  • E61i -- HOW TO SAVE IMAGES FROM WEBSITE WHILE BROW...

    ANYBODY KNOWS HOW TO SAVE IMAGES FROM WEBSITE WHILE BROWSING IN E61i ???
    ABDULLAH SHAHID SHEIKH
    IMANGROUP, IMAN ROAD, NOORPUR, ALI BLOCK, MUSLIM TOWN, FAISALABAD, PAKISTAN.
    TEL. 0092418782792-93
    CELL. 00923008651424

    which version should i use ,, i mean suitable for my E61i,,, the opera mini or the opera mobile????
    is opera mini can save the images as well???
    25-Aug-200702:43 PM
    iantaylor27 wrote:
    Hi
    If you use opera mobile, it aloows saving of images to memory card etc
    www.opera.com
    ABDULLAH SHAHID SHEIKH
    IMANGROUP, IMAN ROAD, NOORPUR, ALI BLOCK, MUSLIM TOWN, FAISALABAD, PAKISTAN.
    TEL. 0092418782792-93
    CELL. 00923008651424

  • How to stop Firefox from checking for add-on compatibility every time it opens?

    How to stop Firefox from checking for add-on compatibility every time it opens?

    That can be a problem with the compatibility.ini file in the Firefox profile folder.
    Try to rename (or delete) the compatibility.ini file in the Firefox profile folder to see if that helps.
    You can use this button to go to the currently used Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    You can also check for problems with preferences.
    Delete possible user.js and numbered prefs-##.js files and rename (or delete) the prefs.js file to reset all prefs to the default value including prefs set via user.js and prefs that are no longer supported in the current Firefox release.
    *http://kb.mozillazine.org/Preferences_not_saved
    *http://kb.mozillazine.org/Resetting_preferences

  • Any ideas of how to receive images from a wireless camera (2.4 ghz) to my ipad rather than the handheld DVR supplied?

    Any ideas of how to receive images from a wireless camera (2.4 ghz) to my ipad rather than the handheld DVR supplied?

    some of those often have webserver so one just navigate to it using a browser

  • I can take video made in Photo Booth and use in my Smilebox greetings and I can use photos from iPhoto to use there also.  I have not been able to figure out how to take clips from iMovie for that.

    For anyone who has used "Smilebox" for greeting cards:  I can take video made in Photo Booth and use in my Smilebox greetings and I can use photos from iPhoto to use there also.  I have not been able to figure out how to take clips from iMovie for use with Smilebox.

    For anyone who has used "Smilebox" for greeting cards:  I can take video made in Photo Booth and use in my Smilebox greetings and I can use photos from iPhoto to use there also.  I have not been able to figure out how to take clips from iMovie for use with Smilebox.

  • How to copy images from iPhone folders other than camera roll?

    How to copy images from iphone folders other than camera roll?
    Images in these folders are synced to iPhone from different laptop and I need to download them in my laptop. I am able to download and access only those pics which are present in Camera Roll folder.Remaining pics are in different folder and also appearing in Photo Library from all folders.
    Same problem is with iPod touch as well.

    - Via a computer program like PhoneView or Touch Copy
    - By using an app like Photo Transfer

  • How to transfer images from my iPad air  to my mac?

    How to transfer images from my iPad air  to my mac?
    If I use iphoto software, I can't see the ipad air on the browser...

    You can directly transfer photos and videos via WiFi between the iDevices, PCs, and Macs with an App like Photo Transfer.
    See: https://itunes.apple.com/us/app/photo-transfer-app-easily/id365152940?mt=8
    Or you can upload the photos and videos to the Dropbox service using the Dropbox App on the iDevice, PC, or Mac and download them to the another device using the Dropbox App on that device. By the way, once the videos are on Dropbox you can share them with others.
    See: https://itunes.apple.com/us/app/dropbox/id327630330?mt=8

  • HT4623 how to download bibles from youversion for offline reading

    how to download bibles from youversion for offline reading

    If you install the app properly then all available versions will have been installed for reading offline. If you want audio on any particular version that provides that option then  you have to be online.

  • How to download videos from Firefox for android phone???

    how to download videos from Firefox for android phone???

    Duplicated topic:
    *[https://support.mozilla.org/en-US/questions/982466 /questions/982466]

  • How to control change request creation for particular IBase Component?

    Dear Experts,
    Can anybody suggest , how to control change request creation for particular IBase Component?
    We have implemented ChaRM which is integrated with SAP ECC & SAP BI.
    ChaRM is not integrated with SAP Solution Manager.
    End Users are creating support notifications from -Help Menu- Create Support Notification.
    The IBase Component is not editable once notification is created. This Ibase is copied to change request when the action-create change document is saved.
    Requirement is that, during creation of change document, system should check the IBase component of support notification. If the IBase is related to solution manager system, system should restirct the change request creation.
    Kindly suggest how to achieve this.
    Regards
    Vivek

    Hello Vivek,
    The way to do what you want is to create a schedule condition for action Create Change Document. The action has to be displayed only when the IBase/Component value differs from SolMan. To add the IBase/Component value to the container so that it can be evaluated during runtime, you will have to create a subtype of BUS2000116 on which condition can be buit.
    See the following posts for more information :
    Hope this helps,
    BR.
    Stéphane.

  • How to create an External Alias for a Portal URL ?

    Hi Gurus,
    Can anybody tell me how to create an external alias for a portal link(URL). Actually, my problem is i want to send this Portal URL(link) thru' a SendMail step to the user so that when he clicks on it, it will take him to his UWL(Ofcourse after signing-in). As this URL length is > 80 char(101 char), i am not getting the full lenght URL in my Outlook mail. THough we are on ECC 6.0,Basis Rel 7.0, as per the OSS note 559234, we should have this length extended to 132 bytes. But, for some reason, its not happening. And,in the same OSS note, it was mentioned that we can use external aliases to achieve this(shortening the URL length).
    Can anybody tell me how to achieve this, either thru' increasing the URL length or thru' ext. aliases.
    Please reply asap.
    Thanks in advance
    venu

    Not an issue as of now. I'll open up again if needed

Maybe you are looking for