After uploding file clicking submit button getting Exception IOE : This is My JSP Page and I am getting Exception after uploading file  and Click on  submitt button  

<%@page import="com.oreilly.servlet.*,java.sql.*,databaseconnection.*,java.util.*,java.io.*,javax.servlet.*, javax.servlet.http.*"%>
     <%
    
     String h1=null;
    	   String saveFile="";
    	 
    String contentType = request.getContentType();
    
    if((contentType != null)&&(contentType.indexOf("multipart/form-data") >= 0)){
    DataInputStream in = new DataInputStream(request.getInputStream());
    int formDataLength = request.getContentLength();
    byte dataBytes[] = new byte[formDataLength];
    int byteRead = 0;
    int totalBytesRead = 0;
    while(totalBytesRead < formDataLength){
    byteRead = in.read(dataBytes, totalBytesRead,formDataLength);
    totalBytesRead += byteRead;
    }
     int ch;
    StringBuffer strContent = new StringBuffer("");
    FileInputStream fin = null;
    
    String file = new String(dataBytes);
    
    saveFile = file.substring(file.indexOf("filename=\"") + 10);
    saveFile = saveFile.substring(0, saveFile.indexOf("\n"));
    saveFile = saveFile.substring(saveFile.lastIndexOf("\\") + 1,saveFile.indexOf("\""));
    int lastIndex = contentType.lastIndexOf("=");
    String boundary = contentType.substring(lastIndex + 1,contentType.length());
    int pos;
    pos = file.indexOf("filename=\"");
    pos = file.indexOf("\n", pos) + 1;
    pos = file.indexOf("\n", pos) + 1;
    pos = file.indexOf("\n", pos) + 1;
    int boundaryLocation = file.indexOf(boundary, pos) - 4;
    int startPos = ((file.substring(0, pos)).getBytes()).length;
    int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
    File ff = new File(saveFile);
    FileOutputStream fileOut = new FileOutputStream(ff);
    fileOut.write(dataBytes, startPos, (endPos - startPos));
    fileOut.flush();
    fileOut.close();
    
    fin = new FileInputStream(ff);
    
    
    while ((ch = fin.read()) != -1)
    strContent.append((char) ch);
    
    fin.close();
    String ss=(strContent.toString());
    //StringBuffer s=new StringBuffer(ss);
    
    String date=(String)session.getAttribute("date");
    
    String keypoints=(String)session.getAttribute("keypoints");
    /*
    	String[] strArray =null;
    	strArray=keypoints.split(",");
     for (String str : strArray) {
    // String a="<a href>"+str+" </a>";
    //String b="(?i)"+str;
    h=ss.replaceAll(str,"<a href>"+str+" </a>");
    
    
     }
    */
   ## 

> [Heading][1]

 ##
    
    %>
    
  -------------------------------------------------------------------------------  
    My Exception is
=====================
    
    java.io.IOException: An exception occurred processing JSP page /upload.jsp at line 41
    
    38: int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
    39: System.out.println(saveFile);
    40: File ff = new File(saveFile);
    41: FileOutputStream fileOut = new FileOutputStream(ff);
    42: 
    43: fileOut.write(dataBytes, startPos, (endPos - startPos));
    44: 
    
    
    Stacktrace:
    	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466)
    	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
    	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
    	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
    	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
    	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2503)
    	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2492)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    	at java.lang.Thread.run(Thread.java:745)
    Caused by: java.io.FileNotFoundException: springframework-license.txt (Access is denied)
    	at java.io.FileOutputStream.open0(Native Method)
    	at java.io.FileOutputStream.open(FileOutputStream.java:270)
    	at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
    	at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
    	at org.apache.jsp.upload_jsp._jspService(upload_jsp.java:163)
    	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:438)
    	... 27 more


  [1]: https://i.stack.imgur.com/kT6TY.png