Skip to Content
avatar image
Former Member

New virtual Directory using JAVA

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 14, 2008 at 12:25 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Mar 14, 2008 at 12:15 PM

    Dear Eray,

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

    Add comment
    10|10000 characters needed characters exceeded