This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

how to read files from remote system  RSS feed

Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Report post to moderator

i am trying to read fiels from remote system.
i've got all the access and sharing permissionsfor the particular directory on the remote system.

when i try opening the directory form windows run i am able to access the
directory, create new folders and delete folders etc.. but when i am using the same path in program i am not able to access the directory or folders.
i am getting a Nullpointer error.

the code i am using is

<%@ page language="java" import="*,java.lang.String,java.util.regex.*,,java.util.*,java.util.List,java.lang.*" %>
//getting file name and url
Map mapfiles = new HashMap();
Map showFiles(File file)
File[] files = file.listFiles();
for(int i=0;i<files.length; i++)
String path = file.getPath();
String name = file.getName();
return mapfiles;

File file_mem = new File("\\\\systemname\\dir1\\dir2\\dir3\\");
Iterator iterator_mapfiles = mapfiles.keySet().iterator();
boolean filefound_mem=false;
String fpath= (String);
String fname= (String)mapfiles.get(fpath);

// out.println(fpath +" " +fname+"<br>");

<%--<a href="\<%=fpath%>">fpath</a>
<a href="\<%=fpath%>">fname</a><br>--%>


what has to be done
waiting for your reply

Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Report post to moderator
I guess this will helpful to you.
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!