This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
David, Two things to try: 1) Output the html skeleton (html/head/body) outside the loop. You need it anyway and that will help tell if the problem lies in the loop. 2) Add flush and close for print writer to ensure all the output makes it out.
Your return input stream is null, hence it didn't write anything to the response, hence the blank response.
The method .getResourceAsStream() of ServletContext should only use relative path to a physical resource inside the web application. If you use it for the real file system path, it will return null. To use the real file system path, you should use java.io package. [ December 08, 2008: Message edited by: Duc Vo ]
“Everything should be as simple as it is, but not simpler.” Albert Einstein
Joined: Oct 01, 2008
cheers for the replies guys, i changed the path to a relative one and it works ok now. i also used context.getRealPath, thanks again, it is a bit scary when you do not get an error just white on white!!!