I have to go now, but I will give you the solution on this in an hour or so. None of the answers so far are correct. This is not an easy question.

At 03:39 PM 7/17/03 +0200, you wrote:

Once again, since indentation might be invisible on some clients... Sorry.

---------- Forwarded message ----------


Hello,



I am having a simple problem regarding image displaying in a web application (.war).


My directory structure is:


MyWebApp.war
-- META-INF
-- WEB-INF
-- pages
---- graphics
------ MyPicture.gif
---- layout
------ upperBar.jsp


The problem is: HOW to display MyPicture.gif from upperBar.jsp?



I tried this:


<html:img pageKey="graphics.MyPicture"/>


In properties file I have:


graphics.MyPicture=/pages/graphics/MyPicture.gif


This works fine -- HTML generated contains this:


<img src="/MyWebApp/pages/graphics/MyPicture.gif">


Unfortunately, when the browser tries to download the image I get this:


2003-07-17 15:17:05 org.apache.struts.action.RequestProcessor process
INFO: Processing a 'GET' for path '/pages/graphics/MyPicture'
2003-07-17 15:17:05 org.apache.struts.action.RequestProcessor processMapping
SEVERE: Invalid path /pages/graphics/MyPicture was requested


There are two questions arising here:



1). WHERE did the file extension go? Because I get:


INFO: Processing a 'GET' for path '/pages/graphics/MyPicture'

and not

INFO: Processing a 'GET' for path '/pages/graphics/MyPicture.gif'


2). WHY doesn't the image get loaded? I tried to refer it in a direct way:


http://127.0.0.1:7001/MyWebApp/pages/graphics/MyPicture.gif

which of course didn't work either.


I am using Tomcat 4.1.24. My servlet is the 'default' servlet:


        <servlet-mapping>
                <servlet-name>MyWebApp</servlet-name>
                <url-pattern>/</url-pattern>
        </servlet-mapping>



Any help??
THANKS!!



-- Stanislaw Findeisen http://rainbow.mimuw.edu.pl/~sf

   Live life to the MAX.
   Follow JESUS.




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



LEGAL NOTICE


This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to