I have a JSP page that posts form data to a servlet.  The servlet then processes that data and may do one of several things.  For example, if the data is invalid the servlet forwards back to the JSP and the JSP indicates to the user what entered information was invalid.
 
Here's the problem.  After the servlet forwards back to the JSP it displays everything correctly except the images.  In fact, the images aren't displayed at all.  When I view source of the JSP (without images) everything looks fine.  In deed, when I display that very source in a browser, it then displays the images.
 
Here's how I use the forward method in my code:
 
   RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/HomePage.jsp");
   if (dispatcher == null) {
    // No dispatcher means the file can not be delivered
    resp.sendError(resp.SC_NO_CONTENT);
   }
   dispatcher.forward(req, resp);
 
Does anybody know what's going on here?  I can't find this problem in any of my resources or research, so I would be grateful if anybody could help me out.

Reply via email to