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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:08:49+00:00 2026-06-14T12:08:49+00:00

I use tomcat 7.0 and eclispe WTP plugin. I can’t reference to file on

  • 0

I use tomcat 7.0 and eclispe WTP plugin. I can’t reference to file on my local disk.
<h:graphicImage value="C:/tmp/someFile.png"/>

I tried to resolve it by adding in location C:\Program Files (x86)\apache-tomcat-7.0.32\webapps
directory tmp/ and use <h:graphicImage value="/tmp/someFile.png"/>

I tried also add from eclipse to tomcat file: server.xml <Context docBase="C:/tmp" path="/tmp" />

<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">

    <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t &quot;%r&quot; %s %b" prefix="localhost_access_log." suffix=".txt"/>

  <Context docBase="myProjectName" path="/myProjectName" reloadable="true" source="org.eclipse.jst.jee.server:myProjectName"/>
  <Context docBase="C:/tmp" path="/tmp" /></Host>

and reference to file in the same way <h:graphicImage value="/tmp/someFile.png"/>

In result I have HTTP Status 404. description The requested resource is not available.

How Can I resolve it ?
Thanks

  • 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-14T12:08:50+00:00Added an answer on June 14, 2026 at 12:08 pm

    The <h:graphicImage> automatically prepends the context path of the current webapp in the URL. If you’d have looked at the generated HTML output and/or the HTTP traffic monitor in webbrowser’s builtin webdeveloper toolset, you’d have noticed it.

    Just use plain HTML <img> element instead.

    <img src="/tmp/someFile.png" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We use Tomcat for our java web application. There is a properties file under
How Can I use my system as a tomcat server ? Like tomcat server
Eclipse can't resolve javax.servlet. I use Apache Tomcat. My CLASSPATH variable looks as following:
I use eclipse + tomcat + maven. When I deploy my project to Tomcat,
I use Tomcat 7 on Windows XP. I have a directory with static files
I use tomcat. I am developing a web application using struts2, and I use
Java EE application servers provide all the features of tomcat, so why use tomcat
I try to get Tomcat to use BoneCP as a connection pool because DBCP
How to change Spring to use Datasource from Tomcat vs BasicDataSource? below is a
i want to configure tomcat 7 to use port 80 on windows 7, but

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.