I am trying to upload Image but I can't. When my application is in local disk i.e. d:\ then it works. But when I put my application on out office server and when I am trying to upload image then it isn't working. Before I am using following path :
final String path = "D:\\Workspace\\B2B Solution\\WebContent\\product_images\\";
now my application reside at :
\\ADMIN\keyur\Workspace\B2B Solution\WebContent\product_images
place i.e. on network. So which address I have to pass in servlet I don't know.
Any help please ?
Probably you need to create the path like this:
You need to escape all the slashes in the path.
Another option is to use the third party JCIFS API to create a connection through Samba to the network share; that also gives you control over which user is used to connect to the share which might be helpful.