Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to use getLastModified() ?

 
hasan khan
Ranch Hand
Posts: 223
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a servlet reading an image from different web site and writing back to ServletOutputStream



in this case how do i use getLastModified()

i know i have to call URLConnection.getLastModified(), but how and where to call this method ?
the simpler solution looks to me is to write getLastModified(HttpServletRequest) as follow



but i dont want to open connection twice
as there any other way without comprimising performance?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic