How to revieve all Session Attributes

Is it possible to display all session attributes in a JSF page?
I have tried like this:
<%session.getAttribute("something")%>
But "something" is null, although I know, something must be in this attribute!
Thx for help!

I would be very pleased, if somebody could give me an example or a good internet page where I can find an example how to use an enumerator in an jsf page!
THX!

Similar Messages

  • How to close all session in OBPM 10gR3

    Hi all,
    I want to know how to close all sessions in engine.
    Because if there is some sessions in engine,the Directory polling is not take effect.
    (we can not restart engine.)
    Best Regards,
    Freeman

    BPM Studio (10g) is just a plugin for eclipse. To install other plugins, just use the Help - Software Updates - Find and Install
    HTH,
    -Kevin

  • How to clear all session data in adf through coding?

    Hi Everyone,
    i have created many pages in an application.I want to clear all session data when i get back to my first page.
    how to do that?
    such that my application should run as i am running for the first time.
    Thanks.

    Hi Jabr,
    i have used this code in initMethod() (Before phase) of my page.
    ExternalContext ectx = FacesContext.getCurrentInstance().getExternalContext();
    HttpServletResponse response = (HttpServletResponse)ectx.getResponse();
    HttpSession session = (HttpSession)ectx.getSession(false);
    session.invalidate();
    this code got executed but the page has 2 lovs.
    im getting error null pointer exception that EmpLovVO not found.
    if i remove the above code then the page is running correctly.
    What to do now?
    Thanks.

  • How to retrieve all session instances of a server

    Hi!
    I am writing a web application and assign each client a session varialble in order to count the number of online users. However this method does not give very accurate results. Hence I want to collect all each client session in my server and want to retrieve this collection anytime I want. This way I will be able to use session.getLastAccessedTime() method and check whether user is active or not by checking its last access time. I would gladly appreciate if anyone gives me a hint or shows me a method for collecting these HttpSession variables.
    Sincerely;
    Can Akpinar
    [email protected]

    Try below webpart
    http://exportversionhistory.codeplex.com/
    http://www.sharepointnadeem.com/2012/07/export-version-history-of-sharepoint.html
    http://www.codeproject.com/Articles/400720/SharePoint-Export-Selected-Items-to-Excel
    You can even try below powershell script
    http://www.captechconsulting.com/blog/amarender-peddamalku/sharepoint-2010-powershell-script-extract-the-version-history
    if((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $null)
    Add-PSSnapin Microsoft.SharePoint.PowerShell;
    $SPWeb = Get-SPWeb http://sp2010/sites/test/ #Change the SharePoint site name here#
    $List = $SPWeb.Lists["Documents"] #Change the document library name here#
    $ItemsColl = $List.Items
    Write-Host "************************************************************" -ForegroundColor Green
    Write-Host "The following report provides you the list of documents that are modified by UserXYZ" -ForegroundColor Green
    Write-Host "------------------------------------------------------------" -ForegroundColor Green
    foreach ($item in $ItemsColl)
    foreach($Ver in $item.Versions)
    if ($Ver.CreatedBy.User.DisplayName -eq "UserXYZ") #Change the user name here#
    Write-Host $item.Name "'s version" $Ver.VersionLabel "has been Modified by" $Ver.CreatedBy.User.DisplayName ":: URL ->" $item.Url -ForegroundColor Green
    Write-Host "------------------------------------------------------------" -ForegroundColor Green
    Write-Host "************************************************************" -ForegroundColor Green
    $SPWeb.Dispose()
    http://sharepointnadeem.blogspot.in/2012/07/export-version-history-of-sharepoint.html
    If this helped you resolve your issue, please mark it Answered

  • How to get all program attributes (Variables, types, tables....)

    Hello,
    i want to analyse a programe source code, so i want to get all variable declaration.
    like in SE38->utilities->display list object, but in abap code.
    can you please help me.

    Hi Yassir,
    If ur program has TOP include then all global variables declarations will exist in this include. All local variables declarations exist with in the FORM.
    Open ur program in SE80. Here u can see all objects of ur program like Fields(Variables), TYPES,Tables, Routines etc.
    Thanks,
    Vinod.

  • Not getting all the attributes value from Trusted Recon in eventhandler

    Hi,
    I am not getting the values of all the attributes in hashmap from Trusted recon in eventhandler.
    Following is the hashmap value I am getting :
    Parameter Hashmap value is {re_key=1869, Email=[email protected], Role=Full-Time, act_key=22, User Login=TUser43, Xellerate Type=End-User, Last Name=User43, First Name=Test}
    Please let me know how to get all the attributes value in eventhandler. I need to take some decisions based on these attributes.
    Thanks

    You should be getting all the values in the recon event.
    To get the current user states for all the records in the bulk event use this:
    Identity[] currentUserStates = (Identity[]) eventDataHashMap.get("CURRENT_USER");
    Now when you are looping through your bulkParametersp[], you can use the same get from the currentUserStates:
    Identity currentUser = null;
    currentUser = currentUserStates[counter];
    Now if the attribute is not in your hashmap, you can use:
    currentUserState.getAttributes().get(attribute)
    -Kevini

  • How to get from data entered on a form to a session attribute

    I have a jsp with a form with fields that are updated by the user.
    The values are in the fields value as I expected.
    Example. document.frm.Name.value = "Me"
    How do I populate a session variable with document.frm.Name.value?
    I think I have to do a request.getParameter("Name") followed by a
    session.SetAttribute. But the request.getParameter does not get populated with the latest value in document.frm.Name.value.
    Any idea is welcomed. Thanks
    Claudiine

    Below is the code:
    What I want to do is save in the session attribute "mailToAddressList" whatever the user types in the textarea "MailTo"
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.sql.*;
    import java.text.*;
    import java.io.*;
    import com.cname.apl.*;
    public class DealTeamServlet extends HttpServlet {
    private appUtil util ;
    private java.sql.Connection conn ;
    private static String dbUrl ;
    private static String dbUid ;
    private static String dbPwd ;
    private static String mailFromAddressList ;
    private static String mailToAddressList ;
    private static String mailCcAddressList ;
    private static String mailBccAddressList ;
    private static String mailSubject ;
    SimpleDateFormat SDF = new SimpleDateFormat("d-MMM-yyyy");
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    dbUrl = config.getInitParameter("dbUrl");
    dbUid = config.getInitParameter("dbUid");
    dbPwd = config.getInitParameter("dbPwd");
    mailFromAddressList = config.getInitParameter("mailFromAddressList");
    mailToAddressList = config.getInitParameter("mailToAddressList");
    mailCcAddressList = config.getInitParameter("mailCcAddressList");
    mailBccAddressList = config.getInitParameter("mailBccAddressList");
    mailSubject = config.getInitParameter("mailSubject");
    if (dbUrl == null)
    dbUrl = "*" ;
    if (dbUid == null)
    dbUid = "*" ;
    if (dbPwd == null)
    dbPwd = "*" ;
    if (mailFromAddressList == null || mailFromAddressList.equals("*"))
    mailFromAddressList = "" ;
    if (mailToAddressList == null || mailToAddressList.equals("*"))
    mailToAddressList = "" ;
    if (mailCcAddressList == null || mailCcAddressList.equals("*"))
    mailCcAddressList = "" ;
    if (mailBccAddressList == null || mailBccAddressList.equals("*"))
    mailBccAddressList = "" ;
    if (mailSubject == null || mailSubject.equals("*"))
    mailSubject = "" ;
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, java.io.IOException {
    HttpSession session = request.getSession(true) ;
    String msgBody = (String) request.getParameter("msgBody");
    String uid = (String) request.getParameter("uid");
    String key = (String) request.getParameter("key");
    Boolean isAuthorized = (Boolean) session.getAttribute("isAuthorized");
    java.io.PrintWriter out = response.getWriter();
    if (msgBody == null) msgBody = "" ;
    response.setContentType("text/html");
    if (uid == null || key == null) {
    isAuthorized = new Boolean(false);
    if ( isAuthorized == null ) {
    util = new appUtil();
    conn = util.getConnection(dbUrl, dbUid, dbPwd) ;
    isAuthorized = util.isAuthorized(conn, uid, key);
    util.closeConnection(conn) ;
    if ( isAuthorized.booleanValue() ) {
    session.setAttribute("isAuthorized", new Boolean(true));
    java.sql.Timestamp serverTime = util.getServerTime(conn) ;
    java.sql.Date now = new java.sql.Date(serverTime.getTime());
    int idEntry = Integer.parseInt(msgBody);
    mailToAddressList = request.getParameter("MailTo");
    out.println("<html>");
    out.println("<head>");
    out.println("<title>Team Members</title>");
    out.println("<SCRIPT LANGUAGE=JavaScript>");
    out.println("function open_window() {");
    out.println("document.domain = \"ny.cname.com\"");
    out.println("var loc = \"http://peoplelkp.ny.cname.com/peoplelkp/PDLookupService?&emil2=eMail&form=frm&launch=myRoutine()&csr=1&srch=1&adv=1&wc=y&pump=\"");
    out.println("loc = loc + document.frm.Name.value");
    out.println("var w = window.open(loc,\"Model_Details\",\"scrollbars,width=400,height=450,resizable=yes\")");
    out.println("return;");
    out.println("}");
    out.println("function myRoutine() {");
    out.println("document.frm.MailTo.value=document.frm.MailTo.value+\",\"+document.frm.eMail.value;");
    out.println("}");
    out.println("function submitForm() {");
    out.println("alert('submit form')");
    out.println("var mailAdd = document.frm.MailTo.value");
    out.println("alert('mailAdd='+mailAdd);");
    out.println("if ( mailAdd.length == 0 || mailAdd.indexOf(' ') == 0 || mailAdd.indexOf('.com') == -1 || mailAdd.indexOf('@') == -1 ) {" );
    out.println("alert('The To: field must be populated. No space are allowed. Email addresses must have valid format. Example: [email protected]')");
    out.println("document.all.frm.MailTo.focus();");
    out.println("return false;");
    out.println("}");
    out.println("return true;");
    out.println("}");
    out.println("function UpdateMailTo() {");
    out.println("alert ('I am in UpdateMailTo='+document.frm.MailTo.value);");
    out.println("}");
    out.println("</SCRIPT>");
    out.println(util.getStyleSheet());
    out.println("</head>");
    out.println("<body bgcolor='silver'>");
    out.println("<form name='frm' action='SendMail' method='post'>");
    out.println("<b>Team Members</b>");
    out.println("<tr>");
    out.println("<TABLE cellpadding='0' cellspacing='0' border='0'>");
    out.println("<tr>");
    out.println("<td align='right'><b>Subject:  </b></td>");
    out.println("<td>Deal Team Members Cleared by Conflicts</td>");
    out.println("</tr><br>");
    StringBuffer bod = new StringBuffer("");
    SimpleDateFormat SDF = new SimpleDateFormat("d-MMM-yyyy");
    try {
    /*get header information*/
    CallableStatement st = conn.prepareCall("{call apl_get_sp ?}");
    st.setInt(1, idEntry);
    ResultSet rs = st.executeQuery();
    int id = 0;
    int dw = 0;
    String cde_proj = "";
    String nm_title = "";
    String nm_long = "";
    String empl = "";
    String sid = "";
    int userid = 0;
    String email_pr = "";
    while ( rs.next() ) {
    id = rs.getInt("id_entry");
    dw = rs.getInt("id_dealworks");
    cde_proj = rs.getString("cde_proj");
    nm_title = rs.getString("nm_title");
    nm_long = rs.getString("nm_long");
    empl = rs.getString("empl_name");
    sid = rs.getString("id_standard");
    email_pr = rs.getString("id_email_ext_unix");
    mailToAddressList = email_pr.trim();
    out.println("<tr><td align='right'><b>To:  </b></td>");
    out.println("<td><textarea name='MailTo' cols='50' rows='2'>"+mailToAddressList+ "</textarea></td>");
    out.println("<td>  </td>");
    out.println("<td><input type='button' value='Save' onClick='UpdateMailTo()'></td>");
    out.println("</tr>");
    // out.println("request.setAttribute('mailadd',document.frm.MailTo.value);");
    // mailToAddressList = request.getParameter("mailadd");
    out.println("<tr><td align='right'><b>Name:  </b></td>");
    out.println("<td><INPUT NAME='Name' VALUE='' size=65 ></td>");
    out.println("<td>  </td>");
    out.println("<td><input type='button' value='Search' onClick='open_window()'></td>");
    out.println("</tr>");
    out.println("<tr><td align='right'><b>EMail:  </b></td>");
    out.println("<td><INPUT NAME='eMail' VALUE='' size=65'></td>");
    out.println("</tr>");
    if (rslt != null) rslt.close() ;
    if (stmt != null) stmt.close() ;
    }/*end try*/
    catch ( Exception e) {
    System.out.println(e) ;
    getServletContext().log(e.toString());
    out.println("<td colspan='5' align='right'><input type='submit' value='Send email' onClick='submitForm()'></td>");
    out.println("</tr>");
    out.println("</table>");
    out.println("</form>");
    out.println("</body>");
    out.println("</html>");
    mailSubject = "Team Members";
    String body = "testing";
    session.setAttribute("mailFromAddressList", mailFromAddressList);
    session.setAttribute("mailToAddressList", mailToAddressList);
    session.setAttribute("mailCcAddressList", mailCcAddressList);
    session.setAttribute("mailBccAddressList", mailBccAddressList);
    session.setAttribute("mailSubject", mailSubject);
    session.setAttribute("mailBody", body);
    else {
    session.setAttribute("isAuthorized", new Boolean(false));
    out.println("You are not authorized.");
    //out.close();
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, java.io.IOException {
    processRequest(request, response);
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, java.io.IOException {
    processRequest(request, response);
    public String getServletInfo() {
    return "Short description";
    }

  • How to set session attributes in a bean?

    How do I set a session attribute in a server-side bean?
    I'm not sure if I asked the question the right way. What I meant is, while it's easy to set session attributes in a JSP page (session.setAttribute("sessionname", "sessionvalue")), I'd want to set such an attribute within a server-side bean defined in this web application. But what is the syntax for doing it?

    Here a simple bean that stores something in the session and retrieves something from it.
    import javax.servlet.http.HttpSession;
    public class TestBean {
      private String value;
      public void doSomething(HttpSession session, int a, int b) {
        if (a+b > 0) {
          session.setAttribute("ab",Boolean.TRUE);
        } else {
          session.setAttribute("ab",Boolean.FALSE);
      public void init(HttpSession session) {
        if (session != null) {
          Boolean b = (Boolean)session.getAttribute("ab");
          if (b == Boolean.TRUE) {
            value = "a + b is greater than zero";
          } else {
            value = "a + b is not greater than zero";
        } else {
          value = "no session";
      public String getValue() {
        return value;
    }In your JSP, use something along the lines of :
    <%
      TestBean bean = new TestBean();
      bean.init(session);
      bean.doSomething(session,1,2);
    %>If your bean only lives during one request, you can pass the session to the constructor, which stores it in a private variable. This saves passing the session each time.
    Hope this helps,
    --Arnout                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to save the login ID as a session attribute ?

    I am using form-based authentication in a web application which is being deployed on a JBoss 3.2.3 server. I am authenticating against an Oracle database by way of a DatabaseServerLoginModule (JAAS).
    I would like to save the user's login ID as a session attribute in order to be able to use it later in the application.
    It's not obvious how you can capture this information and add it to the session, since it seems that the login ID is lost once the authentication is done by j_security_check process.
    Is there some way to tell the servlet container to save the login ID as a session attribute as part of the j_security_check process (something along the lines of "if the authentication succeeds add the login ID as an attribute to the session") ?
    Is there another approach ? What is the accepted "best practice" for doing session initialization after authentication ? For example if a user needs to have several attributes set in their session after login -- how is this handled ? I have done this before with a login servlet which did both the authentication and the session initialization, but when using form-based authentication and j_security_check it's not clear to me how you go from the authentication to the initialization logic.
    Thanks in advance for any suggestions or insight.

    You should already have it... hidden in request.getUserPrincipal().getName()

  • How to export All computer list with operating system from AD and all attributes like disable or enable and OU location also?

    how to export All computer list with operating system from AD and all attributes like disable or enable and OU location also?
    I have tried with dsquery below but status is not showing there.
    dsquery * -filter "(objectCategory=computer)" -attr name operatingSystem

    last logon user name - not really stored (or lined) with computer object.  However, you can get this info during the logon process or from the computer.  Here is method:
    http://portal.sivarajan.com/2010/07/user-profile-and-os-info-powershell.html
    Santhosh Sivarajan | Houston, TX | www.sivarajan.com
    ITIL,MCITP,MCTS,MCSE (W2K3/W2K/NT4),MCSA(W2K3/W2K/MSG),Network+,CCNA
    Windows Server 2012 Book - Migrating from 2008 to Windows Server 2012
    Blogs: Blogs
    Twitter: Twitter
    LinkedIn: LinkedIn
    Facebook: Facebook
    Microsoft Virtual Academy:
    Microsoft Virtual Academy
    This posting is provided AS IS with no warranties, and confers no rights.

  • Help need for force to signout All session ! how...

    hi
         help need for force to  signout All session !  how ??
    Solved!
    Go to Solution.

    Hi and welcome to the Skype Community,
    To force a signout of all instances your Skype is signed into please change your password: https://support.skype.com/en/faq/FA95/how-do-i-change-my-password
    Follow the latest Skype Community News
    ↓ Did my reply answer your question? Accept it as a solution to help others, Thanks. ↓

  • How can I have the loading of a page CLEAR ALL session variables?

    Hi,
    At the time of logging in it needs to reset all session state or at least my collection.
    I thought it would be a quick easy thing to clear session state????

    I found it:
    1.) Goto the page of desired Session State clearing.
    2.) Select the + after "Processes".
    3.) Select "Session State" category.
    4.) Select whatever you desire to do!
    Clear Cache For Applications (removes all session state for listed applications)
    Clear Cache For Current Application (removes all session state for current application)
    Clear Cache For Current Session (removes all state for current session)
    Clear Cache for Items (ITEM,ITEM,ITEM)
    Clear Cache for all Items on Pages (PageID,PageID,PageID)
    Reset Preferences (remove all preferences for current user)
    Set Preference to value of Item (PreferenceName:ITEM)
    Set Preference to value of Item if item is not null (PreferenceName:ITEM)

  • Portal Cluster: How to locate all user sessions at once?

    Hi Folks -
    We use Portal NW 7.0 SP14 (Java only) in a clustered mode (several server nodes).  The UME is LDAP, the portal database is Oracle.  Sometimes we need to see where a user's sessions are located in the cluster. We currently use Visual Administrator > Security Provider > Login sessions, but we must search each server node (very time-consuming).
    Does anyone know of an easier (one-step) method to retrieve all sessions for a userid?
    Thanks in advance - Jeff

    Hi Jeff,
    Bad luck: There is no easier way implemented within the standard.
    Hope it helps nevertheless
    Detlev

  • How to transmit session attributes

    I am trying to transmit SESSION attributes from one JSP to another, it works rather unstable ... may be I'm doing something wrong someone can correct me!!!
    sender.jsp
    <%session.setAttribute("test", "test"); %>
    receiver.jsp
    <% String test = (String)session.getAttribute("test"); %>
    ...

    I am trying to transmit SESSION attributes from one JSP to another, it works rather unstable ... may be I'm doing something wrong someone can correct me!!!
    sender.jsp
    <%session.setAttribute("test", "test"); %>
    receiver.jsp
    <% String test = (String)session.getAttribute("test"); %>
    ...

  • Javascript to JSP question...Can javascript function set session attributes

    hello,
    i have a web app that, on one of its pages, displays "tabbed pane" as an image map at the top (a la amazon.com). my problem is this: each "logical" page contains separate forms that all use the same javabean. in other words, imagine that the tabs represent an account maintenance web ui for an on-line record store. the first tab might be labeled "General," the second "Contact info," the third "Shipping Info." Each uses the same account bean and displays portions of its properties relevant to the tab at hand. what i want to do is allow a user to enter the account maintenance ui, update info on the first tab, click on tab two and have the request with the changes sent to a processing jsp. yet, since each "tab" is actually a separate URL to another page, how do i get the updated info on the first tabe without adding some sort of "SAVE" button on each tab. ive considered using javascript, but dont know how to get the request params out of the first tab whn i click on another tab. is it possible to include an "onClick" function in each URL that "grabs" the updated form fields off the preceeding tab? can a javacript function set session attributes in jsp?

    hello there,
    wow, you've created one big mammy-jammy tool.
    first, javascript cannot access, set values to the session, without having to post to another JSP. javascript is great for manipulating objects, layers, form values, etc.
    you have 2 issues [if i understand correctly]:
    1) you need to able to save user info for a specific tab without having to reloading the page.
    ---you can create a form for EACH of your tabs and POST all the information to a hidden IFRAME or LAYER for NN4. that hidden IFRAME / LAYER will load a JSP page which with all the parameters you posted to it. or you can build a FRAMESET and target that document["frame-name"].src with that same JSP.
    2) handling when the SAVE INFO action should happen: hence some javascript event handler: onMouseOver, onClick, etc
    ---i don't know the dynamics of your tabs, but if store which tab was clicked on last, then if the user clicks on some other tab, javascript can submit that FORM to a JSP [see condition above]
    you have an interesting tool. can i see?
    i hope i wasn't too confusing, but your problem is sooo interesting. =)
    -WJP

Maybe you are looking for

  • Can I suppress sign in dialog box?

    We are deploying Adobe CC in an enterprise setting...labs..ect.  We are using the Packing Tools for deployment.  However, when you start up a CC application it prompts you to sign into your creative account.  We want to suppress that window when some

  • How to send Array data using Post Method?

    Var array = $_POST['myData']; array[0] => 'ABC' array[1] => 'DEF' how to improve this code to support send array data...? String url ="http://xxxxx/test.php"; String[] arraystr={"ABC", "DEF", "EDFF"} String parameter = "myData=" +arraystr;    // no s

  • Our converted eCourses often freeze when launched from our new 3rd party hosted LMS...

    We have recently purchased a new externally hosted LMS system (Silkroad's GreenLight) and we have a 3rd party taking our older authorware courses (which are working) and updating/converting them using Adobe Captivate 5.5.  Once these are done and upl

  • Parameter Selection Dialog Prompt Issue

    When using the CR2008 and do a export in C#, the Parameter Selection Dialog Prompt is not prompted. How can I show the Parameter Prompt DIalog when in export in C#??

  • 5500 and Quickoffice viewer

    Could 5500 install free Quickoffice viewer? Where to download this software as I couldn't find it in Nokia website for 5500?