JSF Properties File for Images

I got a .war file where all my jsps are, including my JSF properties file that include a path(outside my .war file), for example:
urlWatermark=file:///C:/SA/images/watermark.jpg
Then in my JSP page:
<f:loadBundle basename="jsfks.bundle.image" var="msgImage" />
<c:set var="pageWater" scope="session">               <h:outputText value="#{msgImage.urlWatermark}" />
</c:set>
<img src="${pageWater}" />
but it dont want to display my image, as when i view the source in the browser, it shows:
<img src="file:///C:/wesbankSA/images/watermark.jpg" />
how can i change this so that the image will display.
thanks

so I have to write 2000 lines of code just to reference images, outside my war
file, using a JSP props file?No. Re-count the lines of the last given ImageServlet example (you may skip comments) and read the given examples how to use it.
Isnt there a simpler way of doinig thisYes, copypaste the ImageServlet code, change it where needed (at least the base path, the rest can be kept default), define this servlet in your web.xml, change your <img> or <h:graphicImage> tags to make use of it and run it.

Similar Messages

  • Where can i find .properties file for jco connection?

    For jco connection to SAP, we need .properties file. Is this file already contained in Exchange Profile or somewhere??
    If yes, where can i find .properties file for jco connection or what is the path to this file?
    OR, do we have to create manually??
    Any help is appreciated.
    Thanks.
    Karma

    Hi Karma,
    Please take a look at these..
    Where to set up the JCO connection?
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/42e13d82fcfb34e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_webas620/helpdata/en/bc/42e13d82fcfb34e10000000a114084/content.htm
    cheers,
    Prashanth

  • [svn:fx-trunk] 8056: More updated project properties files for the sparkTest project.

    Revision: 8056
    Author:   [email protected]
    Date:     2009-06-22 12:13:58 -0700 (Mon, 22 Jun 2009)
    Log Message:
    More updated project properties files for the sparkTest project.
    Modified Paths:
        flex/sdk/trunk/development/eclipse/flex/sparkTest/.actionScriptProperties
        flex/sdk/trunk/development/eclipse/flex/sparkTest/.project

    Thats good news.

  • Alternatives to loading .properties files for every request

    I am just starting for a company, and they loading a bunch of .properties files for every request. I've told them that according to JEE specs, using the file system like that is a violation, as it's not scalable. I've suggested the following alternatives:
    1. Load a file once, in a static initializer, or something to that effect. Re-start the app if a change needs to be made in properties.
    +: few changes
    -: requires a new war/ear to make a change
    2. Put properties that are truly variable in a database record.
    -: requires DB schema change.
    3. For instance, i've though about using something like jconsole to change an mbean property, and then web apps using that property.
    4. Define a single web app that exposes an EJB/JMS/RMI object which serves properties to other web apps. If a change is needed, only 1 web app needs to be re-started, although it would still have to be re-packaged. Perhaps this app could load this stuff from the DB.
    5. Have a properties service, and expose it as an RMI object. If a change needs to be made on the fly, use rmi to make the updates.
    I'm leaning towards a combination of 1, 5, and possibly 4.
    I would like to know what other alternatives might be available.
    Thanks.

    I am just starting for a company, and they loading a
    bunch of .properties files for every request. I've
    told them that according to JEE specs, using the file
    system like that is a violation, as it's not
    scalable. well, it's just boneheaded that's all
    I've suggested the following alternatives:
    1. Load a file once, in a static initializer, or
    something to that effect. Re-start the app if a
    change needs to be made in properties.that's what most people do
    2. Put properties that are truly variable in a
    database record.well, databases don't normally hold config info, but you can do what you want
    -: requires DB schema change.
    3. For instance, i've though about using something
    like jconsole to change an mbean property, and then
    web apps using that property.
    4. Define a single web app that exposes an
    EJB/JMS/RMI object which serves properties to other
    web apps. If a change is needed, only 1 web app needs
    to be re-started, although it would still have to be
    re-packaged. Perhaps this app could load this stuff
    from the DB.doing EJB or RMI for getting properties sounds like overkill in the extreme to me

  • How can i write properties file for Hindi font

    Hi All,
    i'm using jdev 11.1.1.5.0
    in my use case i have worked on internationalization where i want to use hindi font
    like this link -
    Majid Hussain: Internationalization of ADF 11.1.1.3 Applications
    as in above post majid used german language and write properties file for german language(which is using english character).
    but my problem is that i want to use hindi language
    so how can i write propery file which support hindi font.
    Manish

    Hi Manish,
    We also had same requirement where we need to show indian local language(Hindi ,Bengali and many more ).
    We had implemented following approach and perhaps it will helpful for you.
    1-First we changed the encoding value in jdeveloper.
       go to jdeveloper --> tools --->preference-->encoding , select to UTF8
    2-We used to get the properties and it's translated value from business and then we were manually put these pair into related resource bundle.
    And using this we were able to implemented multilanguage support.
    Thanks
    Prateek

  • [svn:bz-trunk] 5125: Update excludes.properties file for BlazeDS/ trunk to exclude tests due to bugs BLZ-354, BLZ-355, and BLZ-356.

    Revision: 5125
    Author: [email protected]
    Date: 2009-03-02 05:55:42 -0800 (Mon, 02 Mar 2009)
    Log Message:
    Update excludes.properties file for BlazeDS/trunk to exclude tests due to bugs BLZ-354, BLZ-355, and BLZ-356.
    Also exclude JMS tests on WebSphere due to configuration issues on the regression box. This is being tracked by QETOOLS-32 in jira.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-354
    http://bugs.adobe.com/jira/browse/BLZ-355
    http://bugs.adobe.com/jira/browse/BLZ-356
    http://bugs.adobe.com/jira/browse/QETOOLS-32
    Modified Paths:
    blazeds/trunk/qa/features/excludes.properties

  • URGENT!!! can I borrow a valid jserv.properties file for a JSP application ?

    Hi there !
    I'm running Oracle enterprise edition on NT with oracle http server under apache.
    I created a JSP application using jdeveloper
    and deployed it to the web server.
    Now I'm still getting getting nullPointer exceptions after I have modified the jserv.properties file according to the documentation
    Can someone give me a file that is working for her/him under the above described circumstances ?
    Many Thanaks in advance
    Tony
    null

    laredotornado wrote:
    Hi,
    This might not be a JSF question, but I thought I'd start here as I'm building a JSF application. Upon startup of my Weblogic 9.2.2 server, I see these error messages
    log4j:WARN No appenders could be found for logger (org.apache.myfaces.webapp.StartupServletContextListener).
    log4j:WARN Please initialize the log4j system properly.
    One complication, my log4j.properties file is actually called "my.properties" (bizarre company reason). Is there somewhere in my faces-config.xml file or an equivalent where I can indicate what log4j properties file I'd like to use?Your company policy is to use non-standard names so that things must be configured manually? Interesting.
    In the past people created a servlet those sole purpose was to configure log4j in the initialization sequence and then do nothing.

  • JSF properties file

    Using JSF and JSTL, i am trying to use a properties file, to import an xml file.
    PROPERTIES FILE:
    name > messages.properties
    content > url=/home/index.xml
    JSP FILE:
    <f:loadBundle basename="jsfks.bundle.messages" var="msg"/>
    <h:outputText value="#{msg.url}"/>
    <c:import url="#{msg.url}" var="xmlSource" />
    <x:parse xml="${xmlSource}" var="xmlDocument" />
    The outputText works, it does display my URL, but the c:import dont work.
    I want to value that is in my properties file, to be imported i.e
    <c:import url="/home/index.xml" var="xmlSource" />
    how can i do this using the above method?
    Thanks

    Like I said here http://forum.java.sun.com/thread.jspa?threadID=5175073
    Your approach won't work as the value is completely out of the scope.
    Load it manually in the same scope, using java.util.ResourceBundle for example.

  • How to create a properties file for DB connection (BPEL async processes)

    Hi,
    In BPEL asynchronouns Project, I am trying to create the Database connection. Instead of hardcoding the details, I want to put it in the properties file and then import the connection file in order to create a connection.
    I am very new to BPEL and need urgent help. Hoping for a quick reply..
    Thanks

    So, what would be the practical approach for implemeting this. When I use "Import Connections" option, in help I get this:
    "File Name:
    Click Browse to locate a file containing the connection descriptor(s) that you want to import. Select the file and click Open. Connection descriptors are saved to XML files. The recommended file extension is .xml. You can import connections from previous versions of JDeveloper by importing connections from IDEConnnections.properties in the earlier installation. You can import connections from other versions of JDeveloper by importing connections from IDEConnnections.xml. "
    Please suggest.

  • How can load properties file for one time and use in entire application

    Hi folks,
    I dont want to read properties file every time , and want to get property value in any servelet or jsp page.(means i want to read only property file only for once and want to get value in any where ) , how to do this.
    Message was edited by:
    RajeshwarReddyT

    means we have to read file every time Know but i dont
    want to be happen that ??? No you don't . You read the file once. You store it in the hashmap. Then you hand that hashmap to whatever class needing the data.
    getProperties() returns the hashmap, doesn't read the file.
    Maybe I should have called the method getMap or something.
    Message was edited by:
    karma-9

  • Using CS4 - in the past PS set up a file for images saved for "web

    I am using PS and Dreamweaver CS4. In the past, when saving an image for "web and devices", PS set up a separate file for saved images which then showed up in Dreamweaver. I have somehow lost PS in Dreamweaver. Instead, Photoshop puts the saved image back into the original file.PS is grayed out in Dreamweaver so cannot connect back to any images from Dreamweaver either. How do I get back to preferences I originally set up for saving images for web and devices. I have Windows XP Professional.

    Save For Web is an Export, not a Save. That distinction means it saves out a copy, leaving the original as it was. The export destination is set in the SFW dialog, and is sticky. The next time it exports to the same location unless you change it again.
    So you just need to point Dreamweaver to where your SFW exports go. That's all.
    (Disclaimer - I don't use DW, but I assume it works like any other software).

  • Properties file for a servlet at netbeans

    I want to make a servlet to use a properties file. The file name is passed as a initialization parameter. I�m developing with netbeans, where should I put this properties file?
    And if I want to deploy this to an independent tomcat server?
    Thanks in advance,

    It's an arbitrary decision by you where you want to put it. If it contains sensitive data, you should consider putting it outside the web root. (Note that if you do that, JAR/WAR/EAR/ZIP, etc. your application, the properties file won't be implicitly included.)
    This is where the suggestion for JNDI could be useful, because as far as the app is concerned, it doesn't matter where the properties file is physically located.

  • Sample md.properties files for bulk loader

    Hi,
    I wanted to use bulk loader to load the content into BEA repository.
    Can some one paste the sample dir.md.properties file and content properties file
    please?
    greatly appreciate your help!!
    Regards,
    Subba

    Alex,
    Thanks for your help!!
    Regards,
    Subba
    "alex toussaint" <[email protected]> wrote:
    >
    >
    >
    >
    Hi Subba,
    You can find an example of the "dir.md.properties" file at:
    <install_dir>\weblogic81\portal\db\data\sample\cm_data\Ads
    The content for this "dir.md.properties" is just:
    nodeType=ad
    Regards,
    --alex
    "subba" <[email protected]> wrote:
    Hi,
    I wanted to use bulk loader to load the content into BEA repository.
    Can some one paste the sample dir.md.properties file and content properties
    file
    please?
    greatly appreciate your help!!
    Regards,
    Subba

  • How big is too big for .properties file for a ResourceBundle?

    The subject says it all. We are using ResourceBundles to manage the dictionary of English/French literals for our web enabling project. Our .properties file is currently 675 key/value pairs. How big can .properties files grow before they are too big?
    Thanks,
    Don Booker - Programming Team Leader
    Common Departmental Financial System
    Public Works & Government Services Canada

    The resource gets loaded into memory, so there's a memory cost that increases with the number of properties. (There's also a time cost when it loads, but that's only once.) And finding one of the properties requires a search, so there's a processing cost involved. But it's based on a Hashtable, so it isn't a major cost even if the number of properties gets very large.
    So there's your constraints. The question is, though, what is your alternative when the resource does get too big? A database? That reduces the memory cost but increases the processing cost. I would guess you could let your properties file grow a lot before you were forced to go to a database, but actual testing would help.

  • What values to place in signer.properties file for Webutil configuration

    Hi. I'm not sure of what value to place in JDK_HOME in signer.properties for Webutil configuration. My current settings are:
    JDK_HOME=D:\ora9i\jdk
    JINIT_HOME=C:\Archivos de programa\Oracle\JInitiator 1.3.1.13
    #Certificate settings:
    # These are used to generate the initial signing certificate
    # Change them to suite your organisation
    DN_CN=Product Management
    DN_OU=Development Tools
    DN_O=Oracle
    DN_C=US
    JAR_KEY=webutil
    JAR_KEY_PASSWORD=webutil
    Is JDK_HOME the jdk for oracle or SDK for windows machine(how to find?)?. Also how do i repeat the process of makecert and signing of webutil.jar and jacob.jar?. If i try to repeat this process I get the following warnings or error?
    Makecert:
    keytool error: java.lang.Exception: Key pair not generated, alias <webutil> already exists
    Certificate created...

    JDK_HOME is just the location of a Java distribution with Keytool in it - have a look at the signer batch file and you'll see how each variable is used. Also if you run keytool from the command prompt it will show you the commands to delete and existing Key or list the keys that are currently stored.

Maybe you are looking for