upload image to server URL
===

i have to upload an image in server location using servlet but url formating ia having some problem . i am able to upload image in local machine but when it is deployed on server with some URL like http://domain.com/folder then it is having some problem .
it is part of code from where location is read by servlet.. 

    <context-param>
     <description>Location to store uploaded file</description>
     <param-name>file-upload</param-name>
      <param-value>
            F://Servers//Images//
      </param-value>
</context-param>

and it is part of code i am using to upload to server .. 

    if( fileName.lastIndexOf("\\") >= 0 ){
               file = new File( filePath + fileName.substring( fileName.lastIndexOf("\\"))) ;
            }else{
               file = new File( filePath + fileName.substring(fileName.lastIndexOf("\\")+1)) ;
            }
            fi.write( file ) ;

when <param-value> is changed to http://domain.com/folder then it is not able to write to that location since **http:// is changed to http:/**

please help to resolve the issue...