Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8417029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:55:51+00:00 2026-06-10T01:55:51+00:00

I’ve some image file in my Local Network and I want to display them

  • 0

I’ve some image file in my Local Network and I want to display them in the DataTable in JSF. I’m using JSF2.0 and Tomahawk 1.1.13. Below is the JSF code.

    <t:dataTable newspaperColumns="3" value="#{startupBean.colorList}"     newspaperOrientation="horizontal" var="colorBO">

    <f:facet name="spacer">
   <f:verbatim></f:verbatim>
   </f:facet>
   <h:column>
    <h:graphicImage id="colors" alt="jsf-sun" url="#{colorBO.color_url}"> 
    </h:graphicImage>
    </h:column>
    </t:dataTable>

I’m giving the path of the file as “\\root\sub\sub\xxx.jpg” in my backing bean. But when the JSF page renders, it displays a default icon. When I right click on the icon and check the properties, the below is what I get.

http://localhost:8080/projname//root/sub/sub/xxx.jpg

I tries using both backslash and forward slash in the path name. No change in the output though. I dont’ know how the http part gets into the file path. I’m missing something for sure.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T01:55:53+00:00Added an answer on June 10, 2026 at 1:55 am

    You’re making a conceptual mistake here. It’s the webbrowser who has to download the image separately by a valid and reachable URL once it encounters a <img> element, it’s not the webserver who has to somehow magically embed the image from the local disk file system within the HTML page which is returned to the webbrowser.

    You need to make the image available by a valid and reachable URL, so that the webbrowser can download it. A local disk file system path is surely not a valid and reachable URL. Even more, it would be a huge security hole if a server machine’s local disk file system contents was automagically fully exposed into the world wide web.

    One of the simplest ways of solving this problem is just placing the image in the public webcontent (there where your JSF files also are), so that it’s available in the web.

    Another way is to configure the server to publish the folder into the web so that it’s available by a specific URL as well. It’s unclear which server you’re using, so here’s just a Tomcat example:

    <Context docBase="/root/sub/sub" path="/images" />
    

    This way the image is available by http://localhost:8080/images/xxx.jpg and then this <h:graphicImage> approach should work:

    <h:graphicImage src="/images/xxx.jpg" />
    

    See also:

    • Load images from outside of webapps / webcontext / deploy folder using <h:graphicImage> or <img> tag
    • Simplest way to serve static data from outside the application server in a Java web application
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to parse a xhtml file and display in UITableView. what is the
I have just tried to save a simple *.rtf file with some websites and
I want use html5's new tag to play a wav file (currently only supported
In my XML file chapters tag has more chapter tag.i need to display chapters
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.