Please help on create files and directories in Session Bean

Hi,
I am trying to create files and directories at run time from a session bean. Since EJB 2.0 prohibit the use of the java.io.* package. The only thing that I know how is to use the URLConnection. After getting a connection through URL. I may use the getOutputStream() to get a output stream to write to the HTTP server. But the getOutputStream() returns an OutputStream object which is one of the package in the java.io package. Since I need to create file and directory, I need to use the FileOutputStream that is also under the java.io package.
Can someone give me a hint what should I do. Here is a directory and the file that I may need to create;
Directory1/Drictory2/myFiles.au
Thank you in advance, your help is greatly appreciated.

From 24.1.2 (Programming Restrictions) of the EJB 2.0 spec:
� An enterprise bean must not use the java.io package to attempt to access files and directories in the file system.
The file system APIs are not well-suited for business components to access data. Business components should use a resource manager API, such as JDBC, to store data.
You might want to look at the File System Service Provider in JNDI for an alternative approach. I have never used an FSSP though.

Similar Messages

  • Please Help, Missing Project File and Discussion Advice Isn't Working.

    Here's the rundown:
    I was working in iMovie HD 5 when the power got cut out on my external hard drive. When I try to reload my project I got the 'Missing Project File' error that has been discussed by many on this board.
    There are two known fixes.
    1) Open the package and go back to the '~' version of the project.
    2) Use the MovieTimeline.mov in the Cache to import it back into a new project.
    Solution #1 simply didn't work.
    Solution #2 imports the full video as a single long clip but is significantly lower in quality than the original version.
    In addition, the movie was shot in true widescreen and plays in quicktime in 16:9 mode, but when I import that .mov file into iMovie HD for some reason bars are added on the sides and top and bottom of the frame, and the bars are thicker on the sides so it stretches the picture and makes everything look taller.
    Although I'd certainly much rather have my original project timeline back, I could still continue my work if I could figure out how to import the .mov so that it retains the quality and size that it had to begin with.
    Does anyone have any idea how to import it without losing the quality and size or how to gain back an earlier project save?
    Please help if you can, my grandfather's 83rd birthday gala celebration (2 days away!) depends on it!

    I know you're in a rush, so I'll mention a couple other possibilities.
    Solution #2 imports the full video as a single long
    clip but is significantly lower in quality than the
    original version.
    • You shouldn't see any difference. The video imported from the Timeline Movie.mov is exactly the same as the original video. My guess is you're seeing some side effect of the widescreen issue. That, or your iMovie playback settings have changed.
    In addition, the movie was shot in true widescreen
    and plays in quicktime in 16:9 mode, but when I
    import that .mov file into iMovie HD for some reason
    bars are added on the sides and top and bottom of the
    frame, and the bars are thicker on the sides so it
    stretches the picture and makes everything look
    taller.
    • Make sure you're importing to a DV Widescreen project.
    • It might work to open the Timeline Movie.mov in QT Player Pro and export to a DV stream set to 16:9, then import that to the new project.
    • It's curious solution #1 didn't work. What happened when you tried that?
    Karl

  • Please help with RTAV files and Telecini import

    Hello,
    I am trying to archive old 16mm films. I purchased a telecini and i am importing in to a Panasonic DVD video recorder and burning on to DVD. I am not sure this is important. The challenge I have is that when I put the DVD in my Powerbook g4 it opens the DVD and reads as a RTAV file. When I open the RTAV file the file is empty. I have never experienced this before and I don't even know what an RTAV file is. Please excuse my ignorance if this is basic.
    The second question I have is....I would like to import from the telecini directly in to Imove. My powerbook does not recognize the telecini which I expected. I think I need software to recognize the telecini and bridge to Imovie. Any suggestions?
    Thanks!!!
    Carla

    welcome Carla to the  iMovie boards..
    your question stumbles into some hurdles.. :
    The Panasonic dvd-corder is one of the rare devices, which allow aside the 'standard' dvd-r/w usage of socalled DVD-Ram.. which creates RTAV files.. and which are NOT readable by your Mac (=empty) ..
    so, to solve your rtav problem, use 'normal' dvd-r/+r/-rw or +rw .. (I like re-writable disks for 'transport' issues.. after transfer, erase and re-use them) ...
    I guess, your telecini (cozy name ) device offers an analogue output.. if you have a manufacturers site url, post it here, maybe we find some additional info .. if so, you need a converter device, whch converts from analogue to digital.. there are some devices, Canopus, EyeTV which are supported by iM ...
    finally: I would let do the conversion by some professional service, which allows 'transfer' to miniDV .. best quality and best compatibility..
    ahh, forgot to mention: and if you use dvd-r in your Panasonic instead of DVD-Ram, to convert such stuff, the usual reply is....... :
    DVDs are in a socalled delivery format (mpeg2), which isn't meant and made for any processing as editing...
    for using the iLife apps, you have to convert'em first, in recommended order, choose one of the following tools/workarounds:
    DVDxDV (free trial, 25$, Pro: 90$)
    Apple mpeg2 plugin (19$) + Streamclip (free)
    VisualHub (23.32$)
    Drop2DV (free, requires installation of ffmpeg parts, google for it...)
    Cinematize >60$
    Mpeg2Works >25$ + Apple plug-in
    Toast 6/7/8 allows converting to dv/insert dvd, hit apple-k
    connect a miniDV Camcorder with analogue input to a DVD-player and transfer disk to tape/use as converter
    http://danslagle.com/mac/iMovie/tips_tricks/6010.shtml
    http://danslagle.com/mac/iMovie/tips_tricks/6018.shtml
    http://karsten.schluter.googlepages.com/convertdvdstodvs
    none of these methods or tools override copy protection/DRM mechanisms.. advice on 'ripping' is a violation of the ToU of this board ..
    +be nice to copy rights ...+

  • Please help me delete files and empty the trash..

    I am unable to empty the trash and also delete files from an extrnal HD.
    Its so ridiculous. Finder ***** big time again.
    Is there a simple solution without having to read pages of instructions or open terminal and start typing things i dont understand that could harm my mac?
    thanks

    Some of the suggestions you may have already tried:  http://support.apple.com/kb/ht1526 You can't empty the Trash or move a file to the Trash
    What to do when the Trash won’t empty
    Apple admit it
    These are user-to-user forums where everyday folk (volunteers) post questions and offer answers (technical support) to each other.
    Apple involvement. Apple may respond to questions but does not formally provide technical support on the Site. Any information that is provided by Apple or Apple employees is offered on an "AS IS" basis without warranties of any kind.
    Post your complaints/concerns/suggestions on the Product Feedback website.

  • Hi there, can anyone please help? Download itunes and it says The Itunes library .itl file is locked, or on a locked disk or you do not have write permission for this file.

    Hi there, can anyone please help? Download itunes and it says The Itunes library .itl file is locked, or on a locked disk or you do not have write permission for this file.

    Holding down the shift key while iTunes is opening. That will bring up the 'choose iTunes library' dialog. Select 'Choose LIbrary' from the choices and navigate to your music folder and iTunes music folder.
    Or refer to this article:
    iTunes for Windows XP: "Disk is locked" or "iTunes folder cannot be found" when installing or opening iTunes
    http://support.apple.com/kb/HT1866

  • I created my itunes account YEARS ago!! And I can't remember the answers to my security questions? Because I cannot remember the answers I cannot make purchases in the app store. Please help me create new security questions.

    I created my itunes account YEARS ago!! And I can't remember the answers to my security questions? Because I cannot remember the answers I cannot make purchases in the app store. Please help me create new security questions. Please help me.

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then you can try going to https://appleid.apple.com/and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you might see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then see if this user tip helps you get the questions reset :https://discussions.apple.com/docs/DOC-4551
    e.g. you can try contacting iTunes Support :http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Account Management , and then try Apple ID Account Security
    or try ringing the number for Apple  in your country and ask to talk to the Account Security Team : http://support.apple.com/kb/HE57

  • File Chooser is displaying names of the Files and Directories as boxes

    Hi All,
    Actually i am working on an application in which i have the requirement to internationalize the File Chooser in All Operating Systems. The application is working properly for all languages on MAC OS, but not working properly for the language Telugu on both the Ubuntu and Windows OS. The main problem is, when i try to open the File Chooser after setting the language to TELUGU all the labels and buttons in the File Chooser are properly internationalized but names of Files and directories in the File Chooser are displaying as boxes.
    So please provide your suggestions to me.
    Thanks in Advance
    Uday.

    I hope this can help you:
    package it.test
    import java.awt.BorderLayout;
    import java.awt.Frame;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.Locale;
    import javax.swing.JButton;
    import javax.swing.JDialog;
    import javax.swing.JFileChooser;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    import javax.swing.UIManager;
    * @author Alessandro
    public class Test extends JDialog {
         private JFileChooser fc = null;
         private Frame bfcParent = null;
         public Test(Frame parent, boolean modal) {
              super(parent, modal);
              this.bfcParent = parent;
              if (fc == null) {
                   fc = new JFileChooser();
                   fc.setAcceptAllFileFilterUsed(false);
                   fc.setLocale(Locale.ITALIAN);//i think you should use english
                   //these are in telugu
                   UIManager.put("FileChooser.openDialogTitleText", "Open Dialog");
                   UIManager.put("FileChooser.saveDialogTitleText", "Save Dialog");
                   UIManager.put("FileChooser.lookInLabelText", "LookIn");
                   UIManager.put("FileChooser.saveInLabelText", "SaveIn");
                   UIManager.put("FileChooser.upFolderToolTipText", "UpFolder");
                   UIManager.put("FileChooser.homeFolderToolTipText", "HomeFolder");
                   UIManager.put("FileChooser.newFolderToolTipText", "New FOlder");
                   UIManager.put("FileChooser.listViewButtonToolTipText", "View");
                   UIManager.put("FileChooser.detailsViewButtonToolTipText", "Details");
                   UIManager.put("FileChooser.fileNameHeaderText", "Name");
                   UIManager.put("FileChooser.fileSizeHeaderText", "Size");
                   UIManager.put("FileChooser.fileTypeHeaderText", "Type");
                   UIManager.put("FileChooser.fileDateHeaderText", "Date");
                   UIManager.put("FileChooser.fileAttrHeaderText", "Attr");
                   UIManager.put("FileChooser.fileNameLabelText", "Label");
                   UIManager.put("FileChooser.filesOfTypeLabelText", "filesOfType");
                   UIManager.put("FileChooser.openButtonText", "Open");
                   UIManager.put("FileChooser.openButtonToolTipText", "Open");
                   UIManager.put("FileChooser.saveButtonText", "Save");
                   UIManager.put("FileChooser.saveButtonToolTipText", "Save");
                   UIManager.put("FileChooser.directoryOpenButtonText", "Open Directory");
                   UIManager.put("FileChooser.directoryOpenButtonToolTipText", "Open Directory");
                   UIManager.put("FileChooser.cancelButtonText", "Cancel");
                   UIManager.put("FileChooser.cancelButtonToolTipText", "Cancel");
                   UIManager.put("FileChooser.newFolderErrorText", "newFolder");
                   UIManager.put("FileChooser.acceptAllFileFilterText", "Accept");
                   fc.updateUI();
         public int openFileChooser() {
              fc.setDialogTitle("Open File");
              fc.resetChoosableFileFilters();
              int returnVal = 0;
              fc.setDialogType(JFileChooser.OPEN_DIALOG);
              returnVal = fc.showDialog(this.bfcParent, "Apri File");
              //Process the results.
              if (returnVal == JFileChooser.APPROVE_OPTION) {
                   System.out.println("Hai scelto di aprire un file");
              } else {
                   System.out.println("hai annullato l'apertura");
              return returnVal;
         private static void createAndShowGUI() {
              JFrame frame = new JFrame("FileChooser");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JPanel jp = new JPanel(new BorderLayout());
              JButton openButton = new JButton("Open File");
              final Test test = new Test(frame, true);
              openButton.addActionListener(new ActionListener() {
                   @Override
                   public void actionPerformed(ActionEvent e) {
                        test.openFileChooser();
              openButton.setEnabled(true);
              jp.add(openButton, BorderLayout.AFTER_LAST_LINE);
              //Add content to the window.
              frame.add(jp);
              //Display the window.
              frame.pack();
              frame.setVisible(true);
         public static void main(String[] args) {
              //Schedule a job for the event dispatch thread:
              //creating and showing this application's GUI.
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        //Turn off metal's use of bold fonts
                        createAndShowGUI();
    }bye ale

  • Please help me creating a new listener with different port#.

    I have two instances in a server. both have different homes. I want to create a seperate listener for the second one i created.
    But that is not happening.
    here i tried to give name from LISTENER TO LISTENER1 & Port# from 1521 to 1524.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /apps2/oracle)
    (PROGRAM = extproc)
    LISTENER1 =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = aixth53)(PORT = 1524))
    When I check lsnrctl status with LISTENER1 , it still shows the other instance home with port#: 1521
    Please help me creating a new listener with different port#.
    Thanks,

    marist89 wrote:
    sb92075 wrote:
    marist89 wrote:
    sybrand_b wrote:
    The listener is a broker only and doesn't play any role in normal communications.
    It just forks a process or a thread, and that's it.And the listener is a single point of failure. Listener goes down, you can't connect to the db. That's why you need two listeners.If listener one goes down, then listener two goes down for exact same reason since it is a single executable file.I'm not playing tit-for-tat with you. Fact is, there are situations where people who are not you might want to use more than one listener.Some folks might want to jab a sharp pencil into their eye, too.
    Just because you can do something, it does not necessarily mean it should be done.

  • What files and directories are shipped with the Oracle Agent ?

    Hi:
    - Could someone please outline the intent of all the files
    and directories that are shipped with the Oracle agent?
    - I think this was documented somewhere but I cannot
    recall where I saw this previously.
    - Another question: if I wanted to add a logfile for my plug-in
    (for debugging/troubleshooting)
    under which directory should this logfile be placed ?
    Thanks
    John

    http://download.oracle.com/docs/cd/B19306_01/em.102/b40002/structure.htm#i1028189 should help you understand the directory structure of OEM Agent.

  • How to select  file and directories to ZIP

    HI,
    I'm doing an application that would zip a file and directories. here's an exmple:
    fileName = FileNameTest.csv
    folderName = FileNameTest_A
    folderName = FileNameTest_B
    The foldername is taken from the fileName with "_A" and "_B" at the end. The file and directories are located in a directory where there can also be other files and directories in it. What I want to do is to zip only the above file and directories.
    Any help will be greatly appreciated!
    Thanks!

    Not a very clear specification. What do you want the resulting zip entries/files/paths to look like?

  • Traversing files and directories underneath a directory

    I'm looking at some sample code about traversing files and directories underneath a directory. I'm trying to understand exactly what the code is doing. I see that dir.list() is building a string array of filenames and directory names. Then it tests each to see whether it's a directory. If it's a directory then is looks and each file and or directory in that directory.
    But I don't understand how it keeps going below just the second level directory. The two lines of code I'm not sure I understand are:
    1) process(dir);
    2) visitAllDirsAndFiles(new File(dir, children));
    Can anyone help me to understand exactly how this code block can traverse beyond just the second directory level?
    // Process all files and directories under dir
        public static void visitAllDirsAndFiles(File dir) {
            process(dir);
            if (dir.isDirectory()) {
                String[] children = dir.list();
                for (int i=0; i<children.length; i++) {
                    visitAllDirsAndFiles(new File(dir, children));

    No, I guess they might be assuming somethings. Here is the page with the sample code:
    [http://exampledepot.com/egs/java.io/TraverseTree.html]

  • Listing Files and Directories

    On our internal web page we have some links to various areas
    like Office Forms, Safety, etc... The supervisors that maintain
    these documents have access to shares that allow them add, remove,
    and update the files as needed. Since the content in each changes
    fairly often we're currently using CFDIRECTORY with the LIST action
    to display the contents to the users on the web page.
    Some of the areas now contain quite a few documents and the
    supervisors would like to be able to group their documents in
    subdirectories. I know I can I can use RECURSE="yes" to have the
    web page list the contents of these folders, but the supervisors
    would like the end users to see the subdirectories as well so
    things are less confusing and cluttered on both ends.
    So is there any way in CF to set up these pages so that
    subdirectories can can be navigated and the documents selected? If
    possible, I'd like something that can handle this dynamically so
    that I don't have to constantly change the code every time a
    supervisor decides to add/remove a directory.
    We're currently running CF8 Standard.
    Thanks!

    Vidikron wrote:
    > On our internal web page we have some links to various
    areas like Office Forms,
    > Safety, etc... The supervisors that maintain these
    documents have access to
    > shares that allow them add, remove, and update the files
    as needed. Since the
    > content in each changes fairly often we're currently
    using CFDIRECTORY with the
    > LIST action to display the contents to the users on the
    web page.
    >
    > Some of the areas now contain quite a few documents and
    the supervisors would
    > like to be able to group their documents in
    subdirectories. I know I can I can
    > use RECURSE="yes" to have the web page list the contents
    of these folders, but
    > the supervisors would like the end users to see the
    subdirectories as well so
    > things are less confusing and cluttered on both ends.
    >
    > So is there any way in CF to set up these pages so that
    subdirectories can can
    > be navigated and the documents selected? If possible,
    I'd like something that
    > can handle this dynamically so that I don't have to
    constantly change the code
    > every time a supervisor decides to add/remove a
    directory.
    >
    > We're currently running CF8 Standard.
    >
    > Thanks!
    >
    Pretty much what you got should do it. The simplest change
    would be to
    output entire directory structure on your current page, just
    nesting the
    files and directories.
    I would just create a looping output that uses the fields of
    the record
    set to output the directories and the files with-in them
    probably as a
    nested set of <ul> unordered lists.
    If you want to break up this user interface into distinct
    units which
    only list the contents of a current directory then just do
    the output as
    you have it without using recursion. But make the
    sub-directory
    listings links that when clicked repopulate the current page
    listing the
    contents of the selected directory.
    Neither should take a great deal of rework to your current
    interface.

  • I can't create rescuse email to change security questions. Please helps me create rescuse email

    I cant create rescuse email to change security questions. Please helps me create rescuse email

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then you can try going to https://appleid.apple.com/and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you might see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then see if this user tip helps you get the questions reset :https://discussions.apple.com/docs/DOC-4551
    e.g. you can try contacting iTunes Support :http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Account Management , and then try Apple ID Account Security
    or try ringing the number for Apple  in your country and ask to talk to the Account Security Team : http://support.apple.com/kb/HE57

  • Set numerous files and directories to 664 and 775

    This is actually a Solaris 9 question:
    I need to set numerous files/directories under a selected "branch" (directory) to 664 (files) and 775 (directories), recursively.
    also need to ensure all files/directories created from then on are 664/775, respectively.
    Thanks

    I guess I wasn't clear...
    The directory/file structure consists of multiple levels (subdirectories) and files in each of those subdirectories.
    I can do a
    chmod -R 775 whatever
    this changes ALL files AND directories under directory: whatever to 755
    I need to change all subdirectories to 775 and all files (non-directories) within those subdirectories to 664
    Is there a way to indicate file or directory.. There does not appear to be an option using chmod..
    Thanks

  • Copying files and directories from AIX/UNIX to Client PC in ABAP.

    Hi all,
    Can someone help me. I have to make an ABAP program which copies the J2EE Visual Adminstrator programs from our AIX/UNIX server to the Client PC.
    I have to copy all files and directories in /usr/sap/DXI/DVEBMGS70/j2ee/admin/.  to  D:\j2ee\*.*
    Is it possibly in ABAP? How would you do it?
    Best regards
    Brian Strunge

    Hi,
    try this.
    DATA: lcl_directory TYPE char128,
    constants: c_mask TYPE char9 VALUE ',.,..'.
    lcl_directory = ''/local/data/interface/A28/DM/OUT'. <b>"target directory</b>
    CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
    EXPORTING
    directory = lcl_directory
    filemask = c_mask
    IMPORTING
    serverfile = p_f2
    EXCEPTIONS
    canceled_by_user = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE e000(zmm) WITH text-039.
    flg_app = 'X'.
    ENDIF.
    ******************************************************8
    REPORT zdirtest.
    DATA lv_dir TYPE rsmrgstr-path VALUE '/usr/sap/trans/data'. <b>"source directory</b>
    DATA: wa_files TYPE rsfillst,
    it_files LIKE TABLE OF wa_files.
    START-OF-SELECTION.
    CALL FUNCTION 'SUBST_GET_FILE_LIST'
    EXPORTING
    dirname = lv_dir
    filenm = '*'
    TABLES
    file_list = it_files
    EXCEPTIONS
    access_error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    WRITE /1 'Error! :-('.
    ELSE.
    LOOP AT it_files INTO wa_files.
    WRITE: /1 wa_files-name,
    wa_files-len.
    ENDLOOP.
    Regards
    Anver

Maybe you are looking for