cancel
Showing results for 
Search instead for 
Did you mean: 

Picking up an HTML file placed on a file server

Former Member
0 Kudos

Dear All

I have an application where HTML files are displayed in a web dynpro application view. These HTML files are placed in mimes folder.

My company has now decided to move all such HTML files to a file server and application should read the files from there.

Could you please guide me on how to achieve this?

Step by step solution will be highly appreciated.

Also, could you please guide me on the steps if I have to read the HTML files placed in portal KM?

Regards

Vineet Vikram

Edited by: vineet vikram on Jun 2, 2009 11:48 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Vineet,

You can achieve this using KM API.

Assuming your folder location is /documents/xxx. chekc the sample code below.

IUser user = request.getUser(); //You can use cmadmin service as alternate option//

String location = "/documents/xxx";

IResourceContext resourceContext = new ResourceContext(user);

RID rid = RID.getRID(location);

IResource resource = ResourceFactory.getInstance().getResource(rid,resourceContext);

ICollection collection = (ICollection) resource;

IResourceList resourceList = collection.getChildren(); //Gives list of files and folders inside the KM location//

for(int i=0;i<resourceList.size();i++) {

IResource res = resourceList.get(i);

//Get the required info from the resource object and display

}

Vineet tell me exactly with which approcach you want to go accessing html files through file system or through KM.

Regards,

Saleem

Edited by: Saleem Baig Mohammed on Jun 2, 2009 2:10 PM