IMAGE DISPLAY PROBLEM - PLEASE HELP!!

2003-07-17 Thread Stanislaw Findeisen

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:




In properties file I have:

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


This works fine -- HTML generated contains this:




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:


MyWebApp
/




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]



IMAGE DISPLAY PROBLEM - PLEASE HELP!! (fwd)

2003-07-17 Thread Stanislaw Findeisen

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:




In properties file I have:

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


This works fine -- HTML generated contains this:




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:


MyWebApp
/




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]



Re: IMAGE DISPLAY PROBLEM - PLEASE HELP!!

2003-07-17 Thread Nicolas De Loof
As your serlvet-mapping is setted to "/" every request is 
handled by Struts.

Struts RequestProcessor extracts the extension to get the action path to process.
request = "/MyWebApp/pages/graphics/MyPicture.gif"

When your request is handled, they're is no action-mapping for
"/MyWebApp/pages/graphics/MyPicture"


You should use ".do" url-pattern for Struts actions, so that other types are directly 
handled by HTTP server (or
container)

Nico.


>
> 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:
>
> 
>
>
> In properties file I have:
>
> graphics.MyPicture=/pages/graphics/MyPicture.gif
>
>
> This works fine -- HTML generated contains this:
>
> 
>
>
> 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:
>
> 
> MyWebApp
> /
> 
>
>
>
> 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]


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



Re: IMAGE DISPLAY PROBLEM - PLEASE HELP!!

2003-07-17 Thread mohan
Hey

I have used the usual image tag like this
  and this works just fine for me

where GEST is the directory containing WEB-INF etc where your JSP reside

--Let me know if it works
  Mohan
> 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:
>
>   
>
>
> In properties file I have:
>
>   graphics.MyPicture=/pages/graphics/MyPicture.gif
>
>
> This works fine -- HTML generated contains this:
>
>   
>
>
> 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:
>
>   
>   MyWebApp
>   /
>   
>
>
>
> 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]




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



RE: IMAGE DISPLAY PROBLEM - PLEASE HELP!!

2003-07-17 Thread Stephen Brown
Sorry Micael,

Nicolas is correct.

steve

> -Original Message-
> From: Nicolas De Loof [mailto:[EMAIL PROTECTED]
> Sent: July 17, 2003 9:52 AM
> To: Struts Users Mailing List
> Subject: Re: IMAGE DISPLAY PROBLEM - PLEASE HELP!!
> 
> 
> As your serlvet-mapping is setted to 
> "/" every request is handled by Struts.
> 
> Struts RequestProcessor extracts the extension to get the 
> action path to process.
> request = "/MyWebApp/pages/graphics/MyPicture.gif"
> 
> When your request is handled, they're is no action-mapping for
> "/MyWebApp/pages/graphics/MyPicture"
> 
> 
> You should use ".do" url-pattern for Struts actions, so that 
> other types are directly handled by HTTP server (or
> container)
> 
> Nico.
> 
> 
> >
> > 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:
> >
> > 
> >
> >
> > In properties file I have:
> >
> > graphics.MyPicture=/pages/graphics/MyPicture.gif
> >
> >
> > This works fine -- HTML generated contains this:
> >
> > 
> >
> >
> > 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:
> >
> > 
> > MyWebApp
> > /
> > 
> >
> >
> >
> > 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]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


Re: IMAGE DISPLAY PROBLEM - PLEASE HELP!! (fwd)

2003-07-17 Thread Micael
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:



In properties file I have:

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

This works fine -- HTML generated contains this:



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:


MyWebApp
/



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]


Re: IMAGE DISPLAY PROBLEM - PLEASE HELP!! (fwd)

2003-07-17 Thread Micael
Your pages are inside WEB-INF, right?  That is what causes the 
trouble.  But, you can do that, if that is really what you want.  Before I 
tell you the solution, is that what you want?

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:



In properties file I have:

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

This works fine -- HTML generated contains this:



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:


MyWebApp
/



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]


RE: IMAGE DISPLAY PROBLEM - PLEASE HELP!! (fwd)

2003-07-17 Thread Stephen Brown
What other servlet-mappings do you have?  Possible anything with * or *.gif?

steve

> -Original Message-
> From: Stanislaw Findeisen [mailto:[EMAIL PROTECTED]
> Sent: July 17, 2003 9:40 AM
> To: [EMAIL PROTECTED]
> Subject: IMAGE DISPLAY PROBLEM - PLEASE HELP!! (fwd)
> 
> 
> 
> 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:
> 
> 
> 
> 
> In properties file I have:
> 
> graphics.MyPicture=/pages/graphics/MyPicture.gif
> 
> 
> This works fine -- HTML generated contains this:
> 
> 
> 
> 
> 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:
> 
> 
> MyWebApp
> /
> 
> 
> 
> 
> 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]
>