Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 74045

Can't access an image from inside a folder when i deply the Web Application

$
0
0

Making a simple Web Application using NetBeans and trying to use an image but wherever I put the image, it is inacccesible, exept if I have in the same diractory as the my index.xhtml.

Saved "myimage.jpg" inside webapp folder (along with index.xhtml), and also inside a resources folder and then inside an image folder.

Showing:

<img src="myimage.jpg"/>

Not showing:

<img src="resources/myimage.jpg"/>
<img src="resources/images/myimage.jpg"/>

When I deploy the application if I try typing manualy at the browser:

(url of the payara server)/title/myimage.jpg
I can see the image but if I try:
(url of the payara server)/title/resources/myimage.jpg
(url of the payara server)/title/resources/images/myimage.jpg
I get an: HTTP Status 404 - Not Found

(also tried a lot of diferent paths to find it like /, ./, ../, //, but nothing seems to work.)


Viewing all articles
Browse latest Browse all 74045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>