File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Image file path

 
Matt Bucknam
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Marcos Maia
Ranch Hand
Posts: 977
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to use the method sendRedirect like this:
response.sendRedirect("http://...");//the full path of your jsp
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic