RE: [NEWBIE] Static html pages do not show image files
Try, http://127.0.0.1:8080/Request/ This will show the list of files in the directory, check if you can see Tuev.gif. Click on it, if the file is ok, it should be displayed -Original Message- From: Algarve, Leila [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 8:41 AM To: '[EMAIL PROTECTED]' Subject: AW: [NEWBIE] Static html pages do not show image files This is the scr of the img tag: td WIDTH=198img SRC=Tuev.gif BORDER=0 height=203 width=198/td This url works: http://127.0.0.1:8080/Request/index.htm This url does not work (Error 404 - File not found): http://127.0.0.1:8080/Request/Tuev.gif Both files exists and they are in the same directory. Leila What is the src of the img tag in your html file? Some tools will put fully qualified file names in there instead of relative paths. Randy I am running Tomcat 4.0b5 standalone in Windows NT 4.0. I've created a new web-application in $tomcathome$\webapps without creating a war file (I am at the early stage of development), with one html static page and one servlet. I can access the html page and the servlet without problem but I cannot see any image (gif). The html and the images are in the same directory ($tomcathome$\webapps\MyWebApp), if I open the html file (without using Tomcat) the images just show fine.
RE: [NEWBIE] Static html pages do not show image files
Its not a bug, the Servlet spec requires case sensitivity, so its a feature. Windows NT Explorer thinks its smarter than your files and therefore displays all files with the first letter capitalized and the rest lower case, regardless of their actual names (this is in 2000 definitely, I believe NT and unsure about 9x). I believe that the DOS prompt doesn't do this. In any case, Tomcat is looking at what the file name actually is in order to make the determination. Randy -Original Message- From: Algarve, Leila [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 6:17 AM To: '[EMAIL PROTECTED]' Subject: AW: [NEWBIE] Static html pages do not show image files Thank everyone for the help and tips. I found the problem and I am posting the solution for the archive. I had to change the html page from: img SRC=Tuev.gif BORDER=0 height=203 width=198 to: img SRC=TUEV.GIF BORDER=0 height=203 width=198 The name of the file is Tuev.gif but I have to write the src of the img tag with capital letters I guess the cause of the problem is that Windows is case insenstiv. Is that a bug from Tomcat? Leila Try, http://127.0.0.1:8080/Request/ This will show the list of files in the directory, check if you can see Tuev.gif. Click on it, if the file is ok, it should be displayed -Original Message- This is the scr of the img tag: td WIDTH=198img SRC=Tuev.gif BORDER=0 height=203 width=198/td This url works: http://127.0.0.1:8080/Request/index.htm This url does not work (Error 404 - File not found): http://127.0.0.1:8080/Request/Tuev.gif Both files exists and they are in the same directory. Leila What is the src of the img tag in your html file? Some tools will put fully qualified file names in there instead of relative paths. Randy I am running Tomcat 4.0b5 standalone in Windows NT 4.0. I've created a new web-application in $tomcathome$\webapps without creating a war file (I am at the early stage of development), with one html static page and one servlet. I can access the html page and the servlet without problem but I cannot see any image (gif). The html and the images are in the same directory ($tomcathome$\webapps\MyWebApp), if I open the html file (without using Tomcat) the images just show fine.
RE: [NEWBIE] Static html pages do not show image files
What is the src of the img tag in your html file? Some tools will put fully qualified file names in there instead of relative paths. Randy -Original Message- From: Algarve, Leila [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 10, 2001 11:11 AM To: '[EMAIL PROTECTED]' Subject: [NEWBIE] Static html pages do not show image files Hi!!! I am running Tomcat 4.0b5 standalone in Windows NT 4.0. I've created a new web-application in $tomcathome$\webapps without creating a war file (I am at the early stage of development), with one html static page and one servlet. I can access the html page and the servlet without problem but I cannot see any image (gif). The html and the images are in the same directory ($tomcathome$\webapps\MyWebApp), if I open the html file (without using Tomcat) the images just show fine. The only thing that I changed in the server.xml was that I added a new context for my web-application. In the $tomcathome$\webapps\MyWebApp\WEB-INF directory I have my web.xml: !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app display-nameServlet Applicationt/display-name descriptionThis the servlet aplication /description servlet servlet-nameMyServlet/servlet-name servlet-classMyServletClass/servlet-class /servlet servlet-mapping servlet-nameMyServlet/servlet-name url-pattern/MyServlet/url-pattern /servlet-mapping /web-app What am I missing? Thanks Leila