Java code to get user mapping info

I am writing a Java Servlet that needs to read the username and password to a user mapping system.  Can anyone post a code example that will accomplish this?  I have already been looking through the forums, so please don't post links to other forum entries.

hello Pfister,
   I'll send you one article link , just go thru it ,
you can many examples from basics. if you get any errors just take that error no. which displayed , you can find the solution for that error in the link.
This link you can see one good example:
http://www.onjava.com/pub/a/onjava/excerpt/java_cookbook_ch18/index.html?page=5
Regards,
Varun

Similar Messages

  • Where can I get user mapping info?

    Dear all,
    I have to implement a simple audit report that displays the mapping of an EP user name and the related SAP user name that he/she use during certain time. Where can I get that kind of information?
    Please help.
    Rgds,
    Adhimas

    Hello Adhimas,
    as I answerd you in the other thread I think that you can use the Export Function of the J2EE Usermanagement at http://your-portal/useradmin. You can give also points for this answer ;-).
    Regards
    Gregor

  • How to get the java code of the message mapping

    how to get the java code of the message mapping,
    I mean to ask how to get the background java code of the message mapping(graphical mapping).
    And where to view it?

    Hi Satya,
    The JAVA code for graphical msg mapping is in below folder:
    \usr\sap\<SID>\<DVEBMGS10>\j2ee\cluster\server0\temp\classpath_resolver
    Here all the mapping jars are there in this folder.
    Just decompile these jars and you can see the code.
    Thanks,
    Rajeev Gupta
    Message was edited by:
            RAJEEV GUPTA

  • How to view the java code of the message mapping,

    Hi Experts,
    <b>how to view the java code of the message mapping,</b>
    how to get the background java code of the message mapping(graphical mapping).
    And where to view it?

    Hi sowmya,
    Open any  Message mapping in IR. Press <b>CtrlShift0(zero)</b> to open a new menu.
    There you will find an option "Is Java Source Code Available?"
    There will be an export button nearby. Use it to get the code.
    Open it in a zip , you will see the hide java code.
    The JAVA code for graphical msg mapping is in below folder:
    \usr\sap\<SID>\<DVEBMGS10>\j2ee\cluster\server0\temp\classpath_resolver
    Here all the mapping jars are there in this folder.
    Just decompile these jars and you can see the code.

  • I have a java code that expires user sessions after 30 min.But the session does not expire in Firefox version 4 where as it expires in all previous versions

    I have a java code that expires user sessions after 30 min.But the session does not expire in Firefox version 4 where as it expires in all previous versions

    A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.<br />
    The helpers at that forum are more knowledgeable about web development issues.<br />
    You need to register at the mozillaZine forum site in order to post at that forum.<br />
    See http://forums.mozillazine.org/viewforum.php?f=25

  • Java code to get server info

    Hi,
    How do I get the server info i.e server IP address etc using Java code. Pl. note that this is from the business layer and not from Front end.
    thanks

    hello Pfister,
       I'll send you one article link , just go thru it ,
    you can many examples from basics. if you get any errors just take that error no. which displayed , you can find the solution for that error in the link.
    This link you can see one good example:
    http://www.onjava.com/pub/a/onjava/excerpt/java_cookbook_ch18/index.html?page=5
    Regards,
    Varun

  • JAVA API Personalization iview / User Mapping

    I am using the following code snippet to get the
    User Mapping from the "Personalization" iview
    IUserMappingData iumd = iums.getMappingData (systemalias, iuser);
    Is there a similiar SET method?
    TIA -hs

    hI
    When you use umdata.enrich(map), soon after that, use SET property in the Hash Map and finally call umdata.storeLogonData(Map). This map should contain updated credentials.
    Hope this works.
    Pls reward points if useful
    Murali.

  • Java code for calling xslt mapping in module?

    Hi,
    We have 2 mapping(xslt) in IR
    source->cannonical and cannonical->target
    we want to remove source->cannonical mapping and want to put that in MODULE of communication channel.
    My problem is how to call xslt mapping using java code and we done value mapping their. Did that vallumapping will work in module..
    waiting for responce..its an urgent task..
    thanq
    krishna

    You can use the MessageTransformBean to run the XSLT in the adapter framework:
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3823 [original link is broken] [original link is broken] [original link is broken]
    I do not know, if the value mapping works here. Maybe you just give a try.
    Regards
    Stefan

  • Calling a javascript function from java code and getting tha value in Java

    Hi,
    I would like to call a Java script function confirmRemove() from Java code upon meeting a condition..
    for example the code snippet is:
    if(true){
    // I want to call js confirmRemove() over here. And get the value of variable "answer" in this if block.
    <html>
    <head>
    <script type="text/javascript">
    function confirmRemove() {
         var answer = confirm("Are you sure you want to Delete?")
    </script>
    </head>
    <body>
    <form>...

    Hi,
    Back in 2003 I have used an Applet which contain java code and this java code was calling the java scripts ( different methods, DHTML etc..)
    There was a component developed by NetScape called JSObject I am not sure it there is other third party component other then the JSObject
    look at this article which shows how (based on JSObject)
    [http://java.sun.com/products/plugin/1.3/docs/jsobject.html|http://java.sun.com/products/plugin/1.3/docs/jsobject.html]
    Regards,
    Alan Meio
    London,UK

  • How i can use ExportPDF in java code to get html files as PDF?

    I need to use ExportPDF in java code to export my html to PDF and save that in my local system.

    Yes, it's not a service for automating. Automating Acrobat is a possibility (though awkward), or there are server products.

  • Getting user OID info

    Hello:
    I need to get more info from a user inside a portlet. I can get username and DN from a user that has logged in portal from my portlet, but when I call another fuctions like getFirstName, getLastName or getPropertyValue I always get null values.
    <br><br>
    This is a piece of my code:
    <br><br>
    PortletRenderRequest pReq = (PortletRenderRequest)
    request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    ProviderUser pUser = pReq.getUser();
    <br><br>
    <P> DisplayName = <%= pReq.getUser().getDisplayName() %>.</P>
    <P> FirstName = <%= pReq.getUser().getFirstName() %>.</P>
    <P> DN = <%= pReq.getUser().getUserDN() %>.</P>
    <br><br>
    Only getUserDN() and getName() works. I need to get more attributes from the OID and
    <br><br>
    Another 'extrange' thing is that I see no data (apart from USER_NAME or ID) into the WWSEC_PERSON view. Are this two things related? From PL/SQL I can call wwsec_api.person_info and it works OK, so I suppose that it is connecting to the directory correctly.
    <br><br>
    Thanks in advance,
    Javier.

    We use a procedure that runs every night to refresh the OID data into a table. Then we use the porta.wwctx_api.get_user function to pull information into a portal componet. Here is the procedure code followed by the table code:
    CREATE OR REPLACE PROCEDURE wwsec_pers_closepf_proc2 IS
    BEGIN
         DELETE closepf_person2;
         COMMIT;
              FOR i in (select ID from portal.WWSEC_PERSON$)
              LOOP
         DECLARE
              l_person_ID                number     := portal.wwsec_api.person_info(p_person_id => i.id).ID;
              l_person_USER_NAME      varchar2(256) := portal.wwsec_api.person_info(p_person_id => i.id).USER_NAME;
              l_person_EMPNO                varchar2(30) := portal.wwsec_api.person_info(p_person_id => i.id).EMPNO;
              l_person_LAST_NAME           varchar2(60) := portal.wwsec_api.person_info(p_person_id => i.id).LAST_NAME;
              l_person_FIRST_NAME      varchar2(60) := portal.wwsec_api.person_info(p_person_id => i.id).FIRST_NAME;
              l_person_MIDDLE_NAME      varchar2(60) := portal.wwsec_api.person_info(p_person_id => i.id).MIDDLE_NAME;
              l_person_KNOWN_AS           varchar2(80) := portal.wwsec_api.person_info(p_person_id => i.id).KNOWN_AS;
              l_person_EMAIL                varchar2(256) := portal.wwsec_api.person_info(p_person_id => i.id).EMAIL;
              l_person_WORK_PHONE      varchar2(30) := portal.wwsec_api.person_info(p_person_id => i.id).WORK_PHONE;
              l_person_MOBILE_PHONE      varchar2(30) := portal.wwsec_api.person_info(p_person_id => i.id).MOBILE_PHONE;
              l_person_PAGER                varchar2(30) := portal.wwsec_api.person_info(p_person_id => i.id).PAGER;
              l_person_FAX                varchar2(30) := portal.wwsec_api.person_info(p_person_id => i.id).FAX;          
              l_person_OFFICE_ADDR1      varchar2(60) := portal.wwsec_api.person_info(p_person_id => i.id).OFFICE_ADDR1;
              l_person_OFFICE_ADDR2      varchar2(60) := portal.wwsec_api.person_info(p_person_id => i.id).OFFICE_ADDR2;
              l_person_OFFICE_ADDR3      varchar2(60) := portal.wwsec_api.person_info(p_person_id => i.id).OFFICE_ADDR3;
              l_person_OFFICE_CITY      varchar2(30) := portal.wwsec_api.person_info(p_person_id => i.id).OFFICE_CITY;
              l_person_OFFICE_STATE      varchar2(30) := portal.wwsec_api.person_info(p_person_id => i.id).OFFICE_STATE;
              l_person_OFFICE_ZIP      varchar2(30) := portal.wwsec_api.person_info(p_person_id => i.id).OFFICE_ZIP;
              l_person_OFFICE_COUNTRY varchar2(256) := portal.wwsec_api.person_info(p_person_id => i.id).OFFICE_COUNTRY;                                        
              l_person_TITLE               varchar2(80) := portal.wwsec_api.person_info(p_person_id => i.id).TITLE;
              l_person_MANAGER           number     := portal.wwsec_api.person_info(p_person_id => i.id).MANAGER;
              l_person_DEFAULT_GROUP      number          := portal.wwsec_api.person_info(p_person_id => i.id).DEFAULT_GROUP;
              l_person_PMO_GROUP          boolean          ;--:= portal.wwsec_api.is_user_in_group(p_person_id => i.id, p_group_id => (23));
              l_person_GUID               varchar2(32);     
              v_pmo_group                    varchar2(5);
              CURSOR get_guid IS
                   SELECT guid
                   FROM orasso.wwsec_person$
                   WHERE user_name = l_person_USER_NAME;
         BEGIN
              OPEN get_guid;
              FETCH get_guid INTO l_person_GUID;
              CLOSE get_guid;
              IF l_person_PMO_GROUP = TRUE THEN
                   v_pmo_group := 'TRUE';
                   ELSE v_pmo_group := 'FALSE';
              END IF;     
              INSERT INTO acquisitions.closepf_person2 (
                   id,
                   user_name,
                   empno,
                   last_name,
                   first_name,
                   middle_name,
                   known_as,
                   email,
                   work_phone,
                   mobile_phone,
                   pager,
                   fax,
                   office_addr1,
                   office_addr2,
                   office_addr3,
                   office_city,
                   office_state,
                   office_zip,
                   office_country,
                   title,
                   manager,
                   default_group,
                   guid,
                   pmo_group)
              VALUES      (
                   l_person_ID,
                   l_person_USER_NAME,
                   l_person_EMPNO,
                   l_person_LAST_NAME,
                   l_person_FIRST_NAME,
                   l_person_MIDDLE_NAME,
                   l_person_KNOWN_AS,
                   l_person_EMAIL,
                   l_person_WORK_PHONE,
                   l_person_MOBILE_PHONE,
                   l_person_PAGER,
                   l_person_FAX,
                   l_person_OFFICE_ADDR1,
                   l_person_OFFICE_ADDR2,
                   l_person_OFFICE_ADDR3,
                   l_person_OFFICE_CITY,
                   l_person_OFFICE_STATE,
                   l_person_OFFICE_ZIP,
                   l_person_OFFICE_COUNTRY,                                                                                                     
                   l_person_TITLE,     
                   l_person_MANAGER,
                   l_person_DEFAULT_GROUP,
                   l_person_GUID,
                   v_pmo_group);                                                                      
                   EXCEPTION WHEN NO_DATA_FOUND
                        THEN
                             EXIT;
                   COMMIT;
         END;
         END LOOP;
    END;
    CREATE TABLE CLOSEPF_PERSON2
    ID NUMBER NOT NULL,
    USER_NAME VARCHAR2(256),
    EMPNO VARCHAR2(30),
    LAST_NAME VARCHAR2(60),
    FIRST_NAME VARCHAR2(60),
    MIDDLE_NAME VARCHAR2(60),
    KNOWN_AS VARCHAR2(80),
    EMAIL VARCHAR2(256),
    WORK_PHONE VARCHAR2(30),
    MOBILE_PHONE VARCHAR2(30),
    PAGER VARCHAR2(30),
    FAX VARCHAR2(30),
    OFFICE_ADDR1 VARCHAR2(60),
    OFFICE_ADDR2 VARCHAR2(60),
    OFFICE_ADDR3 VARCHAR2(60),
    OFFICE_CITY VARCHAR2(30),
    OFFICE_STATE VARCHAR2(30),
    OFFICE_ZIP VARCHAR2(30),
    OFFICE_COUNTRY VARCHAR2(256),
    TITLE VARCHAR2(80),
    MANAGER NUMBER,
    DEFAULT_GROUP NUMBER,
    GUID VARCHAR2(32),
    LASTUPDATED DATE DEFAULT sysdate,
    USER_LOGIN VARCHAR2(5)
    Thanks,
    Martin

  • Trigger code to get user and sysdate

    hi all
    I am a beginer in sql. I am writing a trigger to get the value of the sysdate and user to be inserted in my table in the following
    fields
    created_date
    update_date
    created_by
    updated_by
    my code is as follows:
    Please advice me what is wrong and how i can correct it
    BEGIN
    IF INSERTING THEN
    INSERT INTO MI_AGENT_COMMISSION_TYPE
    VALUES (CREATED_DATE, CREATED_BY,:USER, :SYSDATE);
    ELSIF UPDATING THEN
    INSERT INTO MI_AGENT_COMMISSION_TYPE
    VALUES (UPDATED_DATE, UPDATED_BY,:USER, :SYSDATE);
    END IF;
    END IF;
    end;

    ELSIF is correct.
    The correct syntax is:
    CREATE OR REPLACE TRIGGER tr_MI_AGENT_COMMISSION_TYPE
    before update or insert on MI_AGENT_COMMISSION_TYPE
    for each row
    BEGIN
    IF INSERTING THEN
    :new.CREATED_DATE := sysdate;
    :new.CREATED_BY := user;
    ELSIF UPDATING THEN
    :new.UPDATED_DATE := sysdate;
    :new.UPDATED_BY := user;
    END IF;
    end;

  • Java code to get the difference between two dates in days

    Hi ppl,
    I need to write a user defined function to get the difference between two date nodes, in days.Please help me out
    regards,
    Prashanth

    Hi,
    have a look at those two:
    (How do I calculate the difference between two dates?)
    http://joda-time.sourceforge.net/faq.html
    Calculating the Difference Between Two Datetime Stamps
    http://www.xmission.com/~goodhill/dates/deltaDates.html
    Get difference in days
    http://javaalmanac.com/egs/java.util/CompDates.html
    Regards,
    michal

  • Exe running from java fails to get user input .Help me...

    I have an DOS based exe.It just asks for input for a number from the user and prints the number it gtes.
    When I try to execute this program from Java with the following code
    import java.lang.Runtime;
    import java.lang.Process;
    import java.io.*;
    public class runtimetest     {
         public static void main(String[] args)     throws Exception {
              Runtime rt = Runtime.getRuntime();
              Process p = rt.exec("myExe");
    nothing happens.Thatis It doesnot ask for the input .and I am just unable to know whether its running or not.
    What could be wrong?
    What is the other means to tun the DOS based exe that accepts user inputs , from Java.
    Plz help me as I am in urgent need.
    Aathi

    try this
    Runtime r = Runtime.getRuntime();
              Process p = null;
              try
                   System.out.println("Exe will be called");
                   p = r.exec("cmd.exe /c start c:/ur exe path ");
                   p.waitFor();
              catch (Exception e)
                   e.printStackTrace();
              }

  • Java code to get integer values from a gridLayout to put into an array?

    I am writing a tictactoe game for a programming class. I made a grid of 3x3 layout and it alternates between putting an X when clicked and an O. I need to know how to retrieve what button off the grid was picked so I can create an array to check for win conditions...Or how to access the rowIndex and columnIndex of a selected button on the grid
    Thanks in advance
    Edited by: ryAnOnFire on May 23, 2010 6:10 PM

    import java.awt.*;
    import java.awt.Container;
    import javax.swing.*;
    import java.awt.event.*;
    public class TicTacToe
         JFrame theWindow;
         JButton theButton;
         Container thePane;
         JTextField theText;
         MyListener theListener;
         public JButton[][] grid = new JButton[3][3];
         public TicTacToe()
              theWindow = new JFrame("Tic Tac Toe");
              theWindow.setSize(250, 250);
              String empty = " ";
             theListener = new MyListener();
              JFrame frame = new JFrame("TicTacToe");
              Container thePane = theWindow.getContentPane();
              thePane.setLayout(new GridLayout (3,3,5,5));
              for(int i = 0; i < 3; i++)
                   for(int j =0; j < 3; j++)
                        grid[i][j] = new JButton(empty);
                        thePane.add(grid[i][j]);
                        grid[i][j].addActionListener(theListener);
              JButton blankSpot = new JButton(empty);
              blankSpot.setFont(new Font("Papyrus", Font.BOLD, 35));
              theWindow.setVisible(true);
         public static void main(String[] args)
              new TicTacToe();
    class MyListener implements ActionListener
              String[][] spots1 = new String[3][3];
              String[][] spots2 = new String[3][3];
              static int playerTurnCounter = 0;
               JButton[][] grid; // !! added
                // !! added
                public MyListener(JButton[][] grid)
                     this.grid = grid;
              public void actionPerformed(ActionEvent e)
                   JButton jb = (JButton)e.getSource();
                   if(playerTurnCounter % 2 == 0)
                        jb.setText("X");
                        for(int i = 0; i < grid.length; i++)
                             for(int j = 0; j < grid.length; j++)
                                  spots1[i][j] = grid[i][j].getText();
                        if((spots1[0][0].equals("X")))
                             JOptionPane.showMessageDialog(null, "TICTACTOE", "WIN", JOptionPane.PLAIN_MESSAGE);
                        //The problem seems to be occuring in the above block commented area
                   else
                        jb.setText("O");
                   jb.setEnabled(false);
                   playerTurnCounter ++;
    Compiler Error:
    C:\Documents and Settings\HP_Administrator\My Documents\TicTacToe.java:24: cannot find symbol
    symbol  : constructor MyListener()
    location: class MyListener
             theListener = new MyListener();
                           ^
    1 error
    Tool completed with exit code 1
    I'm just going to let you ponder over this as I do too...
    I have no idea...my minimal experience with ActionListeners is doing me nothing for this one.
    Edited by: ryAnOnFire on May 23, 2010 8:12 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • New install of Captivate 7 won't open

    I just installed Adobe Captivate 7 on my Mac. [8 gig of memory, Intel, OS X 10.9] It jumps as though it wants to start but doesn't. Any advice? I've rebooted after installing. Removed and reinstalled again. no go I used a CD. Maybe I should download

  • Is it safe to delete ALL caches and/or receipts?

    is it safe to delete ALL files and folders under "user/library/caches"? I was surprised to see how big it has gotten. and is it safe to delete "macintosh hd/library/caches"? how about receipts located in "user/library/receipts" and/or in "macintosh h

  • No userstore Active in trc file

    Hi all, i need some big help here.. im upgrading my Java server from 640Sp19 to 7.0sp13.. ( the installation default is SP9 then i have put it SP13 to the epsinbox of the jupgrade ) my Os is Aix 5.3ML6 my DB ora 10.2.0.2 now my jupgrade is in START_J

  • HR instance seperation

    Hi, Is anyone has knowledge about HR instance speeration. My client want s to go for one seperate HR instance. Please send me some relevant details or docments if someone have. Points will surely be rewarded Thanks in advance Mukesh

  • Mexico / ipad usage?

    Going to Mexico, Cabo, is there a "sim card" option like Europe (Italy, Vodafone - $.93/day)?