How to invalidate a session based on the session id

How to invalidate a session based on the session id

You have to write your own support for this.
It used to be in the API, but was deprecated as a security hole.
The best way to do it is implement a session listener (javax.servlet.http.HttpSessionListener) which notifies you when sessions are created/destroyed.
You can then keep a map of sessions in your own code, indexed by session Id, and access any/all of them to invalidate as you choose.

Similar Messages

  • How to create a record based on the name of a file in the file-system?

    Hi,
    With a lot of pictures I want to have a database to gather some information about these pictures.
    First question is how to generate a record based on a file in the file system?
    e.g. the pictures are "c:\fotos\2009\01\disc_001.jpg" to "c:\foto\2009\01\dis_98.jpg" .
    now i want to create records with as one of the attributes the name of the picture (not the picture itself). how to create these records (based on the information of the file-ssytem). i.e. the number of records should be the same as the number of pictures.
    any suggestions?
    any reaction will be appreciated.
    Leo

    Link to Create directory
    http://www.adp-gmbh.ch/ora/sql/create_directory.html
    You can create a list of files in the directory and read the list files from that directory.
    [UTL_FILE Documentation |http://download.oracle.com/docs/cd/B14117_01/appdev.101/b10802/u_file.htm#996728]
    [Solution using Java|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584]
    SS

  • How to redirect a JSP page after the session is killed

    Hello!
    I am quite new to JSP. I have a question about how to redirect a jsp page after the session is killed. Could anyone help?
    thanks a lot in advance!

    You can't, directly. There's no connection betweenthe server and browser.
    even after invalidating the session. we can do it
    directly using the statement
    response.sendRedirect("....");
    or we can use the meta refresh tag.if session is invalidated and if we try to do response.sendRedirect(".. ") it throws IllegalStateException

  • How to change datasource name based on the partition in configplan

    Hi
    Can any one please give me some solutions regarding how to change datasource name based on the partition in
    configplan.
    can't we do this in configuration plan?

    If you want to change template based on parameter. you have to use below syntax
    v_layout boolean
    V_LAYOUT:= FND_SUBMIT.add_layout(template_appl_name => 'SQLAP' -- application short name
    ,template_code => 'HUBAPAPN' -- template name
    ,template_language => 'en'
    ,template_territory => '00'
    ,output_format => 'PDF');
    Above can be used in plsql stored procedure before submitting Concurrent Program (Bi Publisher report) or may be you can try to add this code in Oracle reports after report or before report trigger
    Thanks
    Kamalakar

  • How can i check that who end the session

    Hi to all ,
    my query is that how can i check that who end the session.
    through SM04 user who have the authontication can end the session so how can i check that who end the session being a BASIS admin.
    Thanks & Regards

    It's wrotes in system log, check in sm21.
    Regards.

  • How does c:url tag know when the session is cookieless and thus to redirect

    i have been looking at the source code for c:url tag and can't figure out how they are doing that. I need a way to do that in a jsp, to check if the cookies are allowed or not.

    how does c:url tag know when the session is cookieless and thus to redirecthuh?
    What do cookies have to do with redirecting?
    Cookies get encoded into a URL using the method in HttpServletResponse: response.encodeURL() or encodeRedirectURL().
    That method determines whether or not it prints out the session id as part of the url, or it gets uses cookies.
    You can try: request.isRequestedSessionIdFromCookie().
    If that is true, you know that session cookies are supported (or at least that one was)

  • How to handle vendor discounts based on the qty / value procured.

    Hello
           How to handle vendor discounts based on the qty / value procured.
    a.       Scenario: you have entered into a contract with vendor that you will buy goods worth Rs 10000/- and if you buy goods worth more than 100000 the vendor says he will give a discount of Rs 5000/- @ the end of the year.  
    i)                    How to handle this sceneriou2019s with SAu2019s
    ii)                   What does STD SAP offer.
    Regards
    Sapman man

    Hi,
    For the discucount condition type, you have to maintain scales.
    Take Condition type -  Discount Value ( RB00)
    Discount Value ( RB00) - Means Fixed discount. For this condition type, you have to maintain Scale basis as Value scale 'B' in the condition type customization.
    Transcation : M/06
    Select your condition type RB00 and click on the details icon.
    In the Scales block, you have to maintain and save.Calculation type = Fixed amount
    Scale basis = Value scale 'B'
    For this condition type, you have to maintain scales in the inforecord.
    Transcation : ME12
    Select this condition type, click on the Scales icon. There you have to maintain like
    From : 10,0000            Rate: 5000.
    It means, if the document value is reached 10,0000 then discount is 5000rs. If the value islessthen the 10,0000 then no discount.
    Regards
    KRK

  • How to render web items based on the authorisation profile of the user

    Hello,
    Is there any way to render web items based on the authorisation profile of the user. The only way i can think of is:
    - Write ABAP to look up into the security mapping tables.
    - Convert the ABAP report into RFC-Enabled FM. The selection variables will be part of the import/export parameters of FM and table can be used to display the result.
    - Create HTML template using WAD, write Java Script to call the FM and map the import/export parameter. Display the result in Table.
    But i don't know How to use the Java Script to call Function Module (FM) and get back the authorization through parameter.
    Is anyone know about it or is there any other method to do it? I can't find any solution and it is very critical for me.
    Any help is highly appreciated.
    Rajat

    Hi Rajat,
    Do you mean that you want certain users to be able to use only certain web items? I think you can use the libraries for that and assign them to roles:
    http://help.sap.com/saphelp_nw04/helpdata/en/4e/0f813b420ce60ee10000000a114084/content.htm
    Hope this helps...

  • How to create a shape based on the shape of an image

    I want to erase a portion of a mask based on the shape of an image. how can i do this? btw how to create a circle? thx

    Both your questions leave room for imagining what you might really mean, but here's a shot at answering them.
    If you have a mask that you want to erase portions of based on an image... assuming the mask is a simple rectangle you drew with the rectangle tool, change the opacity of the rectangle's fill in the color panel to make it see-thru, place the mask over the image, and using the eraser tool, erase the portions of the mask that you do not intend to retain using the image below it as a guide.
    As for drawing a circle, hover over the rectangle tool and a menu should appear.  Select the oval/ellipse tool.  To draw a circle, hold down the shift key and draw just as you did for the rectangle.  The shift key forces it to retain equal width and height.

  • How to create a report based on the selection of a node of a tree

    Hello,
    I am new to Oracle Apex and I was trying to build a tree and also an interactive report based on the empno column of the emp table.
    I have created a tree based on emp table. Now I want to display records of the employee selected in the tree.
    Here is the tree query:
    select case when connect_by_isleaf = 1 then 0
    when level = 1 then 1
    else -1
    end as status,
    level,
    "ENAME" as title,
    null as icon,
    "EMPNO" as value,
    null as tooltip,
    null as link
    from "#OWNER#"."EMP"
    start with "MGR" is null
    connect by prior "EMPNO" = "MGR"
    order siblings by "ENAME"
    Can anyone tell me step by step how to go from here?
    I tried to follow the thread Re: tree question but could not understand much from it.

    The approach for reloading the page and displaying the report is quite simple.
    <li>You start by creating a new page item which would be used to store the selected node ID , eg. P100_SELECTED_NODE (you can make it atext item and change it hidden once everything works as expected)
    <li>Modify the tree query and change the link column in the tree definition SQL query to a link to the same
    for example if your page is 100 , you would make the tree node link to the same page but set the P100SELECTED_NODE with selected node's id_
    This done here
    {message:id=4410987}
    In this case it would be
    'f?p=&APP_ID.:100:'||:APP_SESSION||'::::P100_SELECTED_NODE:'||EMPNO as link Now when you click on a tree node link , it would come back to the same page, but set the P100_SELECTED_NODE with the empno of the clicked node.
    <li> All that is left to do, is changing your Report so that it refers to the new item inorder to filter the records for this employee i.e empno
    SELECT ...
    WHERE empno= :P100_SELECTED_NODE

  • How to open a form based on the the parameter in another Form

    I created a button in a form (FORM1). By clicking this button, I want to open another form (FORM2) based on the a value of one key field in this form(FORM1). Both forms have the same key field.
    So, I wrote the following codes behind the PL/SQL Button Event Handler of the custom event for the button that I created in FORM1.
    v_inventory_num:=p_session.get_value_as_NUMBER(
    p_block_name => "_master_block",
    p_attribute_name => 'A_INVENTORY_NUM',
    p_index => 1
    if v_inventory_num is not null then
    portal30.wwa_app_module.set_target('/pls/portal30/PORTAL.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=5958032800&p_arg_names=_show_header&p_arg_values=YES&p_arg_names=A_INVENTORY_NUM&p_arg_values='||v_inventory_num,'CALL');
    end if;
    end;
    I could not open the FORM2 by clicking the button on FORM1.
    However,I can open the FORM2 by click the button by using the following code.
    portal30.wwa_app_module.set_target('/pls/portal30/PORTAL30.wwa_app_module.new_instance?p_moduleid=5958032800','CALL');
    How could I pass the parameter in FORM1 into FORM2 and when the FORM2 is opened if has already been queried with the passed parameter?
    Your help would be highly appreciated!
    Jeffrey Wei Ye

    Hi:
    Thank you for reply to my question.
    I have tried your codes and apply them the following the form. However, I always got the following error:
    Error: (WWV-00000)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    My codes is:
    declare
    request_no number;
    blk varchar2(30) := 'DEFAULT';
    l_url varchar2(4000);
    begin
    request_no := p_session.get_value_as_NuMBER(
    p_block_name => blk,
    p_attribute_name => 'A_WORK_REQUEST_ID');
    l_url := 'portal30.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=11880470335&p_arg_names=_sessionid&p_arg_values=&p_arg_names=work_request_id&p_arg_values='||request_no;
    portal30.wwa_app_module.set_target(l_url,'call');
    end;
    then,
    I created another form which has two fields and the dattype of pk is varchar2 and change manually put the pk's p_arg_value into the url.
    e.g.
    l_url:='PORTAL30.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=9029417810&p_arg_names=WORK_AREA_CD&p_arg_values=APP';
    portal30.wwa_app_module.set_target(l_url,'call');
    However, I still get the error message as below:
    Error: (WWV-00000)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    Your help would be highly appreciated.
    Wei Ye

  • How do I close a connection when the session ends?

    I have a website that is using JavaMail to display a user's mail through the browser. I'd like to keep the connection to the mail server open during the whole session that the user is logged in, in order to improve response time. The problem is, I can't detect if a user closes their browser so that I can close the connection to the server.
    Is there a way for me to close the mail server connection when the session ends?
    Thanks.

    Create session listener, Impliment sessionDestryoyed
    method with your connection close statements.I was wondering how to use the listener for a Servlet as well, what would you type in that method to close the connection?.
    public class ServletListener
         implements
              ServletContextListener,
              ServletContextAttributeListener,
              HttpSessionListener,
              HttpSessionAttributeListener
    public void sessionDestroyed(HttpSessionEvent arg0)
              //System.out.println( arg0 );
    }

  • How to search to files based on the metadata of the category in CS

    Hi,
    Can any one tell me how to search the files in the content services based on the metadata of the Category,I know how to search based on the Category using
    public static void attributSearch(String searchString)
    throws FdkException, RemoteException, Exception
    // get the Manager instances
    SearchManager sem = s_WsCon.getSearchManager();
    CategoryManager cat = s_WsCon.getCategoryManager();
    CommonManager cm = s_WsCon.getCommonManager();
    FileManager fm = s_WsCon.getFileManager();
    Item folder = fm.resolvePath("/idc/workspaces/BoardMembersProject", null);
    AttributeRequest[] catAttr =
    WsUtility.newAttributeRequestArray("ProjectCategory");
    // create AttributeRequest to retrieve CATEGORIES attribute
    AttributeRequest[] catClassAttr = WsUtility.newAttributeRequestArray(
    Attributes.CATEGORIES, catAttr);
    // define search options
    NamedValue[] nv = WsUtility.newNamedValueArray(new Object[][] {            
    { Options.SEARCH_VERSION_HISTORY, Boolean.TRUE },
    { Options.RETURN_COUNT, new Integer(100)
    // get search expresiion
    SearchExpression seExp = new SearchExpression();
    // searchString ="ProjectCategory";
    Item[] item = cat.getRequiredCategories(folder.getId(),catClassAttr);
    seExp = new SearchExpression();
    NamedValue[] attributes = item[0].getRequestedAttributes();
    seExp.setOperator(FdkConstants.OPERATOR_HAS_CATEGORY);
    seExp.setRightOperand("["+item[0].getName()+"]");
    // search documents
    NamedValue[] result = sem.search(seExp, nv, null);
    // search result display
    for (int i = 0; i < result.length; i++)
    if (result.getName().equals(Options.SEARCH_RESULTS))
    Item[] resulItem = (Item[]) result[i].getValue();
    WsUtility.log("Kveni",resulItem);
    if (resulItem != null)
    for (int j = 0; j < resulItem.length; j++)
    WsUtility.log("File " +resulItem[j].getName());
    But how do one search Based on the attributes of the category??
    thanks
    kveni

    Download the PM accelerator kit appropriate to your environment, and check out the TestSearch2.java example.
    http://www.oracle.com/technology/products/cs/developer/contentservicesdev/contenservicesdevkit.html
    Essentially you need to lookup the internal names of your category attributes, as well as have the internal name of your category class.
    categoryClassName = ...; // e.g. AHC_XXX
    attribute1name = ....; // e.g. CUSTOM_MYBOOLATTR
    you then create a normal search expression such as
    String attribute1Operand = "[" + categoryClassName + FdkConstants.SEPARATOR + attribute1name + "]";
    SearchExpression expr1 = new SearchExpression();
    expr1.setOperator(FdkConstants.OPERATOR_EQUAL);
    expr1.setLeftOperand(attribute1Operand);
    expr1.setRightOperand(Boolean.TRUE);
    Matt.

  • How to create session and end the session in atg without using ootb

    can anyone send the code for creating session(Login) and ending(Logout) session in atg without using ootb.
    thankyou!

    It is plain simple and is plain old request.getSession(false) and then invalidate the session , but why do you want to do it separately . ATG works behind scenes to associate lot of attributes to the session when log in happens and then deassociates them when log out happens , SessionManager component is also helpful in security , can you state why exactly would you want to do it?

  • How to change Dashboard Tabs based upon the login?

    Hi All,
    I have a requirement that, based upon the user login the dashboard tabs should change! not sure how to do this? any help is greatly appreciated.
    Regards
    B
    Edited by: Bees on Jul 27, 2010 2:37 AM

    B,
    I mean assuming you have a security model, users are in groups etc. And you have one group allowed to access tab 1, and you build tab2 for another group....
    The dashboard page properties screen, has a padlock icon against page, here you can set up the presentation catalogue privs for the dashboard page, assign users / groups read access, prohibit access as you see fit.
    To get to the page properties, edit the dashboard itself, on the top row of icons against the page dropdown list is our friend, the pointy finger, hit this to get to the page properties screen, you can change order, rename pages and in this case, set security per page.
    For discussions on the security model, RPD groups & Web cat groups - best we start another thread !! have a search on the forum first though, its been covered many times :-)
    Cheers,
    Alastair

Maybe you are looking for

  • Remote for Apple TV

    I lost my Apple TV remote and now my iPad will not work as a remote. It's telling me to turn on home sharing from my Apple TV.. But I can't without remote. Help

  • These apps cannot be accepted on this computer error

    I am trying to update iPhoto and iMovie from versions 9.3 (iPhoto) and 9.0.5 (iMovie) to iPhoto 9.4.3 and iMovie 9.0.9. I keep on getting an error message that reads "These apps cannot be accepted on this computer. Future updates of these apps can be

  • Can't delete old Updater

    I just tried to install iTunes 8 on Windows XP. It failed because it could not remover the old Apple Updater. The last update of the Updater failed and now I cannot remove it with Windows' remove installed programs. It wants an MSI that I cannot find

  • Uploading stock balances

    All, I need to upload every stock balances for a storage location in system . I am using batch management here .So in material master I am putting shelf life and Minimum remaining shelf life . So suppose for a material shelf life is 30 days and Min R

  • Issue regarding ABAP workbench

    Hi ,