I suppose the path you send as second param is a
file system path. That will not work only if you have your custom http
context and looks up resources in the file system.
Here is the part from the specs:
"The second parameter is an internal prefix to

map this resource to the bundle’s name-space. When a request is received,

the HttpService object must remove the external alias from the URI, replace

it with the internal prefix, and call the getResource(String) method with

this new name on the associated HttpContext object."

HTH,

On Thu, Jun 18, 2009 at 1:08 PM, 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]
>
>


-- 
Alin Dreghiciu
Software Developer - Looking for new projects!
My profile: http://www.linkedin.com/in/alindreghiciu
My blog: http://adreghiciu.blogspot.com
http://www.ops4j.org - New Energy for OSS Communities - Open Participation
Software.
http://www.qi4j.org - New Energy for Java - Domain Driven Development.

Reply via email to