0

I am working on a project in netbeans . I designed my webpage in dreamweaver, and copied the code in a jsp in my netbeans project. then I created an images folder under WEB-INF and stored the images used in my webpage . I also changed the path of my "img src" to that local path . But when I run it in my browser the images don't show up !

Please help ...

this is my package

|MyProj |WEB-INF |images |web.xml |home.jsp

here's my sample code:

<td width="610"><div id="logom"><img src="WEB-INF/images/webDes.png" width="323" height="167" alt="logomain" /></div></td>

That-Kickass-GirL
  • 43
  • 1
  • 2
  • 11

1 Answers1

0

According to JSR-000315, page 121:

A special directory exists within the application hierarchy named "WEB-INF"...no other files contained in the WEB-INF directory may be served directly to a client by the container.

and page 122:

any requests to access the resources in META-INF directory must be returned with a SC_NOT_FOUND(404) response.

Conclusion: Normally you don't place your static resources such as CSS, HTML, JavaScript into either META-INF/ or WEB-INF/ especially when the project is imported(?) from Dreamweaver. Now I understand some might disagree w/ me on this coz there're actually ways (via JEE or framework) to archive that goal, and I have to admit that they are correct alrite. Although based on your background I assumed, I don't think you're incorporating JEE or any other framework on the project. So in your case, you might just wanna avoid using WEB-INF/ (as well as META-INF/) directly.

高科技黑手
  • 1,252
  • 2
  • 12
  • 20
  • I already posted this information in the comments above here. – rickz Jan 20 '14 at 01:13
  • @rickz: I realize you did, but I thought That-Kickass-GirL might find my answer a little bit easier to understand. If it is redundant, feel free to down vote or delete it. :) – 高科技黑手 Jan 20 '14 at 02:05