Using  #{resource[...]} as image source

Hi all. I am got a problem when I try to using #{resource[...]} expression at ADF pages - looks it's not resolved correctly.
I have next folders tree in my project:
JDeveloper
|-mywork
|--project_dir
|----Model
|----ViewController
|---- src
|--------META-INF
|----------resources
|------------ images
|----------------- image1.png
But when I add af:image component at my page and try to refer to image1.png as source = *"#{resource['images:image1.png']}"* the image is not visible; and at Property Inspector Source field value is outlined by light-brown (not red) color. What am I doing wrong ? And, how to resolve such kind of EL expression to absolute path ?

I don`t think this expression *#{resource['images:image1.png']}* evaluates to the path you are looking for.
If you have a bundle file in which you have the mapping (like SOURCE_IMG = /resources/images/image1.png) defined then try using source = "#{<bundleFileRefVarInPage>.SOURCE_IMG}"
Hope it helps.
Thanks,
TK

Similar Messages

  • Use jsp as image source

    In php I have an option to say
    <img src="gen_image.php">Here in the gen_image.php I set the content type as image/jpeg and use the gd library to generate a dynamic image.
    This is used in various registration validations for dynamic image generation.
    My question is can I do this using a jsp or a servlet. Wud help if you could submit the source code.

    You do the same thing in the JSP page as you do in the PHP page, just with Java instead of PHP. There's no difference. Set the content type, send image data. You can generate an image using the java.awt.image.BufferedImage class, drawing on it's Graphics object, and exporting a JPEG or PNG file with the javax.imageio.ImageIO class
    There is 1 caveat for JSP pages, which is you can't have newlines in the page before you send image data, which means you can't do this:
    <%@ page language="Java" contentType="image/jpeg" %>
    <%@ import="java.net.*;" %>
    <%@ import="java.util.*;" %>
    <%
    // code to get image data.
    %>but instead:
    <%@ page language="Java" contentType="image/jpeg" %><%@ import="java.net.*;" %><%@ import="java.util.*;" %><%
    // code to get image data.
    %>Cuz the newlines are added between those <%%> blocks, so you need to avoid that. Which is generally why it's better to use servlets for that.

  • Use different "fx-border-image-source" for first tab and remaining tabs

    Hi,
    I'm using something like this
    .tab {
    -fx-padding: 0px 5px -2px 5px;
    -fx-background-insets: 0 -20 0 0;
    -fx-background-color: transparent;
    -fx-text-fill: #c4d8de;
    -fx-border-image-source: url("images/tab5.png");
    -fx-border-image-slice: 20 20 20 20 fill;
    -fx-border-image-width: 20 20 20 20;
    -fx-border-image-repeat: stretch;
    -fx-font-size: 22px;
    .tab:selected {
    -fx-border-image-source: url("images/tab-selected5.png");
    -fx-text-fill: #333333;
         -fx-background-color: red;*/
    to customize the tab appearance of a TabPane.
    That worked well. But I need to use a different set of images for just the first tab. Does anyone know a way to accomplish that?
    Thanks.

    How can I "fix up" the first tab of tab panes that are created after I "fixed up" the first tab of the initial tab pane?
    My app allows user to create new tab panes at any moment during program execution.Not easy to answer this one.
    The best answer would be to use structural pseudoclasses, but (as David points out), they are not yet implemented.
    The trick here is how to identify the first tab of each tab pane so that it can be styled separately from the other panes.
    Doing the styling without a dynamic lookup is preferrable to using a dynamic lookup (i.e. when the first tab is created give it a specific style, e.g. tab0).
    This is how the charts work, where they set style classes based on series of data, e.g. series0, series1 - this allows you to independently style each series of data.
    However the chart stuff has all of that built into the implementation, whereas the tabs don't. To achieve that you would likely need to go into the TabSkin code (http://openjdk.java.net/projects/openjfx/) find out where and how it generates the Tab nodes and write a custom tab skin or extension of the existing one which assigns a numeric style class to each new tab in a pane (e.g tab0, tab1, etc). In other words, not particularly easy if you are unfamilar with the tab skin implementation. You could log a javafx jira feature request to have those style classes set on tabs - file it here => http://javafx-jira.kenai.com.
    In the meantime a simple alternative is to use the dynamic lookup method in my previous post and a hack such that whenever you add a new tab pane to the scene you do something like the following:
    new Timeline(
      new KeyFrame(
        Duration.millis(50),
        new EventHandler<ActionEvent>() {
          @Override public void handle(ActionEvent arg0) {
            Node tab = newTabPane.lookup(".tab");
            if (tab != null) tab.getStyleClass().add("first-tab");
    ).play();The reason for the Timeline is that I don't really know at what stage the css layout pass is executed. I know that when you initially show the stage and then do a lookup, the css pass seems to have already been done and the lookup will work. But for something that is dynamically added or modified after the scene is displayed - I have no idea when the css layout pass occurs, other than it's some time in the future and not at the time that you add the tabPane to the scene. So, the Timeline introduces a short delay to (hopefully) give the css layout pass time to execute and allow the lookup to work (not return null). Not the best or most efficient solution, but should work for you.

  • Using Ternary operators to set image source

    Hi,
    I'm using JDeveloper llg, and have an ADF table, in one of the columns im trying to have just an image displayed.
    Using:
              <af:column width="16">
                         <img src="icons/bullet_green.png"
                                 height="16"
                                 width="16"/>
                </af:column>this works fine and the correct image is displayed. Is it possible to use an EL expression to determine which image should be displayed using a ternary operator? i have tried the following:
              <af:column width="16">
                            <img src="#{row.ServiceState == '100' ? 'icons/bullet_green.png' : 'icons/bullet_red.png'}"
                                 height="16"
                                 width="16"/>
              </af:column>however no image at all is now displayed when the application is run. Does anybody now how to fix this?
    Thanks in advance...

    One solution is to use an af:image instead of the normal img tag. Then put two af:image tags inside you af:column and set the visible attribute to your EL like:
    <af:column width="16">
    <af:image shortDesc="klassiert" source="icons/bullet_green.png" visible="#{row.ServiceState == '100'}" inlineStyle=" height:16px; width:16px;" />
    <af:image shortDesc="klassiert" source="icons/bullet_red.png" visible="#{row.ServiceState != '100'}" inlineStyle=" height:16px; width:16px;" />
    </af:column>Timo

  • Problems distributing application using Imaging Source USBCamera and Labview 2010 - Imaging Source sdk required?!

    Hi
    I've been having trouble with the Imaging Source camera we own when trying to build applications.
    Everything works perfectly on the dev PC with appropriate sdk installed.
    When I  move to building the application (no errors) and deploying it to another PC the activeX control used to interface with the camera does not appear.
    Instead I get 'Control could not be loaded' in red text where the control should be.
    As far as I can see the activeX component itself is correctly installed on the PC.
    If I install the IC Imaging Control sdk the application begins working correctly.
    If I uninstall the sdk from the dev PC I get the message about needing a license if I attempt to add the ActiveX control afresh to the program (via the activeX container)
    I've posted on the Imaging Source forums and they suggested I try here.
    ORIGINAL POST ON IMAGING SOURCE FORUMS:
    I'm using a DMK 41BU02 with labview 2010 + IC Labview extension.
    The activeX interface for the camera works fine until I deploy it to a PC that does not have the IC Control software installed.
    All I see is a 'Control could not be loaded' message where the activeX box should be.
    I've installed VB6 redistributable to the client PC so I know the activeX workings should be present on the PC.
    If I install IC Control onto the PC the program starts working correctly!
    Has anyone compiled software with Labview 2010 successfully?
    Is there a trick when creating the application/installer spec?
    Thanks in advance
    Dan Acres
    REPLY
    This is correct. I suppose, the LabVIEW setup creating system does not automatically add the used DLL in the "user.lib" directory of your LabVIEW installation path. What does the LabVIEW support say about this, especially in relation to ActiveX controls, that use the Microsoft licensing mechanism?
    The dll he mentions is packaged into the support folder in the application spec.
    I have also manually copied the dll into the location referenced by the software (Labview 2010\user.lib\xxxx.dll).
    This made no difference.
    I've got no experience building these kind of thing into applications so I cannot tell if it is caused by a mistake I've made or Labview or if the Imaging Source softwares have done something wrong.
    Many thanks in Advance
    Dan Acres

    Dan,
    I think I might have a solution for you and others who need to include the imaging source active-x control in a deployed executable program.
    I solved this problem by creating a project that included the dlls and .ocx files required for the Active X Control (these files are in a folder is created once the IC Software is installed C:\Program Files (x86)\Common Files\IC Imaging Control 3.2) and an executable that registers the Active X Control after the main program is installed.
    The simple vi that registered the .ocx control for me upon install of my LabVIEW executable was called RegisterActiveXCtrl.vi. All it does is calls the regsvr32 with the path of my .ocx file.
    I bundled my main program PCDemo_Stratom.exe and RegICActiveX.exe into an installer and set the option to run RegICActiveX.exe at the end of installation.
    The installer must be installed with administrator rights to get the RegICActiveX.exe regsvr32 call to work.
    Hope this helps you/others in the future!
    Dan A

  • Create a trigger which set Image source with binding to a dependency property.

    I'm trying to create a specified button which switch images every time it pressed, without using the Click CBFunction, so I'm using toggle button and triggers (checked unchecked) and I want this button to
    supply DP of string so who ever uses is button will only have to specify the images paths and a click CBFuntion to
    perform what ever he wishes.
    I managed to create the mechanism for switching images with triggers(but the triggers image paths are hard coded and not using DP) and to enable setting a click CBFunction. When I switch the hard coded image path with a DP which return a string with
    the path the program crush, an exception is thrown.
    U.C xaml:
    <UserControl x:Class="ButtonChangeImage.UserControl1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    mc:Ignorable="d">
    <Grid>
    <ToggleButton x:Name="btnCI">
    <ToggleButton.Content >
    <Image Name="img" Source="C:\Users\AmitL\Desktop\joecocker.jpg"/>
    </ToggleButton.Content>
    <ToggleButton.Triggers>
    <EventTrigger RoutedEvent="ToggleButton.Checked">
    <EventTrigger.Actions>
    <BeginStoryboard>
    <Storyboard>
    <ObjectAnimationUsingKeyFrames Storyboard.Target="{x:Reference img}" Storyboard.TargetProperty="Source">
    <DiscreteObjectKeyFrame KeyTime="0:0:0">
    <DiscreteObjectKeyFrame.Value>
    <BitmapImage UriSource="{Binding FirstImage}"/>
    <!--<BitmapImage UriSource="C:\Users\AmitL\Desktop\james-brown-010.jpg"/>--><!--if I switch to this line it works fine!-->
    </DiscreteObjectKeyFrame.Value>
    </DiscreteObjectKeyFrame>
    </ObjectAnimationUsingKeyFrames>
    </Storyboard>
    </BeginStoryboard>
    </EventTrigger.Actions>
    </EventTrigger>
    <EventTrigger RoutedEvent="ToggleButton.Unchecked">
    <EventTrigger.Actions>
    <BeginStoryboard>
    <Storyboard>
    <ObjectAnimationUsingKeyFrames Storyboard.Target="{x:Reference img}" Storyboard.TargetProperty="Source">
    <DiscreteObjectKeyFrame KeyTime="0:0:0">
    <DiscreteObjectKeyFrame.Value>
    <BitmapImage UriSource="C:\Users\AmitL\Desktop\joecocker.jpg"/>
    </DiscreteObjectKeyFrame.Value>
    </DiscreteObjectKeyFrame>
    </ObjectAnimationUsingKeyFrames>
    </Storyboard>
    </BeginStoryboard>
    </EventTrigger.Actions>
    </EventTrigger>
    </ToggleButton.Triggers>
    </ToggleButton>
    </Grid>
    </UserControl>
    U.C cs:
    public partial class UserControl1 : UserControl
    public static readonly DependencyProperty FirstImageDP = DependencyProperty.Register("FirstImage", typeof(string), typeof(UserControl1), new PropertyMetadata(@"C:\Users\AmitL\Desktop\james-brown-010.jpg", new PropertyChangedCallback(FirstImageSource)));
    private string m_strFirstImage = string.Empty;
    private BitmapImage m_oBMImage = null;
    private static void FirstImageSource(DependencyObject obj, DependencyPropertyChangedEventArgs args)
    UserControl1 l_UCBtnSwitchImage = (UserControl1)obj;
    l_UCBtnSwitchImage.m_strFirstImage = (string)args.NewValue;
    l_UCBtnSwitchImage.m_oBMImage = new BitmapImage(new Uri(l_UCBtnSwitchImage.m_strFirstImage, UriKind.Absolute));
    public string FirstImage
    get
    string l_strTemp = (string)GetValue(FirstImageDP);
    return l_strTemp;
    set
    SetValue(FirstImageDP, value);
    public event RoutedEventHandler Click
    add { btnCI.Click += value; }
    remove { btnCI.Click -= value; }
    public UserControl1()
    InitializeComponent();
    window xaml:
    <Window x:Class="ButtonChangeImage.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:m="clr-namespace:ButtonChangeImage"
    Title="MainWindow" Height="350" Width="525">
    <Grid>
    <m:UserControl1 Click="ToggleButton_Checked" FirstImage="C:\Users\AmitL\Desktop\james-brown-010.jpg"></m:UserControl1>
    </Grid>
    </Window>
    The exception:
    A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll
    Additional information: 'Provide value on 'System.Windows.StaticResourceExtension' threw an exception.' Line number '20' and line position '46'.
    I would love to know why when I switch the hard coded value with DP it suddenly throw exception, how to fix it or if there is other way to achieve U.C with those demands.
    Thanks.

    Hey Magnus,
    Unfortunately I get the same result, the button is switching between the (Joe Cocker) image to blue button(normal pressed button look) how come the
    (Joe Cocker) image return I didn't set a trigger for unchecked so what make it change the content
    or the image source back to that image?
    And I can't debug (by the way what's happening there how come it doesn't stop in all those code lines?).
    I didn't make any changes here is all the code:
    U.C cs:
    namespace ButtonChangeImage
    public class ImageConverter : IValueConverter
    public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    string s = value as string;
    var source = new System.Windows.Media.Imaging.BitmapImage();
    source.BeginInit();
    source.UriSource = new Uri(s, UriKind.RelativeOrAbsolute);
    source.EndInit();
    return source;
    public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    throw new NotImplementedException();
    public partial class UserControl1 : UserControl
    public static readonly DependencyProperty FirstImageDP = DependencyProperty.Register("FirstImage", typeof(string), typeof(UserControl1), new PropertyMetadata(@"C:\Users\AmitL\Desktop\james-brown-010.jpg", new PropertyChangedCallback(FirstImageSource)));
    private string m_strFirstImage = string.Empty;
    private BitmapImage m_oBMImage = null;
    private static void FirstImageSource(DependencyObject obj, DependencyPropertyChangedEventArgs args)
    UserControl1 l_UCBtnSwitchImage = (UserControl1)obj;
    l_UCBtnSwitchImage.m_strFirstImage = (string)args.NewValue;
    l_UCBtnSwitchImage.m_oBMImage = new BitmapImage(new Uri(l_UCBtnSwitchImage.m_strFirstImage, UriKind.Absolute));
    public string FirstImage
    get
    string l_strTemp = (string)GetValue(FirstImageDP);
    return l_strTemp;
    set
    SetValue(FirstImageDP, value);
    public event RoutedEventHandler Click
    add { btnCI.Click += value; }
    remove { btnCI.Click -= value; }
    public UserControl1()
    InitializeComponent();
    U.C xaml:
    <UserControl x:Class="ButtonChangeImage.UserControl1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    mc:Ignorable="d">
    <Grid>
    <ToggleButton x:Name="btnCI" xmlns:local="clr-namespace:ButtonChangeImage">
    <ToggleButton.Resources>
    <local:ImageConverter x:Key="conv" />
    </ToggleButton.Resources>
    <ToggleButton.Style>
    <Style TargetType="ToggleButton">
    <Setter Property="Content">
    <Setter.Value>
    <Image Name="img" Source="C:\Users\AmitL\Desktop\joecocker.jpg"/>
    </Setter.Value>
    </Setter>
    <Style.Triggers>
    <Trigger Property="IsChecked" Value="True">
    <Setter Property="Content">
    <Setter.Value>
    <Image Source="{Binding Path=FirstImage, Converter={StaticResource conv}}"/>
    </Setter.Value>
    </Setter>
    </Trigger>
    </Style.Triggers>
    </Style>
    </ToggleButton.Style>
    </ToggleButton>
    </Grid>
    </UserControl>
    Main Window cs:
    namespace ButtonChangeImage
    public partial class MainWindow : Window
    public MainWindow()
    InitializeComponent();
    private void ToggleButton_Checked(object sender, RoutedEventArgs e)
    MessageBox.Show("f");
    Main Window xaml:
    <Window x:Class="ButtonChangeImage.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:m="clr-namespace:ButtonChangeImage"
    Title="MainWindow" Height="350" Width="525">
    <Grid>
    <m:UserControl1 Click="ToggleButton_Checked" FirstImage="C:\Users\AmitL\Desktop\james-brown-010.jpg"></m:UserControl1>
    </Grid>
    </Window>
    Thanks,
    Amit.

  • Which approach to use for resizing image

    There are two ways of resizing images as I know:
    1. image.getScaledInstance(width,height,hint);
    Using hint like Image.SCALE_AREA_AVERAGING gives somehwat satisfactory resizing.
    2. static BufferedImage resize(GraphicsConfiguration gc, BufferedImage source, int w, int h, Object hintValue) {
    BufferedImage result = gc.createCompatibleImage(w, h, source.getTransparency());
    Graphics2D g2 = result.createGraphics();
    g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, hintValue);
    double sx = (double) w / source.getWidth(), sy = (double) h / source.getHeight();
    g2.drawRenderedImage(source, AffineTransform.getScaleInstance(sx, sy));
    g2.dispose();
    return result;
    where the hint passed is RenderingHints.VALUE_INTERPOLATION_BILINEAR ;
    Now which of the two method method should I use-using image.getScaledInstance() or using AffineTranform ? opr is there any other way which is faster but provides good result?
    i am creating an image editor, so the GUI dialog will have oprtion to choose the algorithm. I want the method which provides better result yet faster.
    Tanveer

    http://forum.java.sun.com/thread.jsp?forum=20&thread=522483

  • Downloading images used to go automatically to the last folder used to save images, even when reopening Firefox. In just the past few days, possibly coinciding wih the most recent updates, the folder defaults to the 'Downloads' folder. This is most annoyi

    Downloading images used to go automatically to the last folder used to save images, even when reopening Firefox. In just the past few days, possibly coinciding wih the most recent updates, the folder defaults to the 'Downloads' folder. This is most annoying. What happened? Internet Explorer 8.0 did the same thing. This was one of the reasons why I started using Firefox to download all images. I went into Tools>Options and it only lets me set another folder. I dont want to set a specific folder I want it to always go to the last folder used. So what gives?
    == This happened ==
    Every time Firefox opened
    == possibly when the most recent updates were installed, a few days ago

    Thanks jscher 2000. I guess I didn't make it clear. "It restarts with all the addons activated, and resumes with the tabs that were open before closing it." IE, it's running fine now with all the extensions activated. Everything is OK now.
    So something in the Firefox code was causing the bad behavior. It's not essential that I find out what the problem was - I'm just curious. And if anybody else has this same problem, it might be nice to have it corrected at the source.

  • Do I need to use a boot image? 6509 / Sup2T Quad / VSS

    I'm curious about boot loader images and if or why I should use one.
    I've got a 6509 VSS setup running right now with no bootloader variable and no boot image.
    SHEC-VSS#sh boot
    BOOT variable =
    CONFIG_FILE variable =
    BOOTLDR variable =
    Configuration register is 0x2102
    Standby BOOT variable =
    Standby CONFIG_FILE variable =
    Standby BOOTLDR variable =
    Standby Configuration register is 0x2102
    SWITCH-VSS#sh ver
    Cisco IOS Software, s2t54 Software (s2t54-ADVIPSERVICESK9-M), Version 15.1(2)SY2, RELEASE SOFTWARE (fc3)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2014 by Cisco Systems, Inc.
    Compiled Wed 26-Feb-14 16:03 by prod_rel_team
    ROM: System Bootstrap, Version 12.2(50r)SYS3, RELEASE SOFTWARE (fc1)
     SHEC-VSS uptime is 16 weeks, 3 days, 21 hours, 10 minutes
    Uptime for this control processor is 16 weeks, 3 days, 21 hours, 10 minutes
    System returned to ROM by power on
    System restarted at 13:56:56 CDT Fri May 16 2014
    System image file is "bootdisk:s2t54-advipservicesk9-mz.SPA.151-2.SY2.bin"
    Last reload reason: power-on
    I'm about to set up a nearly identical VSS pair for another facility.
    I just downloaded the latest SY3 version of IOS for the new pair, and there is a boot image available:
    s2t54-boot-mz.SPA.151-2.SY3.bin
    I just don't know why I would want or need that.  Can anyone explain? I'm not a newbie by any means, but I just don't know why I'd need it.  Right now, in the bootdisk: volume, I just have my IOS image: s2t54-advipservicesk9-mz.SPA.151-2.SY2.bin         That was all that was in there before, but now that I'm building this new pair, I copied s2t54-advipservicesk9-mz.SPA.151-2.SY3.bin onto the same volume.
    I understand that if I set a boot variable I can tell it to boot from one image or the other, but what does the BOOTLDR variable do for me.  If I were to set the BOOTLDR variable to bootdisk:/s2t54-boot-mz.SPA.151-2.SY3.bin    then what does that do for me?  Right now, if I reboot, (until I added that 2nd image) it will just boot the only image in that directory with no issue. 
    What am I missing? Do I need to upgrade or use this boot image for anything?
    Thanks for any tips you can provide!
    Tim

    Tim,
    In simple terms, the bootldr file is the helper file to load the IOS.
    The BOOTLDR environment variable specifies the  Flash file system and filename that contains the boot loader image  required to load system software.
    The variable defines the primary Cisco  IOS image that will load the final image from another source.
    we need to set the BOOTLDR environment variable to specify  the Flash device and filename of the boot loader image.
    For Old version of IOS, there is a requirement of boot loader image to boot up the IOS image.
    But for the latest version of IOS, no need for boot loader image.
    Below are few things happen when the device boots:-
    1. The router initially boots into ROMMON (this is your bootstrap code, which you can see in the show version command).
    2. Then the router loads into the bootloader code (this is the bootloadr code, which you see in show version). This bootloader code is just an intermediate step between the ROMMON mode and the IOS mode.
    3. The router then boots into the IOS mode from the bootloadr mode.
    So if you do not mention the bootloadr specifically by giving the "boot bootloadr" command, the router will assume the bootloadr to be in bootflash of the device and try to boot it from there. If you mention the "boot bootloadr flash:...." command, then the router will look for the bootloadr in the flash (instead of the bootflash). Thats the only difference.
    However, in both cases, if you have a valid IOS to boot into, then the router will come up without a problem, irrespective of the fact whether bootloadr image is in bootflash or flash.
    HTH
    REgards
    Inayath
    *Plz dont forget to rate if this info is helpfull.

  • How to set image source path in formsweb.cfg file in forms 11g

    Hi,
    I had written HTML code in the formsweb.cfg file in forms 11g. In the below code i am unable to retrive image file(i.e., .gif, .jpeg) from the server or local machine.
    In the below HTML code i set image source in the image tag as below:
    <img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agilis-life-new11_04.GIF"
    Is this correct path to fetch the images from the server or local machine .
    Please help me out how to set path for image in html or is there any alternate process to retrive images.
    Here is the code :
    [INDIVIDUALUAT]
    workingDirectory=D:\Aims10dev\Work
    form=LMstartup.fmx
    userid=rmenu/rmenu@RLIFEQA64
    codebase=/forms/java
    imageBase=codebase
    width=1005
    height=750
    WebUtilArchive=/forms/java/frmwebutil.jar,/forms/webutil/jacob.jar
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    WebUtilDispatchMonitorInterval=5
    WebUtilTrustInternal=true
    WebUtilMaxTransferSize=16384
    baseHTMLjinitiator=webutiljini.htm
    baseHTMLjpi=webutiljpi.htm
    archive_jini=frmall_jinit.jar,life-icons-round.jar,Agilis_Icon.jar,life_Icon.jar,personalize.jar,hyperlink.jar,amazingbutton.jar
    archive=frmall.jar
    separateFrame=False
    lookandfeel=Generic
    EndUserMonitoringURL=True
    usesdi=yes
    #HTMLbeforeForm= <table width="1005" border="0" cellspacing="0" cellpadding="0"><tr><td width="200"><img src="/forms/html/agilis-life-logo.gif" width="200" height="80" /></td><td width="10"><img src="/forms/html/agilis-life-new11_02.gif" width="36" height="80" /></td><td width="805" valign="top" background="/forms/html/agilis-life-new11_03.gif"></td></tr></td></tr></table>
    HTMLbeforeForm=<body topmargin="0" leftmargin="0" > <table width="1005" height="100" border="0" cellspacing="0" cellpadding="0"><tr><td width="200" valign="bottom" ><img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agilis-life-logo.gif" width="200" height="80" /></td><td width="10" valign="bottom" ><img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agilis-life-new11_02.gif" width="36" height="80" /></td><td width="550" valign="bottom" ><img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agilis-life-new11_03.gif" width="550" height="80" /></td><td valign="bottom"><table width="219" height="90" border="0" cellspacing="0" cellpadding="0"><tr><td height="36" valign="bottom" align="center"><img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agile-logo.jpg" height="36"></td></tr><tr><td height="10" valign="bottom"> <div align="right"><span style="font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; text-decoration:none; color:#00000; " >Home | Change Password | Logout</span></div></td></tr><tr><td colspan="3" valign="bottom"><img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agilis-life-new11_04.GIF" width="100%" height="39" /></td></tr></table></td></tr></td></tr></table></body>

    AFAIK, this is not the correct way to set the image location.
    We call the working directory as context, so inside the context root along with WEB-INF, maintain a folder with name img and put all the images in that directory.
    You can use either .\<image_folder> or the optimum way would be (if you are using JSPs) to use getContext() method and traverse accordingly.
    FYI,,, using getContext() will give you context root directory, from there it is as simple as accessing any other folder.
    Hope this answers your question.
    Cheers,
    Jeets.

  • Have to toggle "Relative to" button each time I try to change an image source

    Dreamweaver CS4 running on Windows 7. 
    When changing an existing image on an existing web page in Dreamweaver by double-clicking the existing image on the page to open the Select Image Source panel, I have to toggle the "Relative to" (Site Root / Document) button for each image.
    In other words, say that when using Design view, I want to replace img1.jpg with img3.jpg, and IMG2.jpg with img4.jpg,   The steps I have to take are:
    1. Double click img1.jpg on the page to open the Select Image Source panel.
    2. Select img3.jpg. 
    3. Click the Relative to button at the bottom of the panel and change it from whichever it is on (Site Root, let's say) to the other option (Document).
    4, Then click OK.
    5. Double click img2.jpg on the page...
    6. Select img4.jpg
    7 Select the other option (SIte Root) in the Relative to drop down
    8. Then click OK
    9. Repeat for each image whose source is being changed.  If one is relative to Site Root, the next will have to be relative to Document, then the next again I have to select Site Root, etc.
    If I don't select the other relative to option, the image source path will not change when I click OK.
    Default Link Relative To in site definition is set to Document.
    It's been like this for weeks now and it's starting to get annoying.  Any ideas?

    David, I tried deleting the corrupt cache flie, no difference.  Deleted the config folder, same.  Other than I lost the extensions... and had to reinstall them.
    However, John's answer is correct.  And clicking another image before clicking the one I want is faster than the way I was doing it.
    It makes no difference if they are .png .jpg or .gif images.
    By the way, I was wrong about my DW version.  Turns out it's CS3.  Guess it's time to upgrade... one of thes days!
    Thanks everyone!
    Message was edited by: tarfh, to add sentence about png images.

  • Image.source in ItemRenderer works in Windows but not Mac

    I have a Flex (AIR) application that is giving me problems on
    the Mac. In one of the
    Datagrids, I am using an ItemRenderer with an image control.
    Some code in the
    "set data(value:Object)" function assigns a file path as the
    source of the image
    control as follows.
    imgThumb.source =
    File.documentsDirectory.resolvePath("pdqtemp").nativePath +
    "/" + data.strJPGFileName;
    This works correctly in Windows , but not on the Mac.
    In this case, the path resolves to the following on the Mac.
    /Users/brian/Documents/pdqtemp/artist_01t.jpg
    I have verified that the file is in the right place and when
    using the path in
    the command line console, it correctly addresses that
    directory and file. I
    don't normally develop apps for the Mac so I am sure there is
    something I am
    missing.
    Any ideas?
    Thanks for your help.

    Hi Jed,
    Thanks for responding
    That is the exact path assigned to the Source of the Image
    control. However, it isn't exactly a trace of the Image.Source
    property.
    The code in question is attached
    The alert shows the path I originally posted and shows that
    the fileImgThumb.exists returns False.
    As I mentioned, this works perfectly in Windows. There is
    some code elsewhere in the app that creates the thumbnail. That
    does work on the Mac as the thumbnail image is created and saved
    where expected.
    I am not sure what I might be doing wrong.
    Thanks for your help,
    Sid

  • Message-Driven Bean using @Resource annotation

    I am trying to run a Message-Driven Bean very simple example in https://glassfish.dev.java.net/javaee5/ejb/examples/MDB.html
    I configured MDBQueueConnectionFactory and MDBQueue properly on glassfish admin console.
    I cannot run the example using @Resource annotation. I don't understand why.
    @Resource(mappedName="MDBQueueConnectionFactory")
    private static QueueConnectionFactory queueCF;
    @Resource(mappedName="MDBQueue")
    private static Queue mdbQueue;But I can run this example modifying the source code using InitialContext instance and looking up for JMS Resources.
    InitialContext ctx = new InitialContext();
    QueueConnectionFactory queueCF=(QueueConnectionFactory)ctx.lookup("MDBQueueConnectionFactory");
    QueueConnection queueCon = queueCF.createQueueConnection();
    Queue mdbQueue=(Queue)ctx.lookup("MDB");
    queueSender.send(mdbQueue, msg);
    ...I want to figure out why @Resource annotation do not work well. Any help?
    Thanks in advanced any help.

    Thanks for your reply.
    The error that I get is a simple NullPointerException. Nothing else.
    Like you said, I develop a servlet and I can use @Resource annotation without static reference, and it works.
    public class TestMDB extends HttpServlet {
         private static final long serialVersionUID = 1L;
         @Resource(mappedName="MDBQueueConnectionFactory")
         private QueueConnectionFactory queueCF;
         @Resource(mappedName="MDB")
         private Queue mdbQueue;
         protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              PrintWriter out = response.getWriter();
              out.println("TEST MDB "+queueCF);
              QueueConnection queueCon;
              try {
                   queueCon = queueCF.createQueueConnection();
                   QueueSession queueSession = queueCon.createQueueSession
                   (false, Session.AUTO_ACKNOWLEDGE);
                   QueueSender queueSender = queueSession.createSender(null);
                   TextMessage msg = queueSession.createTextMessage("hello");
                   queueSender.send(mdbQueue, msg);
                   out.println("Sent message to MDB");
                   queueCon.close();
              } catch (JMSException e) {
                   e.printStackTrace();
    }But my question were about using @Resource annotation on a standalone client. I always get NullPointerException.
    public class MDBClient {
        @Resource(mappedName="MDBQueueConnectionFactory")
        private static QueueConnectionFactory queueCF;
        @Resource(mappedName="MDB")
        private static Queue mdbQueue;
        public static void main(String args[]) {
         try {
                QueueConnection queueCon = queueCF.createQueueConnection();
                QueueSession queueSession = queueCon.createQueueSession
                    (false, Session.AUTO_ACKNOWLEDGE);
                QueueSender queueSender = queueSession.createSender(null);
                TextMessage msg = queueSession.createTextMessage("hello");
                queueSender.send(mdbQueue, msg);
                System.out.println("Sent message to MDB");
                queueCon.close();
            } catch(Exception e) {
                e.printStackTrace();
    }

  • Image source in itemrenderer

    imglist = arraycollection which contains names of images
    which are coming from database
    myimg = array of images
    all images are stored in newfolder
    how to use tilelist itemrenderer for images

    Hi Jed,
    Thanks for responding
    That is the exact path assigned to the Source of the Image
    control. However, it isn't exactly a trace of the Image.Source
    property.
    The code in question is attached
    The alert shows the path I originally posted and shows that
    the fileImgThumb.exists returns False.
    As I mentioned, this works perfectly in Windows. There is
    some code elsewhere in the app that creates the thumbnail. That
    does work on the Mac as the thumbnail image is created and saved
    where expected.
    I am not sure what I might be doing wrong.
    Thanks for your help,
    Sid

  • Using a downloaded image as the icon style for a Button

    Hello
    I have a problem and after a lot of investigation I have reached to no conclusion.
    When setting the icon to a Button, a Class of an image is needed. This can be done very simply by embeding an image. But what I would like to do is use an image known only at runtime.
    More exactly I can not download an image from an external source, obtain it bitmapData or something else, convert it and assign it as the icon style for a Button.
    So my problem is that for the Flex components that need an image, a Class needs to be assigned, and I can not use an external image to download it, to convert it in some way and assign it.
    Does anybody have any sugestion? Is it possible?
    My purpose is to make some utility that just downloads the images and after the downloading has been completed, to notify the "client" it should take the "created Class" to use it as a style.
    Thank you in advance for your time,
    Claude Bur.

    A quick google search turned up this solution:
    http://blog.benstucki.net/?p=42
    - Jason

Maybe you are looking for

  • My Windows 7 met some virus!!!!

    Hello, I am Zhaoguang Chang. At Canadian Boxing day in 2011, I bought Acer laptop. The operation syatem is windows 7. I like it very much. But recently my computer met some problems with virus. The internet explorer run very slowly. Now it can not ru

  • Sql query to find the scheduled date

    I schedule a job for last Thursday of every month. Based on my current date and time I need the date of my next scheduled run of the job... (i.e) If today is 28-march-2012 (Wednesday) my query should return 3/29/12(which is the last thursday of the m

  • CIN Detials tab in Vendor Master

    Hi, We require the CIN tab to maintain the PAN, GST and VAT no. in the vendor master data to get the same in the withholding tax form no.16A. How do I get the CIN Details tab in the vendor master? Thanks & Regards Ramki

  • ALTER DATABASE  RECOVER MANAGE STANDBY DATABASE

    During the creation of Logical Standby database (NOAA2), after issuing the statement: "ALTER DATABASE RECOVER MANAGE STANDBY DATABASE" the following error appears: FAL[server, ARC1]: Complete FAL noexpedite archive (thread 1 sequence 46 destination N

  • Java api to start/stop J2EE apps

    Hi Does anyone knows if weblogic 8.1 provides set of apis to start and stop J2EE applications programmatically? I know weblogic deployer provides the means to start and stop the J2EE applications through scripts. What I want to know if the apis for t