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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:06:29+00:00 2026-05-14T18:06:29+00:00

I have a JSP page on which I have a div tag in which

  • 0

I have a JSP page on which I have a div tag in which there is a a IMG tag. Using this IMG tag I want to show an image in it. Here the source path of an image is comes from database so I assigned a JSP variable using JSP scriplet. This JSP variable have the source path of an image.
This path of image may be of different machine or of same machine i.e. images are stored on different machine or on same machine i.e. on local machine on different drive.
The problem is that how to give path of image stored on different machine as well as on same machine. I have tried different ways like by giving ip address of that machine.
Here is the path that of local machine where the image is stored

img src= file:\localhost\D:\ScannedSheets\testproj/batch1/IMG001.jpg style=”z-index:1; position:absolute; top:0; left:0; width:850; height:1099″

With this syntax the image is visible in Internet Explorer but With the same syntax Its not visible in FireFox, Google Chrome etc.

Please Guide me in friends.

Also tell me that how to give path of the image stored on different machine which works In Internet Explorer, FireFox, Google chrome etc.

  • 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-05-14T18:06:29+00:00Added an answer on May 14, 2026 at 6:06 pm

    Don’t use absolute paths for img tags if you are going to publish this page on the internet. It will not work. Use relative path instead. You need to save your picture on the same directory level as you html page. For example if your page stored here: C:\Web\Page.html then put you picture here C:\Web\Images\IMG001.jpg.

    And your code should look like this:

    <img src="Images/IMG001.jpg" style="z-index:1; position:absolute; top:0; left:0; width:850; height:1099" />
    

    EDIT:

    For remote server with picture handler:

    <img src="http://remoteserver/ImageHandler/?imageId=2323" style="z-index:1; position:absolute; top:0; left:0; width:850; height:1099" />
    

    You will need to implement image handler wich does the folowing:

    • Gets image path from db by image id

    • Returns image stream to client browser from identified path

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this DIV on my application jsp page which I need to inject
I have a popup using div and javascript in a jsp page which also
I have index page,which contain div section.i want to call different pages into this
I have a jsp page which needs a java code. This java code inside
I have a jsp page, which imports another jsp. This import is wrapped into
There is a JSP page in which i have an ArrayList variable. I need
Here is a problem I have encountered. I have jsp page which has a
I am using Struts1.3, I have Jsp page which is showing the list of
I have a JSP page which includes an iframe , Iframe contains the image
I have a jsp page which should load a popup using ajax. The content

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.