Hi,
I am using jsp and servlets in my application. In this application I am reading contents of *.csv files and uploading them to database.
Now this thing is working fine when I am running my application on single machine(sever and client). But when I am running my application on other machines(client) I am not able to read the files(*.csv). It is throwing FileNotFoundException.
How should I read the file from client machine. Can MIME be helpful in this regard.
9 6381
Hi,
I am using jsp and servlets in my application. In this application I am reading contents of *.csv files and uploading them to database.
Now this thing is working fine when I am running my application on single machine(sever and client). But when I am running my application on other machines(client) I am not able to read the files(*.csv). It is throwing FileNotFoundException.
How should I read the file from client machine. Can MIME be helpful in this regard.
How are you specifying the path then?
How are you specifying the path then?
Hi,
Right now in my jsp page I have put this .. -
-
<input type="file" name="CSVFilePath" />
-
I am getting the path from this file select option .. -
-
String path = request.getParameter("CSVFilePath");
-
and passing it to the function... -
-
boolean b = defectDetailDAO.uploadCSVfileIntoDataTable(filePath)
-
But doing same thing from client machine it is throwing FileNotFoundException.
Hi,
Right now in my jsp page I have put this .. -
-
<input type="file" name="CSVFilePath" />
-
I am getting the path from this file select option .. -
-
String path = request.getParameter("CSVFilePath");
-
and passing it to the function... -
-
boolean b = defectDetailDAO.uploadCSVfileIntoDataTable(filePath)
-
But doing same thing from client machine it is throwing FileNotFoundException.
Is that CSV file on the client or the server? Cause, if it's on the client, that's probably the problem, as JSP is server based and will therefore look for the file on the server.
Greetings,
Nepomuk
Is that CSV file on the client or the server? Cause, if it's on the client, that's probably the problem, as JSP is server based and will therefore look for the file on the server.
Greetings,
Nepomuk
Hi,
CSV file I am selecting from the client machine .
Hi,
CSV file I am selecting from the client machine .
In that case I guess you'll have to upload it to the server first. The server probably won't be able to find it, because it's searching for a local file, while the file you want isn't local.
Greetings,
Nepomuk
In that case I guess you'll have to upload it to the server first. The server probably won't be able to find it, because it's searching for a local file, while the file you want isn't local.
Greetings,
Nepomuk
Hi,
Any Idea how to do that ? Just starting point :)
Hi,
Any Idea how to do that ? Just starting point :)
I don't think it's a good idea (if possible) to upload it with Java, but there are alternatives... By searching the forum, I found this. ^^
Greetings,
Nepomuk
I don't think it's a good idea (if possible) to upload it with Java, but there are alternatives... By searching the forum, I found this. ^^
Greetings,
Nepomuk
Hi,
I am not using JavaScript/Ajax. I have to done it in java.
Any help :(
Hi,
I am not using JavaScript/Ajax. I have to done it in java.
Any help :(
Can't you just have a little bit of JavaScript/Ajax for that task in the page, which also loads the JSP? Otherwise I guess you have a problem, as the only way with Java I can think of is by having the user install a piece of software on the client. THEN you could work with sockets. However, very few people would want to do that.
Greetings,
Nepomuk
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Zed |
last post by:
I have a problem with .net writing to a remote server that I need to deploy
on. The app works fine on my local machine. But when got access to the
server I went to VS.NET and tried to create a...
|
by: Hai Ly Hoang \(MT00KSTN\) |
last post by:
Hi,
FileStream.Read(buf, offset, siz) will return when reaching the end of file
or a block (size siz) can be read from the file. In the case of
NetworkStream, it's more confusing. Now, consider...
|
by: POnfri |
last post by:
Hi,
I have a problem in a peace of code were i'm doing a file copy using
File.Copy. The Source is local and the target is a remote machine.
Example: File.Copy(C:\temp\hi.txt,...
|
by: ying |
last post by:
I need develop an asp.net script which will run on web
server. The script need read documents from client's
machine(know the filename, need check if the file exist or
not), convert the file to...
|
by: Michael |
last post by:
I am trying to open a file on the client machine from an aspx page running
server side. The design requirements of the page specify that the
HtmlInputFile control is not to be used.
Since the...
|
by: dinoo |
last post by:
Hi,
I would appreciate if some one could help me out.
I have to read a client side ini file in Aspx page and use that data in
server side processing. Can any one help me out here?
Please refer...
|
by: Bill Fallon |
last post by:
I have a VS2005 VB.Net windows form application deployed to a share drive.
The windows explorer security permissions for this application (.exe) file
is set for Everyone with List Folder/Read Data...
|
by: Johnny |
last post by:
Hi all:
I have an ASP.NET form that reads an Excel file and populates a datagrid. If
I load the form in IE on the server, and select a local file, the code works
fine. However if I load the form...
|
by: Ross |
last post by:
Hello,
I am trying to Read and Write to a text file on a web server using Microsoft Visual Basic 2005 Express Edition.
So far I have managed to complete my testing with a local text file using...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |