cancel
Showing results for 
Search instead for 
Did you mean: 

New virtual Directory using JAVA

former_member187444
Participant
0 Kudos

Hello Friends;

I want to create a folder under SAP j2ee engine and i want to upload my files under new folder and use it like

http://portal:port/Newfolder/mynew_photo.jpg

It is possible in iis. For ex. i can create a folder manuel under

c:\inetpub\wwwroot\new_folder

and after i put my files i can use it

http://iisserver:port/new_folder/new_photo.jpg

I have tried this directories

D:\usr\sap\p50\JC01\j2ee\cluster\server0\apps\sap.com

D:\usr\sap\p50\JC01\j2ee\cluster\server0\apps\

D:\usr\sap\p50\JC01\j2ee\cluster\server0\

and i have create new folder but i couldnt use it.

I hope that i have explained my question.

Thanks in Advance

Best Regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Dear Eray,

You can use the following Java code to create the Folder (Directory) in the SAP J2EE Engine and add the contents in the Directory

import java.io.*;

class CreateDirectory

{

public static void main(String args[])

{

try{

String strDirectoy ="test";

String strManyDirectories="dir1/dir2/dir3";

// Create one directory

boolean success = (new File(strDirectoy)).mkdir();

if (success) {

System.out.println("Directory: " + strDirectoy + " created");

}

// Create multiple directories

success = (new File(strManyDirectories)).mkdirs();

if (success) {

System.out.println("Directories: " + strManyDirectories + " created");

}

}catch (Exception e){//Catch exception if any

System.err.println("Error: " + e.getMessage());

}

}

}

Rewards Points if useful..

Regards,

N.Jayanth Kumar

former_member187444
Participant
0 Kudos

Hello;

I use Netweaver Developer Studio to deploy my j2ee aplications.

And I know how to create folder in java but i want to create this folder under j2ee engine root folder (for sap j2ee engine usr/.../server0 )

and i want to access this folder using internet explorer. I hope that i have explained

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear Eray,

Can you please tell which tool are you using to deploy in your SAP J2EE Engine??