aspose file tools*
The moose likes Struts and the fly likes problem of display image in tiles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem of display image in tiles" Watch "problem of display image in tiles" New topic
Author

problem of display image in tiles

Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
hi, i have a problem , which i could not display the image file in my body.jsp , it actually include css

body code :

it display the form but not include the image file which is "gif" type...but it exist in the folder ..

can anyone plese guide ? it work fine in jsp , but if connect to tiles, it doesn't show image...

[ August 05, 2004: Message edited by: Alvin chew ]

[ August 05, 2004: Message edited by: Alvin chew ]
[ August 06, 2004: Message edited by: Alvin chew ]
failed failed
Greenhorn

Joined: Aug 05, 2004
Posts: 8
The JSP file is executed relative to the servlet path:

http://www,mysite.com/servlet/fred.do/images/image.gif

(for example)
The actual path could be pointing somewhere different.

Try putting <html:base/> at the top of the JSP file; that's what I usually do.
[ August 05, 2004: Message edited by: failed failed ]
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
hi, do you mind to show me some sample? i couldn't get u , i'm very new to struts ...thank you !
Leandro Melo
Ranch Hand

Joined: Mar 27, 2004
Posts: 401
Suppose you have something like this.

+WEBModule
 +Pages
  -myPage.jsp
 +Images
  - myFig.jsp

In this case you should use a slash ("/") just before the path.

Try this to see if it works.

url(/images/bars2.gif)

[ August 06, 2004: Message edited by: Leandro Melo ]
[ August 06, 2004: Message edited by: Leandro Melo ]

Leandro Melo
SCJP 1.4, SCWCD 1.4
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
hi, leandro, it doesn't work, for my cASE,

my folder structure,

- web-inf\testtiles for holding the file of tiles,
- web-inf\testtiles\images for holding images

is url(/images/bars2.gif) still valid to my case ?

thank you !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem of display image in tiles