Using JAAS without config text files

Hi everybody,
I'm trying to develop an application using JAAS for authentication and authorization, but I don't want to depend on the text files for configuration.
This application is going to be distributed using Webstart, so I don't know which configuration the user will have.
Is there anyway to bypass these files?
Thanks a lot,
Luis Javier

For the LoginModule part, you could try to set your own Configuration object.
Ses javax.security.auth.login.Configuration.setConfiguration
You should be able to inherit from Configuration and provide your own method to
provide AppConfigEntries.

Similar Messages

  • How to open document from mac when using windows without transferring the file?

    How can i open a document from mac when i am using windows without transferring it?

    depend on the document program more then anything else really
    when ever I open a doc with word it make a history for undo and redo action file in the same dir
    with bootcamp you only have read not write access to the osx partition so it would fail to be able to create that file
    but if you can get word or whatever program you use to open the file not to place a temp file in the same dir
    or use a program which did not make any type of temp file or used a program where the temp file would be located elsewhere where you decide it would work file

  • Using importTextData to load text files

    I have been having a real issue  trying to load data from text files (tab delimited text file) into my  form.
    It  works fine if I use importTextData() with no parameters and it prompts  for the file name, then the row, but if I try and pass the path and row  it comes back with a -2 result "User Cancelled Row Select".
    My path is  formatted as so: "/C/temp/importfile.txt"
    It has to do with the path  somehow... otherwise my file would not load properly when browsed.
    And before  people let me know I can import my information via an XML file, yes I  know, but for this task, is not an option.
    The end goal is to have a fixed  drop-down on the form and depending on which item they select, Acrobat  will load a text file into various controls.
    I have attached my sample if  someone wants to take a look.
    Any help people can give is greatly appreciated.
    Paul

    My example was not very good. I replaced it with a new (see attached).
    Previously I found my problem to be the header row in the text file was not formatted properly. ie. rather than have "task" as the column header it had to be frmProgressCard[0].frmTasks[0].tblTasks[0].rowTask[0].task[0]
    That does not work any longer.
    I save all the work in LiveCycle as Adobe Dynamic XML Form and then open it in Acrobat Pro to test, but still will not load my data. Returns with "invalid row" error.
    So I think the problem is that first row that is suppose to link up with the text fields in the form, but I can't seem to find the proper format.
    The help file only says to put in the field names, ie. "task", but that does not work.
    Thanks
    Paul

  • Generating Postscript file using (psl132.prt) and Text file in one go

    Actually my requirement is to have soft copy , postscript files in a single shot for character mode report because the report fetches data from the table then deletes the data.
    - I am able to generate softcopy, and postscript files same using distribution file for Bitmap report as shown below :-
    [RWRUN REPORT=C:\Report\R_TEST.RDF userid = test / test @ test DISTRIBUTE=YES DESTINATION=C:\Report\bRep.dst   ERRFILE=C:\Report\Final\report.err
    The brep.dst file for bitmap report is as follows:-
    DEST1: DESNAME=C:\Report\tpdf.pdf DESTYPE=File DESFORMAT=PDF COPIES=1 LEVEL=Report
    DEST2: DESNAME=C:\Report\test.prn DESTYPE=File DESFORMAT=BITMAP COPIES=1 LEVEL=Report
    But in case of Char mode report i am able to generate text file but i am unable to generate postscript file for using printer definition file. The commands used are as follows :-
    RWRUN REPORT=C:\Report\R_TEST.RDF userid = test / test  @ test DISTRIBUTE=YES MODE=CHARACTER   DESTINATION=C:\Reports\cRep.dst ERRFILE=C:\Report\Final\report.err
    The crep.dst file for char report is as follows :-
    DEST1: DESNAME=C:\Report\tpdf.text  DESTYPE=File DESFORMAT=ASCII   COPIES=1 LEVEL=Report
    DEST2: DESNAME=C:\Report\test.prn  DESTYPE=File DESFORMAT=prt132.prn COPIES=1 LEVEL=Report  (This option does not work is there any work around to make it work) ]
    I am getting an error. it there any work around for this or there is any other solution.
    Is there any other way i convert my text file to postscript file or viceversa...thanks

    Hi,
    Peter Gjelstrup wrote:
    Next thing is how to use it:
    declare
    k_file constant varchar2(30) := 'YourFile.xls'
    begin
    create_file(k_file);
    -- Call other procedures
    close_file;
    end;
    Don't forget: these procedures are all part of the gen_xl_xml package.
    To call them from outside the package, you have to prefix each procedure name with the package name, like this:
    declare
    k_file constant varchar2(30) := 'YourFile.xls'
    begin
    gen_xl_xml.create_file(k_file);
    -- Call other procedures
    gen_xl_xml.close_file;
    end;

  • USING WEBUTIL TO READ TEXT FILE INTO TABLE HANGS AFTER CERTAIN NUMBER OF RE

    Dear
    when we use webutil to retrieve data from text file into database table
    (using text_io) it hangs after certain number of records ( approx. 1300
    records) while the total number of records to be inserted in the table exceeds
    12000 records while it works properly on forms6i with the normal text_io any
    help please...?
    thanks and regards

    WebUtil uploads the files as Binary - so yes you could have some issues if you have a Unix host - however, that would only mean that there is an extra character to trim off of the end of the line read by Text_io.

  • ResizeImage using dimensions read from text file

    XP Pro
    CS
    1GB Ram
    Javascripting
    Currently have the following code which works great.
    if (largePrefsIsOpen) {
    docRef.resizeImage(289,null);
    I am encountering a problem with trying to put a variable in the dimension area (289,null)
    I am reading a file that contains only the string "289,null" and want to read that into the resize paramaters as follows...
    if (largePrefsIsOpen) {
    docRef.resizeImage(largePrefsContents);
    I can see the value of largePrefsContents is "289,null" minus the quotes but the image is resized to the following pixel dimensions 1 X 7.
    The dimensions are read from a text file and put in the variable "largePrefsContents" but for some reason it is not resizing to that.
    Any help would be greatly appreciated.
    Jeff

    Thank you all very much.
    Paul R's and try67's solution both work.
    I can make this work but there still is an easier way for this - There has to be. :-)
    I would still love to be able to parse as in the original string from the text file "289,null". The reason being is that sometimes the image may be resized based on the height and that would leave the width null (null,289).
    That may not work in those cases because you won't know what is an integer and I have already thought through some lengthier code to make it work, but we all are trying to do the same thing - simpler and fewer lines of code are better.
    I think I would like to parse the list as first suggested by Mark Walsh and then take the advice from Paul R and try67 and work towards a solution for the parsed portions of the text file.
    I really do appreciate your time in looking this over.
    Jeff

  • How to use Client_Host without the exe file path

    Hi,
    i'm using oracle forms 10g,
    in my application the users can upload any type of files (doc,xls,pdf,avi ,.. etc) and any user can download and open any of these files.
    i implement this using client_host and including the path of winword.exe or AcroRd32.exe ,...
    in many cases i don't know where these exe files are installed in the client side or whether it is installed or not.
    i tried this command : client_host('calc.exe') it works and show me the calc without including the path of this exe file.
    what i want to do is to just call the target file(doc,pdf,avi,..) in the client_host without having to precede this with the exe and path like the calc.exe example.
    if you go to start->run and write for example c:\ahmed.mpeg , windows automatically call the real player or any other video software installed and open the movie.
    can we implement this in oracle forms? and how?

    Hi, you attach a procedure to download a file in the local runs from Windows and to close it updates in the database and then delete the local directory
    PROCEDURE OPEN_FILE (V_ID_DOC IN VARCHAR2)
    IS
    -- Open a stored document --
    LC$Cmd Varchar2(1280) ;
    LC$Nom Varchar2(1000) ;
    LC$Fic Varchar2(1280);
    LC$Path Varchar2(1280);
    LC$Sep Varchar2(1) ;
    LN$But Pls_Integer ;
    LB$Ok Boolean ;
    -- Current Process ID --
    ret WEBUTIL_HOST.PROCESS_ID ;
         V_FICHERO VARCHAR2(500);
         COMILLA VARCHAR2(4) := '''';
         BOTON     NUMBER;
         MODO     VARCHAR2(50);
         URL     VARCHAR2(500);
    Begin
         V_FICHERO := V_ID_DOC;
              -- Ruta y nombre del fichero temporal --
              LC$Sep := '\';--WEBUTIL_FILE.Get_File_Separator ; -- 10g
              LC$Nom := V_FICHERO;--Substr( V_FICHERO, instr( V_FICHERO, LC$Sep, -1 ) + 1, 100 ) ;
              --LC$Path := CLIENT_WIN_API_ENVIRONMENT.Get_Temp_Directory ;
              LC$Path := 'C:';
              LC$Fic := LC$Path || LC$Sep || LC$Nom ;
              -- Descargamos el fichero --
              If Not webutil_file_transfer.DB_To_Client
              LC$Fic,
              'TABLE_NAME',
              'ITEM_NAME',
              'WHERE'
              ) Then
              Raise Form_trigger_Failure ;
              End if ;
              -- Abrimos el fichero temporal en local --
              LC$Cmd := 'cmd /c start "" /MAX /WAIT "' || LC$Fic || '"' ;
              Ret := WEBUTIL_HOST.blocking( LC$Cmd ) ;
              LN$But := WEBUTIL_HOST.Get_return_Code( Ret ) ;
              If LN$But <> 0 Then
                   Set_Alert_Property( 'ALER_STOP_1', TITLE, 'Host() command' ) ;
         Set_Alert_Property( 'ALER_STOP_1', ALERT_MESSAGE_TEXT, 'Host() command error : ' || To_Char( LN$But ) ) ;
         LN$But := Show_Alert( 'ALER_STOP_1' ) ;
         LB$Ok := WEBUTIL_FILE.DELETE_FILE( LC$Fic ) ;
         Raise Form_Trigger_Failure ;
              End if ;
              -- Actualizamos el fichero en la BBDD --
         If Not webutil_file_transfer.Client_To_DB
              LC$Fic,
              'TABLE_NAME',
              'ITEM_NAME',
              'WHERE'
              ) Then     
              NULL;     
              Else
                   Commit ;
              End if ;     
         -- Eliminamos el fichero temporal local --
              LB$Ok := WEBUTIL_FILE.DELETE_FILE( LC$Fic ) ;
    Exception
              When Form_Trigger_Failure Then
              Raise ;
    End ;

  • Using JDBC to access text file

    I gotta admit I didn't research it much. this is not like 'Help!!! Urgent!!!' question. I'm just curious. how do you work with tab-delimited files using JDBC? what driver do you need? same question goes for .csv files. I'm doing fine by just using file streams (no JDBC), splitting every line (split method of String class) and storing them in array. just curious. there are 10 shmukes for good answer, 5 for tab delimited and 5 for .csv (shmuke is my equivalent of dukes, they are almost as good (both are worthless)). I'll save dukes until I need some real answers.

    Go over to the JDBC forum and do a search...I recently had a discussion of the particulars of this with thomas.kellerer.
    Basically, you can use the Microsoft Text Driver if you're on a Windows platform. The Text driver gives you the option of defining your delimiter and headers for each file in a directory. The directory is considered the catalog (the database), and each file is considered a separate table. Works very well...I'm incorporating it into a project of mine.
    Good luck!

  • Using filestream without opening the file

    Sir
    I am trying to save a file to the SQL database using the following code. The code runs successfully but the file opens up during the process.
    Dim fs As FileStream
    fs = New FileStream(strFileName, FileMode.Open, FileAccess.Read)
    Dim docByte As Byte() = New Byte(fs.Length - 1) {}
    fs.Read(docByte, 0, System.Convert.ToInt32(fs.Length))
    fs.Close()
    I do not want the file to open. Any suggestion. Please help me
    Regards
    Manoj

    Sir
    I am trying to save a file to the SQL database using the following code. The code runs successfully but the file opens up during the process.
    Dim fs As FileStream
    fs = New FileStream(strFileName, FileMode.Open, FileAccess.Read)
    Dim docByte As Byte() = New Byte(fs.Length - 1) {}
    fs.Read(docByte, 0, System.Convert.ToInt32(fs.Length))
    fs.Close()
    I do not want the file to open. Any suggestion. Please help me
    Regards
    Manoj
    I'll also suggest that you read the file in inside a Using block and you check to be sure that the file's size isn't too large:
    Using fs As New IO.FileStream(filePath, _
    IO.FileMode.Open, _
    IO.FileAccess.Read)
    If fs.Length <= Int32.MaxValue Then
    Dim bytes(CInt(fs.Length - 1)) As Byte
    fs.Read(bytes, 0, CInt(fs.Length))
    ' Now do something with the byte array
    ' just read in. For this example I'll
    ' just write the file to my desk
    Dim desktop As String = _
    My.Computer.FileSystem.SpecialDirectories.Desktop
    Dim fileName As String = _
    IO.Path.GetFileName(filePath)
    My.Computer.FileSystem.WriteAllBytes(IO.Path.Combine(desktop, _
    fileName), _
    bytes, _
    False)
    Stop
    End If
    End Using
    The test is done because of this: The .Length property of a FileStream is a type Long but the .Length
    property of an array is an integer.
    Still lost in code, just at a little higher level.

  • HT204074 2ipads, 2 iPhones, and an iPod touch. All. I manage with one apple ID. How can we get iCloud to have different ID so we both can use it without combining our files?

    How can two family members use iCloud separately with one apple ID?

    Hi Lauracll
    As far as I am aware you cannot split, or use separately. What are you trying to archive by trying to have one Apple ID, but separate? Maybe if you can mention what your aim is, there could be a suggested solution.

  • Is it possible to read/write to text file without deleting it?

    I know how to read from a text file and how to write to a text file. The problem that i have is i need to use a text file to store data for my application to read and also for my application to write. I would like it if i could write two programs really, one reads, the other is used to update the text file. This file is a list of verbs. I thought about using databases but i couldn't get them to work. I downloaded MySQL server 5.0 and installed it. I then downloaded the driver from http://www.mysql.com/products/driver and ran the auto installer. it said everything worked out perfectly but when i try these lines:
    Class.forName("com.mysql.jdbc.Driver");
    I get a SQLException that says no suitible driver
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    ( I thought this driver came with the JDK but i guess not, i just read about it in a java book)
    I get a ClassNotFoundException
    that just says sun.jdbc.odbc.JdbcOdbcDriver
    So yeah, SQL is pretty much not working. I need a solution to my problem, either by using text files, or a different type of database. I heard you could use excel to create a database but i have no idea how and i hear microsoft access could also do this, however i don't have microsoft access and i don't intend on paying for it. So, here are my questions:
    1st, is there a tutorial on using excel databases in java programs
    (if not)
    2nd is there a way to read/write/update a text file without deleting it?
    (if not)
    3rd is there a way to get SQL working, i have windows vista this could be the problem
    (if not)
    4th what could i do to store information on the hd for reading and modifying later?
    thanks, lateralus

    A database might be overkill just for a list of words.
    Thoughts:
    <ul>
    <li>What is the extent of your "file updating"? If you are just appending to the file, opening it in append mode will keep the file from being clobbered.</li>
    <li>Otherwise, why not create new files instead of editting them? The file names could include a version number or timestamp, allowing the reader to select the newest one.
    </li>
    </ul>

  • Using ArrayList to store Lines in a text File

    Hey Guys,
    I have the following program that I am using to read a text file and store each word in each line in an ArrayList. But I am getting the following error;
    Exception in thread "main" java.util.ConcurrentModificationException
         at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:449)
         at java.util.AbstractList$Itr.next(AbstractList.java:420)
         at bus.OrderReader.parseLine(OrderReader.java:50)
         at bus.OrderReader.main(OrderReader.java:32) The code is as follows;
    package bus;
    import java.io.BufferedReader;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.util.Scanner;
    import java.util.Collection;
    import java.util.ArrayList;
    import java.util.Iterator;
    public class OrderReader {
        static Collection bread = new ArrayList();
        static Collection filling = new ArrayList();
        static Iterator iter1 = filling.iterator();
        static Iterator iter2 = bread.iterator();
         private static int counter;
    public static void main(String args[]){
        Scanner s = null;
        try {
            s = new Scanner(new BufferedReader(new FileReader("/Users/admin/Documents/workspace2/OBS/WebContent/WriteMe.txt")));
            s.useDelimiter("\r");
            while(s.hasNext()) {
                parseLine(s.next());
                counter++;
            s.close();
        catch(FileNotFoundException e) {
            System.out.println("cannot find the file");
            //ignore for now
        public static void parseLine(String line) {
            Scanner lineScanner = new Scanner(line);
            lineScanner.useDelimiter("#");
                bread.add(lineScanner.next());
                filling.add(lineScanner.next());
                System.out.println(iter1.next());
                System.out.println(iter2.next());
    }I do not understand why this does not work. Can someone please point me in the right direction?
    Thank You
    Jaz

    Instead of doing this:
    bread.add(lineScanner.next());
    filling.add(lineScanner.next());
    System.out.println(iter1.next());
    System.out.println(iter2.next());where presumably you're just printing what you just
    barely added, do this:
    Object breadObject = lineScanner.next();
    Object fillingObject = lineScanner.next();
    bread.add(breadObject);
    filling.add(fillingObject);
    System.out.println(breadObject);
    System.out.println(fillingObject);
    And get rid of the now unused iterators.Im not sure I understand quiet what is happening here. Are you creating a primitive data type of type Object and then storing all the values in that variable?
    why would I do this when this only allows me to view the very last element that was added to the list? I want to view the entire list.
    Thanks
    Jaz
    Message was edited by:
    DontKnowJack

  • How to open saved files using 'read from text file' function

    Hi everyone, I am having a hard time trying to solve the this particular problem ( probably because I am a newb to lanbview ). Anyway , I am able to save the acquired waveforms by using the 'Write to text file' icon. I did manually modify the block diagram of the 'Write to text file' icon and create the correct number of connector so as to make my program work. But now I have no idea on how to modify the block diagram of the 'Read from text file' block diagram to make my program 'open' my saved waveforms. Or i do not have to modify anything from the block diagram of the 'Read from text file'? Can anyone teach/help me connect up? Do i need the build array on the "open" page?
    Here are some screenshots on part of my program  
    let me know if you guys would need more information / screenshots thank you!
    Attachments:
    ss_save.jpg ‏94 KB
    ss_open.jpg ‏94 KB
    modified_writetotextfile.jpg ‏99 KB

    Ohmy, thanks altenbach. oh yeah i forgot about those sub VIs. will upload them now. Was rather demoralized after reading the comments and really struck me on how weak i'm at on labview really hope to get this done. But of course i have to study through and see how it works. Actually i am going to replace those 'signal generators sub vi' with ThoughtTechonology's sample code so i can obtain data waveforms real-time using Electrocardiography (ECG) ,Electromyography (EMG ) and Electroencephalography (EEG) hopefully i can find out how to connect the sample code.
    ( ps . cant connect it now unless my program is working otherwise labview will crash ) 
    ( p.s.s the encoder of my biofeedback trainer already acts as an DAQ so i wont need to place an DAQ assistant in my block diagram i suppose )
    The sample code of ThoughtTechnology is named as attachment.ashx.vi. too bad i cant use it and present it as my project
    Attachments:
    frequency detactor.vi ‏53 KB
    signal generator.vi ‏13 KB
    attachment.ashx.vi ‏40 KB

  • Align Columns?  using Acrobat Pro 9 to create pdf from text file(s)

    Hello,
    Every time that I have tried to create a PDF from a text file, the columns dont align.  The default Notepad setting I use to view a text file is Courier New which shows the columns aligned.  How can I set defaults in Acrobat Pro 9 to have columns align?
    Thanks

    By definition a plain text file has no font, so it cannot be monospaced. Acrobat converts plain text using Times, this cannot be changed.
    As TSN suggests to create a PDF from a text file with a specific choice of font and formatting you must print from another application.

  • Parsing text files

    I have written a vi that parses data out of text files which makes use of the open text file vi. When I compile the vi to run as a stand alone application, The open file dialogue will only accept .vi files for opening. Why is this?
    Thanks,
    Russ T.

    Without looking into your program, I am going to guess the following:
    If you are using Open/Create/Replace File.vi, wire in "*.txt" to Pattern.
    Hope that helps.
    Shan Pin Koh
    Systems Engineer
    Oakriver Technology

Maybe you are looking for