Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to use getLastModified() ?  RSS feed

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
Boost this thread!