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.
I have a login screen, which send the values to a servlet. In that servlet validations are done. If password is wrong, I have used RequestDispatcher.forward to forward a message and view it on that page back. The problem is i am getting the message, but the page is not loading completely, i can only see two fields and a button with white background, where as my original page has images and all. The servlet part is below
Is the entire HTML page being sent to the browser? Or is it cut off?
If the latter, then it's likely an exception is being thrown that is preventing the page from being completely sent to the browser.
If the entire page is there and it's just the images that are not showing, then it's likely that your image URLs are not correctly formed using server-relative addressing that starts with the context path. See the JspFaq for more details.