how can i put image.jpg in my bundle ? 2009/6/18 Rob Walker <[email protected]>
> Sana - as the guys say, this will only work if the following resource > exists in the bundle calling registerResource(): > > > /home/sst/Documents/Versions/21-05-09+saufActionParam/MyPoint/src/Vue/image.jpg > > The handling for default Http context is to strip the alias from the > resource path (i.e leaving in image.jpg in your case) - and look for this > *only* in the bundle at the path specified. > > If this resource exists elsewhere (e.g. in the local file system) - you > will need to implement your own HttpContext with a getResource() to find and > return a URL to your resource. > > Regards > > -- Rob > > > > Toni Menzel wrote: > >> Hi Sana, >> >> the second parameter (resource) is a bundle resource path and not a >> file path/folder. >> Are those resources in you bundle ? >> If you have "/Vue/img1.jpg,/Vue/img2.jpg" in your bundle, you can >> refer to it exactly this way. >> >> On 6/18/09, sana <[email protected]> wrote: >> >> >>> hello, >>> >>> i 'm trying to registre a picture like a http ressource >>> >>> >>> http.registerResources("/Vue","/home/sst/Documents/Versions/21-05-09+saufActionParam/MyPoint/src/Vue", >>> null); >>> >>> >>> and i want to use it in the background of my servlet . >>> pw.print("<html><head>"); >>> pw.print("<meta http-equiv=" + "Content-Type" + "content=" + >>> "text/html; charset=iso8859-1" + "/>"); >>> pw.print("<title></title>"); >>> pw.print("<style type=\"text/css\"> body >>> {background:url(\"/Vue/image.jpg\");}</style> "); >>> >>> pw.print("</head>"); >>> pw.print("<body>");pw.print("</body>");pw.print(</html>); >>> >>> >>> >>> but i get a white background and when i call >>> localhost:8080/Vue/image.jpg i get the error 404 >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >>> >>> >>> >>> >> >> >> >> > > -- > > > Ascert - Taking systems to the Edge > [email protected] > +44 (0)20 7488 3470 > www.ascert.com > >

