I am trying to understand what is going on for this Last Mod date in JSP:
Please advise if I am in the right direction for understanding this OOP?Code:<% //Use String object jspPath in the getRealPath method that gets the page path? String jspPath = application.getRealPath(request.getServletPath()); //create new ojbect called jspFile that is a file? java.io.File jspFile = new java.io.File(jspPath); java.util.Date lastModified = new java.util.Date(jspFile.lastModified()); java.text.SimpleDateFormat fmt = new java.text.SimpleDateFormat("MMM dd, yyyy, K:mm a (zz)"); out.println(fmt.format(lastModified)); %>


Reply With Quote
Bookmarks