on 12-19-2008 7:41 AM
Hai friends,
I have a scenario in which, have t read a file from local system not in the sever path say(
kpi
server0).
It is possible?. If it is, how to proceed?
can any one help me on this issue...
Regards,
Krish.
Hi,
The only you can fullfill this sort of requirements is you have to upload the file into the server first and then read it from there .
Since when you are running the applications in the browser it only searches the path in the server not in the client system.
Thanks & regards,
Lokesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there,
Badly in need of a solution:
Is copying the concerned file to the server is the only solution?
What the user will do in case if the network access for the server is denied to him/her and client system is highly secured?
Is there any possibilities to read the file from the local/client machine?
sapsrv02\sapmnt\KPI\DVEBMGS02\j2ee\cluster\server0
This is my path where i can read the files.
Assume:
sapsrv02\sapmnt\KPI\DVEBMGS02\j2ee\cluster\server0\*Project_Files\log.txt*
It is not possible to read the log.txt file inside the Project_Files folder.
How to over come these difficulties???
Thanks,
RPN
Edited by: RPN on Dec 19, 2008 2:42 PM
Hi Krish,
answer to your questions-> If you are using web dynpro java application then you cannot read/write/share anything on client m/c with out using file upload UI as the application is deployed on server and which cannot recognise the client machine with out file upload UI.
If you are using a plain java application you can access the client files without file upload.
Hope this will help.
Regards
Narendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krish,
u cannot directly specify the path and read the file directly using webdynpro application.
you have to use the file upload Ui element for reading the file and saing it to server.
for getting the file path you can use the below steps.
1. create a context like filePath of type com.sap.ide.webdynpro.uielementdefinitions.Resource
2. Assign the context to the file upload childs resource properties.
3.Now you can use the below code to fetch the url.
wdContext.currentContextElement().getFilePath().getUrl(0));
this will help you to retrieve file path. Now you can pass the above URl to read that file.
hope this will help.
Regards
Narendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Narendra,
Thanks a lot ...
I tried your suggestion , i can read the file content by using the below code
filePath.read(false);
Somewhat my problem solved ...
One more requirement ...
Is it possible to read the file on the client system without using file upload ?
Is it possible to get the sharedocs path on the client system?
Is it possible to save the file on the client system?
Thanks & Regards,
Krish
hi Narendra,
Thanks a lot ...
I tried your suggestion , i can read the file content by using the below code
filePath.read(false);
Somewhat my problem solved ...
One more requirement ...
Is it possible to read the file on the client system without using file upload ?
Is it possible to get the sharedocs path on the client system?
Is it possible to save the file on the client system?
Thanks & Regards,
Krish
For reading file from local system, use [FileUpload UI element|http://help.sap.com/saphelp_nw04s/helpdata/en/42/fdf9c528d45171e10000000a1553f7/content.htm].
nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Anagha/Krish,
Dynpro application running in a client browser can not directly access client machines file system. The only interface left in dynpro is FileUpload/Download UI elements as said earlier.
If it is in server system or in a network path which server can access, directly go for [java.io.File|http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html].
nikhiL
hai Srinivas,
I want to read a file from my machine and want to save it on the server ..... It is possible ....?
I had done some examples on file upload ui control in nwds ... it reads the file only if that file exist on the server path....(say : - E:\usr
KPI\DVEBMGS02\j2ee\cluster\server0 path in server).
Still now i cant slove the problem can you help me.....
Thanks and regards,
Krish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.