I wonder why the images show up in my JSP when I call it directly but they do not if I forward to the JSP from within a servlet. It seems as if server path is different depending on whether the servlet/jsp server handles the request or it comes through the browser. Does anyone know a way to use relative image paths that will work whether you call the jsp directly or forward to it from a servlet?
posted 15 years ago
Try to use the method sendRedirect like this: response.sendRedirect("http://...");//the full path of your jsp