Given that it is "working" on your local machine and not on your web application, that would indicate there is a difference between the two environments.
Is the server you are
testing on running on Windows, or a flavor of unix?
Do you need to use backslash \ instead of slash / for these network file names?
Does the server have access to that file share?
How does the ViewPrintExcelReportsServlet try and access this file?
Is it just using new File(request.getParameter("p1")) ?