RE: Pointing to resources within the struts app client side.

2003-02-19 Thread du Plessis, Corneil C
The browser should not be able to load any resource from /WEB-INF/ the
servlet engine will protect this directory.

-Original Message-
From: Simon Kelly [mailto:[EMAIL PROTECTED]]
Sent: 18 February, 2003 16:18
To: Struts Users Mailing List
Subject: Pointing to resources within the struts app client side.


Hi all,

I'm trying to place an image with my web page that is stored as a resource
within my struts web-app.  I'm using xslt to create the output html, but
can't work out how to point at the image correctly.  I had put
src=/WEB-INF/classes/resources/graphics/icon.bmp, but this will not
display iether the image or the alt description.  Anyone have a clue how I
can do this?

Cheers

Simon

Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : [EMAIL PROTECTED]


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

__

Disclaimer and confidentiality note


Everything in this e-mail and any attachments relating to the official business of 
Standard Bank Group Limited is proprietary to the company. It is confidential, legally 
privileged and protected by law. Standard Bank does not own and endorse any other 
content. 
Views and opinions are those of the sender unless clearly stated as being that of 
Standard Bank. 

The person addressed in the e-mail is the sole authorised recipient. Please notify the 
sender 
immediately if it has unintentionally reached you and do not read, disclose or use the 
content
in any way. 

Standard Bank can not assure that the integrity of this communication has been 
maintained nor 
that it is free of errors, virus, interception or interference.

__

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




RE: Pointing to resources within the struts app client side.

2003-02-18 Thread Wendy Smoak
Simon wrote:
 I'm trying to place an image with my web page that is stored as a resource
 within my struts web-app.  I'm using xslt to create the output html, but
 can't work out how to point at the image correctly.  I had put
 src=/WEB-INF/classes/resources/graphics/icon.bmp, but this will not
 display iether the image or the alt description.  Anyone have a clue how I
 can do this?

Images are loaded by the browser in a separate request, they don't come down
the pipe with the HTML.  So you have to put those images in a place where a
normal browser request can find them, and that's going to be above WEB-INF.

Try making an 'images' directory off of the root of your webapp.  I'm not
sure why the alt text isn't appearing, though... can you post the JSP you're
using to generate the image tag and the resulting HTML?

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management



Re: Pointing to resources within the struts app client side.

2003-02-18 Thread Simon Kelly
Sorry Wendy, I'm using xslt not jsp :-((Code below)

I'm trying to give the web-app root aproach a look at, but I have problems
with tomcat at the mo and the cat wont play :-(

Thanks for the help,

Cheers

Simon

[xslt]
xsl:if test=*[self::icon] | *[self::image]
tr
xsl:choose
xsl:when test=*[self::icon]
td
img
src=/WEB-INF/classes/graphics/{icon} alt=Site icon should be here!
height=100% hspace=5/
/td
/xsl:when
/xsl:choose
xsl:choose
xsl:when test=*[self::image]
td
/td
/xsl:when
/xsl:choose
/tr
/xsl:if

[html output]
html xmlns:fo=http://www.w3.org/1999/XSL/Format;
   head
  META http-equiv=Content-Type content=text/html; charset=UTF-8
  titleKatrin/title
   /head
   body
  table border=0 cellspacing=0 cellpadding=2 width=100%
 tbody
tr colspan=2
   td
  table border=0 cellspacing=0 cellpadding=2
width=100%
 tr
td align=center
   h1Katrin/h1
/td
 /tr
  /table
   /td
/tr
tr
   tdimg src=./classes/graphics/FZKIcon.bmp alt=Site icon
height=100% hspace=5
   /td
/tr
tr
   td
  table border=0 cellspacing=0 cellpadding=2
width=100%
 tr
td align=left
   div align=left style=font-size:8pt;
font-family:Times serif; padding-top:4; padding-bottom:4; color:red
Version : 1.0/div
/td
td align=right
   div align=right style=font-size:8pt;
font-family:Times serif; padding-top:4; padding-bottom:4; color:red
Date : 01/01/2003/div
/td
 /tr
  /table
   /td
/tr
 /tbody
  /table
   /body
/html


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




Re: Pointing to resources within the struts app client side.

2003-02-18 Thread Simon Kelly
Wendy,

Tried several paths descriptions for the graphics directory and the
following did nothing

http://127.0.0.1:8080/katrin/graphics/FZKIcon.bmp
../graphics/FZKIcon.bmp

but these gave the following error

graphics/FZKIcon.bmp
/graphics/FZKIcon.bmp

18-Feb-2003 16:55:57 org.apache.struts.action.RequestProcessor process
INFO: Processing a 'GET' for path '/graphics/FZKIcon.bmp'
18-Feb-2003 16:55:57 org.apache.struts.action.RequestProcessor
processMapping
SEVERE: Invalid path /graphics/FZKIcon.bmp was requested

Any thoughts?

Cheers

Simon


- Original Message -
From: Wendy Smoak [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Tuesday, February 18, 2003 4:04 PM
Subject: RE: Pointing to resources within the struts app client side.


 Simon wrote:
  I'm trying to place an image with my web page that is stored as a
resource
  within my struts web-app.  I'm using xslt to create the output html, but
  can't work out how to point at the image correctly.  I had put
  src=/WEB-INF/classes/resources/graphics/icon.bmp, but this will not
  display iether the image or the alt description.  Anyone have a clue how
I
  can do this?

 Images are loaded by the browser in a separate request, they don't come
down
 the pipe with the HTML.  So you have to put those images in a place where
a
 normal browser request can find them, and that's going to be above
WEB-INF.

 Try making an 'images' directory off of the root of your webapp.  I'm not
 sure why the alt text isn't appearing, though... can you post the JSP
you're
 using to generate the image tag and the resulting HTML?

 --
 Wendy Smoak
 Applications Systems Analyst, Sr.
 Arizona State University PA Information Resources Management



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