小弟初学ssh,现在遇到一个棘手的问题,我现在实现了一个资源下载的功能,现在要统计下载次数,每次下载后,把下载次数对应的字段加一。请问该功能要如何实现?
这是我的下载页面代码:
<td height="20" align="center" bgcolor="#FFFFFF">资源下载:</td>
                    <td bgcolor="#FFFFFF"><s:if test="resource.resourceURL!=null"></s:if>
                    <c:forTokens  var="token" items="${resource.resourceURL}"  delims=";" varStatus="status" >
                        <a href="DownLoadResource.action?file=${fn:split(token,'?')[0]}">${fn:split(token,"?")[1]}</a>
                      <br/>
       </c:forTokens>
下面的是我对应的action代码:
//文件下载
   public InputStream getDownload()throws Exception { 
  
   return new FileInputStream(url+"/"+file);
        }
   /** 提供转换编码后的供下载用的文件名 */     public String getDownloadFileName() {     String downFileName =file;     try {     downFileName = new String(downFileName.getBytes(), "ISO8859-1");     } catch (UnsupportedEncodingException e) {     e.printStackTrace();     }     return downFileName;     } 
   public String execute() throws Exception { 
   file=new String(file.getBytes("ISO8859-1"),"utf-8");//中文下载
  // resource=resourceService.getDetailResource(getResourceID());
   //resource.setDownCount(resource.getDownCount()+1);
   return "downSuccess";     }