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 8019743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:29:02+00:00 2026-06-04T21:29:02+00:00

When I retreive server path and show into the p:graphicImage tag, then images are

  • 0

When I retreive server path and show into the p:graphicImage tag, then images are not displayed. Images are loaded into outside the webbapp folder. Server path of the images are like this \\qbsserver\Test Folder\test\car.jpg.

<p:graphicImage value="\\qbsserver\Test Folder\test\\#{image.imageName}" />

How can I make them to display? I am using PrimeFaces 3.0 and JSF 2.0 in Eclipse IDE.

  • 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-04T21:29:03+00:00Added an answer on June 4, 2026 at 9:29 pm

    You’re making a conceptual mistake. It’s not the server who includes and sends the image along with the generated HTML output somehow. It’s the webbrowser who downloads the image by its URL as specified in the <img src> when it encounters an <img> tag in the HTML.

    So it has really to be a normal URL, exactly the one as the enduser would enter in the webbrowser’s address bar, not a server specific local disk file system path. The enduser using the webbrowser really doesn’t have that image on exactly that path on its local disk file system.

    Easiest would be to add the folder as a "virtual context" of the servletcontainer which you’re using. It’s unclear which one you’re using. In Tomcat it’s a matter of adding a new <Context> to the server.xml

    <Context docBase="/path/to/images" path="/images" />
    

    and in Glassfish it’s a matter of adding an alternatedocroot to the glassfish-web.xml

    <property name="alternatedocroot_1" value="from=/images/* dir=/path/to" />
    

    Refer the documentation of the servletcontainer for details. Ultimately they should be accessible by a normal URL so that you can just use for example:

    <p:graphicImage value="/images/#{image.imageName}" />
    

    Other ways involve using PrimeFaces StreamedContent API or homegrowing a servlet.

    See also:

    • 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 retrieve XML from a server, save it into an SD card, then parse
I created uploads folder on the server, and a file uploaded by a user
I'm trying to obtain the full path of the server's desktop using a plsql
I want to retrieve an image from SQL Server to show it in an
How to upload image URL in SQL server and retrieve in grid view using
I need to retrieve from an Application Server (JBoss) a large file (gigabytes) and
I need to retrieve random rows from SQL Server database. I am looking for
How do I retrieve a date from SQL Server in YYYY-MM-DD format? I need
How can I retrieve data from a SQL Server using LINQ and display each
How to retrieve rows from a SQL Server database by passing month in where

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.