I'm trying to return an html, page using out.print();
from a servlet, and I can do it successfully the thing is that this is a group project and this other guy send me an html response that I have to mount in the servlet, he used css, and images and I tried to put all of what he send me in a out.print();
but I dont get images or color or whatever. How should it be done?
views:
34answers:
1
+2
A:
The CSS and images are most likely intended to be separate resources, each with their own distinct URLs. If you are going to output the resource contents from your servlet as you are currently doing, your servlet code has to look at the details of the HttpServletRequest and output the appropriate resource depending on the requested URL. When the user's browser requests the HTML page, when it requests an image, you give it that image and so on.
There are probably better ways to do this ...
Stephen C
2010-08-16 03:21:34
thanks... gonna look 4 that, and believe me i do know there r millions of better ways, i just don't know them... yet.thanks!
itsmedavid
2010-08-16 13:33:38