Suresh Entropy wrote:I am facing problems in file uploading into my server location. The thing is, am testing locally upload by setting the file path it was working fine.But my development needs to be work in Production environment where i need to upload that file in respective server location(path).
I would store the upload destination path as a context param in the web.xml. Then your code can just reference that parameter and it doesn't matter if you are working locally or on a server. Changing the path now is just a setting in web.xml and you don't have to touch the code.
Suresh Entropy wrote:After this being done, i again need to convert that Client uploaded server location into a URL for previewing that Uploaded document by client in a JSP Page.
This should be a simple matter of assembling the pieces. You can get the context from the
servlet container (${pageContext.request.contextPath}), you have the upload path as a context param, and you have the filename somewhere (I would probably save it as a session attribute prior to the upload). That should be everything you need to build a URL.
If you still have problems, post your code and show us exactly where you are having problems, what you expect the code to do, and what it's actually doing.