How to add users to the container

Hi,
My JSF application has security enabled. The users and their roles are defined in a .xml file located in my container (standard). Is there any way I can dynamically add users to this .xml file? Right now I am able to add them manually, but it would be nice if they were added as soon as they joined my service.
Best Regards
Thomas

There is always some way ...
Most app servers will support custom login modules via the JAAS "LoginModule" interface. Glassfish has built-in modules for file, LDAP, certificate store and solaris authentication, but you can plug-in others. There is an article and sample for how to do this for a database at <http://dev2dev.bea.com/pub/a/2003/04/Pijpops.html> (targeted at BEA, but Glassfish, etc should be the same).
Using a database or LDAP directory to store your users means there are plenty of standard tools for manipulating and managing the data, and any updates will be available immediately to your app server.
If you want to stick to with the file module, you can obviously update the file directly, but then the app-server or domain might need a restart before your new users get picked up, and also if the file stores the passwords hashed, you have to know the particular hashing algorithm used. Otherwise, each app server usually exposes the admin functionality (like adding users) through some web-service or EJB interface -- but this tends to be app-server specific. Your app server docs should give more details.
What app server and version are you using? Glassfish? JBoss?

Similar Messages

  • How to add user defined tab in the Header level of T-Code O4NM?

    How to add user defined tab in the Header level of  T-Code O4NM?
    I tried with BADI but I cant able to find any BADI for it and also searched for screen exit too..

    Can you check the user exits,
    OIJNOM_N and OIJTKT_N
    Cheers,
    Balaji

  • How to add spaces at the end of record

    Hi Friends,
    i am creating a file which contains more than 100 records.
    In ABAP i have internal table with on field(135) type c.
    some time record have length 120, somtime 130 its vary on each record.
    but i would like to add space at the end of each record till 135 length.
    Can you please help me how to add speace at the end of record.
    regards
    Malik

    So why did you said that in your first posting? My glass sphere is out for cleaning...
    Instead of type c use strings and add spaces until they have the appropriate length.
    loop at outtab assigning <pout>.
      while strlen( <pout>-val ) < 135.
        concatenate <pout>-val `` into <pout>-val.
      endwhile.
    endloop.

  • How to add users from person or group field in a sharepoint list to sharepoint group

    Hi,
    How to add users(single or multiple) from person or group field in a sharepoint list to sharepoint group programmatically?
    Any suggestions would be appreciated.
    Thank you,
    AA.

    Hello,
    Use SPGroup.AddUser() method to add user in group. I have just written sample code in notepad so it is not tested:
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using(SPSite Site = new SPSite(SPContext.Current.Site.Url))
    Using(SPWeb Web = Site.OpenWeb())
    SPList list = web.Lists["ListName"];
    SPQuery query=new SPQuery ();
    query.Query = "<Where><Eq><FieldRef Name='Title' /><Value Type='Text'>Test</Value></Eq></Where>";
    SPListItemCollection items = list.GetItems(query);
    if(items.Count > 0)
    foreach(SPListItem item in items)
    //Get USers from person or group column
    SPFieldUser userField = (SPFieldUser)item.Fields.GetField("Users");
    SPFieldUserValueCollection userFieldValueCollection = (SPFieldUserValueCollection)userField.GetFieldValue(item["Users"].ToString());
    SPGroup spGroup = spSite.RootWeb.Groups[groupName];//group name
    if (users.Count != 0)
    bool isUserInGroup = false;
    foreach (SPFieldUserValue user in users)
    foreach (SPUser item in spGroup.Users)
    string itemUserName = item.LoginName;
    string UserName = user.User.LoginName;
    if (itemUserName == UserName)
    isUserInGroup = true;
    break;
    if (!isUserInGroup)
    spGroup.AddUser(user.User);
    The above code will query list item and then get users from "Users" column. Now it will check whetehr user is already in group not, if not then add user in group.
    http://rajanijilla.blogspot.sg/2012/09/add-users-to-group-programmatically.html
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to add users to group which is present in another AD domain?

    Hi,
    Using JNDI how to add user as a member of group which is present in another AD domain?
    For example: In AD forest test.com their are two domain a.test.com and b.test.com. Group is present in a.test.com and I want to add user present in b.test.com as a member of the group.
    Any pointer around this would be great help.

    See the below link to get an idea on group types.
    http://technet.microsoft.com/en-us/library/cc755692(v=ws.10).aspx
    If the group is a universal group, you can just add members similar to local group even if user and group are in different domains. That is by setting the member attribute of the group.

  • Add users to the James Server Dyanamically

    Hi,
    How to add users Dynamically with out using telnet in James.
    I have to add the E-mail account in James Server through Program or Script any
    Is it possible? Helppppppp!!!
    Thanks,
    Ram

    Hello,
    You have to create a new alert for that user C or delete existing one and create new one for all. Ultimately all single alert will be part of collection so there is no harm to create multiple alerts.
    Refer this for your info:
    http://social.technet.microsoft.com/Forums/en-US/57c5c448-a3ef-4b2e-a1d9-3aaa99559277/is-it-possible-to-add-a-user-to-an-existing-user-alert-in-sharepoint-2010
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • HT5654 how to add videos to the ipad using the latest version of itunes

    how to add videos to the ipad using the latest version of itunes ?

    Hello zaraa90,
    After reviewing your post, I have located an article that can help with syncing content. It contains a number of troubleshooting steps and helpful advice for the issue you are experiencing:
    Sync your iPhone, iPad and iPod with iTunes using USB
    Thank you for contributing to Apple Support Communities.
    Cheers,
    BobbyD

  • I put a Spry Tabbed Panel obj in my site at...how I centered it, to the container div width?

    I put a Spry Tabbed Panel obj in my site at
    http://l-web-dev.net/
    how I centered it, to the container div width?

    Add this to your document:
    <style type="text/css">
    <!--
    #content .story .myTabbedPanels {
        margin-right: auto;
        margin-left: auto;
        width: 550px;
    -->
    </style>
    Then change the following line
      <div class="story" style="width:550px;">
    to
      <div class="story myTabbedPanels">
    At a later stage you could add the style rules for myTabbedPanels to /styles/css-styles.css after having removed it from this document.
    That is it.
    Ben

  • How to add users to OSM using UserAdmin.xsd

    Hi,
    Can you please explain me how to add users to OSM using UserAdmin.xsd i.e xml import/export tool. I need the steps how to do that..
    Thanks in Advance,
    Menaka

    Hi Razvi444,
    You need to use submit data to web service in Submit button rule,where you can use above web service.
    Refer http://office.microsoft.com/en-in/infopath-help/submit-form-data-to-a-web-service-HA010107048.aspx more details
    Thanks

  • I have itunes on a mac with 2 users but the library only shows on the main user how can both users have the same library?

    i have itunes on a mac with 2 users but the library only shows on the main user how can both users have the same library?

    Hi,
    Have a Look at these Links on Home Sharing:
    http://support.apple.com/kb/HT4620
    http://support.apple.com/kb/HT3819
    Could be what you need...
    Cheers,

  • I have set up different use accounts on my I mac how can other users share the music stored in my I tunes

    I have set up different user accounts on my I mac how can other users share the music stored in my I tunes

    iTunes: How to share music between different accounts on a single computer

  • How to add marker on the clip?

    Hi!!!
    Could you help me, how to add marker on the clip? Not on the sequence. I need the marker to moving as I moving clip in the sequence.
    Thanks!!!

    Ohhh... I just had to switch to the source monitor. OK. Just I don't use the source monitor usally. Only the program one. Thank you. It worked!
    Fri, 12 Oct 2012 05:02:08 -0600 от Jim Simon <[email protected]>:
    >     
    >
        Re: How to add marker on the clip?
        created by Jim Simon in Premiere Pro CS5, CS5.5, & CS6 - View the full discussion

  • How to add request in the buffer

    Hii All,
    How to add request in the buffer in bulk.
    i am using following command.
    tp addtobuffer requestno <sid>
    but after doing it is giving me the following error
    C:\usr\sap\trans\bin>tp         addtobuffer     BWDK900161      BT1
    ^CThis is tp version 340.07 (release 640, unicode enabled)
    E-TPSETTINGS could not be opened.
    EXIT
    ERROR: System : Parameter SAPEVTPATH not set. Batch jobs cannot be started.
    Error in TPSETTINGS: transdir not set.
    tp returncode summary:
    TOOLS: Highest return code of single steps was: 0
    ERRORS: Highest tp internal error was: 0208
    tp finished with return code: 208
    meaning:
      error in transportprofil (param missing, unknown,...)
    Pls help.
    Regards,
    Viren.

    Hi Rolf,
    thax for your reply.
    But still it is not working it shows following message.
    C:\usr\sap\trans\bin>tp addtobuffer BWDK900051 BT1 pf=c\usr\sap\trans\bin\TP_DOM
    AIN_BT1.PFL
    This is tp version 340.07 (release 640, unicode enabled)
    E-c\usr\sap\trans\bin\TP_DOMAIN_BT1.PFL could not be opened.
    EXIT
    ERROR: System : Parameter SAPEVTPATH not set. Batch jobs cannot be started.
    Error in c\usr\sap\trans\bin\TP_DOMAIN_BT1.PFL: transdir not set.
    tp returncode summary:
    TOOLS: Highest return code of single steps was: 0
    ERRORS: Highest tp internal error was: 0208
    tp finished with return code: 208
    meaning:
      error in transportprofil (param missing, unknown,...)
    Regards,
    Viren.

  • How to add filter in the dist. model

    hi,
    how to add filter in the dist. model
    thanks
    Ruban

    Hi,
    Please try this.
    1. Go to transaction BD64.
    2. Click on Change button.
    3. Expand the corresponding model view.
    4. Expand the corresponding message type (i.e MATMAS).
    5. Place the cursor to 'No filter set' and double click.
    6. Click on Create Filter Group.
    7. Add your filter from here ...
    8. Once done, save the model view.
    For more information, please check this link.
    http://help.sap.com//saphelp_470/helpdata/EN/0b/2a611c507d11d18ee90000e8366fc2/frameset.htm
    Regards,
    Ferry Lianto

  • How to add Acrobat to the Microsoft Office ribbon?

    how to add Acrobat to the Microsoft Office ribbon?

    Hi ebender888,
    What versions of Acrobat and Office do you have? See if this post helps: https://answers.acrobatusers.com/Why-Acrobat-PDFmaker-Office-COM-Addin-tab-disappearnig-Wo rd-Office-2013-q152959.aspx
    If not, let us know what software you're using, and we'll try to get you pointed in the right direction.
    Best,
    Sara

Maybe you are looking for

  • Issu for running insert statement in oracle procedure.

    Hi expert, I ran a oracle procedure with a insert statement inside as: insert into table1 select.... but I got error message related to this insert statement as "SQLERRM= ORA-08103: object no longer exists" I ran this statement separately in toad, no

  • Problem in output file in unicode system

    Hi , When we are downloading data from SAP to application server(Unix system) the output xml file contains # symbol in the begining of the file. we are using 'Open data set dataset name for output in textmode encoding non unicode'. we have upgraded f

  • Converting Analog to Digital

    Hi, Really quick - what's the best option for getting video via my DVD player into FCP - an analog capture card or an external converter (the ones I've seen are USB 2.0? Thanks, Craig

  • Need Database Views for these categories.

    Dear Experts, I need Database Views to get data for the following categories. <b> Historical production Historical consumption Historical inventory Historical procurement. </b> Thanks in Advance.

  • Right or Wrong? help: user account short name has Capital First Letter

    Hello I have the same issue as a post in the Mountain Lion discussion group.  It doesn't seem to be getting an answer.  So I thought I would post it here, being that I do have Snow Leopard. The Mountain Lion post is here: https://discussions.apple.co