How to process a excel file without uploading it into server?
You could use an applet or webstart application. This is basically kind of a Java Swing application which is embedded in web page. This would then run entirely in the webbrowser without the need to exchange data with the webserver.
also how to upload a file without using the following in to server using servlet
Uh, why do you want to know how to upload a file if you don't want to upload a file? Or is your concrete problem that you have some aversion against including 3rd party libraries in your webapp which would force you to write hundreds if not thousands new lines of code to reinvent the wheel? I'm not sure if I understand...
Anyway, since Servlet 3.0 (Tomcat 7, Glassfish 3, JBoss AS 6, etc) you can use the new HttpServletRequest#getPart()
method to retrieve an uploaded file as a part of a multipart/form-data
request. Note that all of those servletcontainers use Apache Commons FileUpload transparently under the covers to do the job. The only difference is that you don't need to embed the Apache Commons JARs in your webapp, they are instead embedded in the servletcontainer itself.
For a detailed example how to use the new Servlet 3.0 getPart()
method, see also How to upload files to server using JSP/Servlet?