Access session variable inside AM module

Is there any way to access session variable inside AM module custom function?
I created one client interface function in AM and want to access one session variable value inside AM custom function.
Please suggest.
Thanks

Hi
here i need help to find out right approach,my use case are below
1.User will login thorough SSO .
2.Based on used id i need to display user data in table form.
3.User-id will need to display in right corner of page template ( JSF page with this page template)
4.user can update/create new table data by pressing update/createinsert button.
5.Once user press the create new request button,one empty row will popup which have user-id filled automatically (used-id who logged in) and will read only ,so that once user commit the data,DB can update/insert the data with that user-id
so far i have done point 1,2,4 and 5 like
1.i created AM preparesession and store the use id.
2.i have putted whereclause in AM for particular VO and run execute query and able to see particular user data,who logged in.
4.created servicemethod for createinsert in AM and exposed it ,and set used-is table attribute which i got in AM preparession .Now i am able to see new row with user-id in one column in read only form when
Is this the right approach ? and now i am not able to do step 3 so how to display same user-id in pagetemplate as this value is available in AM only.

Similar Messages

  • Access Session variable inside Transaction

    Hi All,
    Is it possible to access session variables inside Transaction.
    Create session variable.
    Update session variable value
    acccess Session variable.
    (user session)
    Regards,
    Sachin

    Hi Sachin,
    Here is the snapshot:
    1. Take session variable in a local JS variable in HTML page.
    2. Create a transaction with a input type variable in Transaction Properties.
    3. Create a Xacute query and link the above transaction.
    4. Creata a iCommand applet on HTML page and link the query template:
    <PARAM NAME="QueryTemplate" VALUE=".../QueryName">
    Call the function in the below way in HTML:
    Applet.getQueryObject().setParam(1,vaiable)
    So, the session variable will go to TRX (BLT) and perform the operations as per your need..
    You can pass it to other TRX by the same way.
    To fetch the value: Create output type variable in TRX 2. Create Xacute query.
    Get the value with : Applet.getValue(1,1)
    Hope it is useful.
    Best Regards,
    Kedar

  • Accessing session variables with php

    I am trying to access the  session variable  $_SESSION['MM_Username']  in one of my php pages, but it is somehow showing empty (i.e it does not contain the username that was entered during login).
    I checked and confirmed that my login.php function is properly setting the MM_Username session variable by echoing it  from the login function.
    So why can't I read it from another php file in the same session?  Do I need to do something else before the session variables can
    be properly read from any php file in the same session?  Any help would be appreciated.

    Here is a test code I am using to access the session variable $_SESSION['MM_username']  from  the php page  test.php. But it is not working.
    I get an empty string all the time for $username. Can any one see something wrong with this code?
    <?php require_once('Connections/MyTestingConn.php'); ?>
    <?php session_start(); ?>
    <?php
    $username = "-1";
    if (isset($_SESSION['MM_username'])) {
      $username = $_SESSION['MM_username'];
      echo $username;
    else
       echo "Eror: can not access session variable";
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Test</title>
    </head>
    <body>
    </body>
    </html>

  • Access session variable in Java Function in JSP

    Hi Experts !!
    I am developing an application using STRUTS MVC...
    Very sorry if u have problem understanding my question, i ll try to improve... and sorry if i can't post codes here
    Basic question is ....
    I want to open a word document on pageLoad of JSP, the word document is not a single document, there is a form in which there is a "name" and "template" whenever user clicks on a button there is one action attached to it which creates a copy of that template in a different folder.. on the next page OnLoad i want to open that particular document. for that i have created a variable and also have set in the session, just want to access it in the below code.
    I have a formbean in which i have a variable, the scope is session, that variable i have put it in session also. but i want to access that variable in a "java function" in JSP so that "onLoad" page that function should work.
    JSP---
    <script type="text/javascript">
    function openDocument() {
    var w = new ActiveXObject("Word.Application");
    var docText;
    var obj;
    var a;
    if (w != null) {
    w.Visible = true;
    obj = w.Documents.Open(I HAVE TO ACCESS THAT VARIABLE HERE);
    </script>
    FORMBEAN----
    public class CreateSOWFormBean extends ActionForm {
    private String workflowName;
    private String comment;
    private String sowTemplate;
    private String sowFileCreated;
    public String getSowFileCreated() {
    return sowFileCreated;
    public void setSowFileCreated(String sowFileCreated) {
    this.sowFileCreated = sowFileCreated;
    sowFileCreated is the variable that i have accessed in session and that value i have to pass in that function in JSP....
    I am aware of something like
    obj = w.Documents.Open(<%'sowFileCreated'%>);
    but i m not sure how to write....
    Plz help.....

    If you're working under a framework like struts you should definitely be using JSTL tags rather than scriptlet code to access variables within the page. With JSTL code <% codes can be almost entirely avoided.
    To transfer a value from a Servlet to a JSP don't use a session variable, use a request attribute. Session variables should only be used when values have to survive from one transaction to another.
    You can write something like:
    obj = w.Documents.open('<c:out value="${openURL}"/>');in the Javascript portion of your JSP.
    Just beware of potential problems with quotes. The coresponding code in the Servlet would be like:
    request.setAttribute("openURL", openUrl);

  • Problem accessing session variable from jsp

    Hi!
    I get an error retrieving a session variable from inside a JSP declaration scriptlet....
    Something like this code in a JSP page:
    <%!
    public void funtion1() {
    String parameter1 = session.getAttribute("parameter1");
    %>I have seen that I have available getContextServer() method and from there I could call getAttribute("parameter1") . But the thing is that the attribute I want to retrieve was stored in session by another Jsp page.
    Any solutions are welcome
    Cheers
    Victor

    Appropriately the above is one the reasons also You cannot use JSP implicit objects from the declaration tag. However we can think of a small workaround by passing the reference like the one discussed below
    <%!public void funtion1(HttpSession session) {
    String parameter1 = session.getAttribute("parameter1").toString();
    }%>
    <% funtion1(session);%>Hope that helps :)
    REGARDS,
    RaHuL

  • Accessing session variable in Flex.

    Hi All,
       I'm using RemoteObjects for accessing data and using Spring BlazeDS. How to retrieve 'session' variable values in Flex?
       Main application which is calling different .mxml files. It first invokes login(login.mxml) page with successful user credentials it will display home(home.mxml) page and I have search(search.mxml) pages.
        In case user session timeouts then I'd like to send user request to login page for login.(say user is in search page and where he left for 30 minutes, after then when user clicks anything on search page, it should redisplay login page because session timeout is set to (25 minutes).  How to do this Felx??
       Thanks in advance.
    Regards,
    Sharath.

    More detail solution will be found in the help.
    Look for the following string in your local help (in flex builder): Communicating with the Wrapper.
    You will probably find that you have to do something like the following:
    a) call from flex to the wrapper page javascript function.  (this would be a polling operation, run on a timer event (say) once every minute.
    b) the javascript function you call conducts an Ajax call to determine the current session state.
    Note that the above will likely keep your session state alive.
    Another possibility is to pass in the value of your session timeout via a FlashVars variable.
    Again, in a timer function run every minute, invcrement a local counter.
    When local counter equals session passed in, then you might assume that the session has timed out.
    IHTH.
    Cheers

  • Set session variables inside a page

    Inside the page "form.cfm" I have this code:
    <form name="report" action="pagestatistic.cfm"
    method="post">
    <INPUT name=ONE size=15 >
    <INPUT name=TWO size=15 >
    <input type="submit" value="Go ON">
    </form>
    I would like to set session variable: ONE and TWO, inside the
    page: pagestatistic.cfm
    IN that way when I will refresh the page "pagestatistic.cfm"
    I will watch have the same results.
    I added this code at the top of "pagestatistic.cfm" but it
    doesn't work.
    <CFSET session.ONE = #ONE#>
    <CFSET session.TWO = #TWO#>
    Could you tell me what goes wrong?
    Thanks
    CFWork

    quote:
    Originally posted by:
    liquid One
    When you say refresh the page, do you mean submit the form by
    clicking on the submit button? Or are you filling out the input
    boxes and hitting refresh?
    I mean I clicked a link that links the same page:
    pagestatistic.cfm
    Then I would like to add to this link 2 get variables
    pagestatistic.cfm?ColorPage=Green&Order=2 to change the
    background color and the order of the results of the page. That it
    is impossible because when i refresh the page it is doesn't work.
    What do you suggest me to do?
    Thanks,
    CfWork

  • Access Session variable across the hosts

    Hi,
    I am facing an issue. Please find the following scenario.
    I have a login page which is under a secure host. When the login is successfull, the control will be directed to a non secure host, where I have to access a session variable which is set in the LoginPage (which is a secure host). Can I do this?
    Can any one help me in solving this
    regards,
    Jo
    Message was edited by:
    JoshyzJava

    To retreive a varable from another JVM or indeed another host you would need to use Remote Method Invokation (RMI), calling getSecureSessionID() or isSessionOK(sessionID) or whatever from the programme running in the remote JVM.
    The method in general is floored unless the RMI is secure, I have no experience of encrypting this but I'm sure it is possible. You're non-secure-host must have the funcionality to communicate with the secure-host securly, otherwise the secure-host is not secure.
    Bamkin

  • Accessing session variables....urgent

    Hi,
    i have a session variable in my JSF application that stores the userId when a user logs in!!
    i need to access the session variable in a method in the bean.
    can HttpSession and HttpServletRequest objects be accessed in the managed bean
    help me with the code please.....itzz urgent

    see http://forum.java.sun.com/thread.jspa?forumID=427&threadID=545939

  • Accessing session variables PHP

    I am trying to access a session variable from a log in form (using the Log In User Server Behavior) and am lost. I simply want to display the users information in the target page. I read in another discussion that I had to bind the variable to the target page, which I did, but that didn't fix it.
    Please help.
    Here is my loginFormAction code:
    <?php
    // *** Validate request to login to this site.
    if (!isset($_SESSION)) {
      session_start();
    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($_GET['accesscheck'])) {
      $_SESSION['PrevUrl'] = $_GET['accesscheck'];
    if (isset($_POST['email'])) {
      $loginUsername=$_POST['email'];
      $password=$_POST['password'];
      $MM_fldUserAuthorization = "";
      $MM_redirectLoginSuccess = "owner.php";
      $MM_redirectLoginFailed = "register.php";
      $MM_redirecttoReferrer = false;
      mysql_select_db($database_petriever, $petriever);
      $LoginRS__query=sprintf("SELECT email, password FROM owners WHERE email=%s AND password=%s",
        GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
      $LoginRS = mysql_query($LoginRS__query, $petriever) or die(mysql_error());
      $loginFoundUser = mysql_num_rows($LoginRS);
      if ($loginFoundUser) {
         $loginStrGroup = "";
        //declare two session variables and assign them
        $_SESSION['MM_Username'] = $loginUsername;
        $_SESSION['MM_UserGroup'] = $loginStrGroup;      
        if (isset($_SESSION['PrevUrl']) && false) {
          $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
        header("Location: " . $MM_redirectLoginSuccess );
      else {
        header("Location: ". $MM_redirectLoginFailed );
    ?>

    Wherever you want to display the logged-in username simply place this on the first line of a .php page to start the session:
    <?php session_start(); ?>
    Then place this code wherever you want to display the username:
    <?php echo $_SESSION['MM_Username']; ?>

  • Accessing session variables

    Hi ,
    I have session variable defined using portals (forms or plsql portlets).
    Can i access these variables using jsp portlets ??
    This is an urgent requirement ..
    Regards,
    Vijaya

    "145822",
    If your application with application id 100, for example, uses a common authentication scheme with application 200 (using the same cookie name in the case of an HTML DB style authentication scheme), then the two applications can run in the same session. A potential benefit of this, even if the two apps are not intricately related, is that the user has only to authenticate once per new session and will have access to both apps. If you set it up this way, then app 100 can access app 200's items in the same session using this function from within app 100:  htmldb.application.fetch_app_item(p_item=>'ITEM_NAME',p_app=>200);Scott

  • Access Session Variable

    Hi All,
    I am using cutom autentication schema called "My Auth Scheme". I want to hide some of the menu options (Tree List) based on the Role Type.
    Could anybody give me any pointer about how to acheive this. And most importantly how to access the session variable (Though I am not even sure about Role Type is going into session or not). Please guide me..
    Regards
    Amit Arora

    Amit,
    You're using a lot of terms that you have not defined:
    I am using cutom autentication schema called "My Auth Scheme". It's an authentication scheme but what is the relevance of it being custom (in what way is it custom and how is that relevant?) and why do we care what you named it?
    I want to hide some of the menu options (Tree List) based on the Role Type. "Role Type" -- What is that?
    And most importantly how to access the session variable ...What do you mean? What session variable?
    Please describe your exact functional requirements, what you are doing now to achieve them and how your actual results differ from the expected results. Also, show us all of the code you are using and demonstrate the problem on apex.oracle.com so we can see exactly what you're trying to do.
    Scott

  • Problem accessing session variables in JSP

              Hi all,
              i am retrieving the value of session variables in a JSP page. the session varibale
              is set at the
              server side. sometimes the jsp is able to retrieve the value and sometimes it
              doesn't.
              Thanks & Regards
              Tarun
              

    if getAttribute return null so there is no such session attribute,anyway
              check your browser if cookies are enabled.
              "Tarun Mangal" <[email protected]> wrote in message
              news:400759e9$[email protected]..
              >
              > Hi all,
              > i am retrieving the value of session variables in a JSP page. the session
              varibale
              > is set at the
              > server side. sometimes the jsp is able to retrieve the value and sometimes
              it
              > doesn't.
              >
              > Thanks & Regards
              > Tarun
              

  • Problems accessing session variables from a pop-up

    I am working on a webapp and I when I click on a certain button I need to have a pop-up appear that will either prompt a user to enter log-in info if they haven't already, otherwise the pop-up just needs to display a report. Users can navigate around on the main page and select various reports so multiple pop-ups could possibly be opened. When a user logs in I save the login info in session variables, but for some reason whenever I click to have another pop-up open it always says that my session variables are null. Is there a way to have more global session variables so that multiple windows (the pop-ups) can touch session variables? Would there be a way to pass the login info in session variables back to the main page and then pass those session variables back out to each pop-up that opens? Thanks so much.

    Have you got session cookies enabled?
    The most common way to keep track of the session id is via a session cookie.
    This cookie gets shared by all windows of the same browser session.
    You are opening these pop-up windows with window.open?
    Print out the session id <%= session.getId() %> on each page to see if it is the same.
    Cheers,
    evnafets

  • Session Properties inside Transaction

    Hi All,
    I am trying to access session variable inside transaction as below.
    1. Create new XML query
    2. Set URL as xMII 11.5 -->  http://<Server>/Lighthammer/PropertyAccessServlet?Mode=List and
    12.0 --> http://<Server>:50000/XMII/PropertyAccessServlet?mode=Retrieve&PropName=TETSP&Content-Type=text/xml
    3. execute query.
    This working in xMII 12.0 version but it is not working in xMII 11.5.
    It's is throwing following error.
    Error Processing XMLQuery Premature end of file
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    XML document must have a top level element. Error processing resource 'http://<Server>/Lighthammer/OutputStorageServlet...
    Is there any problem with URL setting in 11.5.
    Edited by: sachinjadhavar on Oct 1, 2010 3:35 PM

    Hi Michael,
    Thanks for quick reply.
    I tried executing xml query with and without login credentials but still it is trhowing same error.
    http://<Server>/Lighthammer/Login.jsp?IllumLoginName=<username>&IllumLoginPassword=<Password>&Session=true&target=http://<>Server/Lighthammer/PropertyAccessServlet?Mode%3DList
    If i paste URL in explore address bar it gives correct result without login page.
    but from Query Templae it throws error --> Error Processing XMLQuery Premature end of file
    Also i tried with encoded URL in target
    Without passing credentials it is qrking in 12.0 version but not in 11.5
    Regards,
    Sachin

Maybe you are looking for

  • ODI-1228: Task SrcSet0 (Loading) fails on the target MICROSOFT_EXCEL connec

    Hi i am trying to exporting the database table data into excel sheet i am getting the below error. ODI-1228: Task SrcSet0 (Loading) fails on the target MICROSOFT_EXCEL connection Ms_EXCE_TGT. Caused By: java.sql.SQLException: [Microsoft][ODBC Excel D

  • Error for Cenvat Credit thourgh J1IEX

    Dear Experts, At the time taken Capital Credit through J1IEX, system given error "FI/CO interface: Inconsistent FI/CO line item data for updating" message no RW016 Please help BK GAIKWAD

  • Using Excel function in workflow?

    Hi all, Does anybody know if it is possible to use Excel functions in workflows? Indeed, I need to set the style of a metadata according to the value of another metadata. Thanks in advance. fx

  • Where can i find hidden movie files on a macbook

    I've deleted all the movies from my mac and when I open my system profile it shows I have 42GB of movies somewhere hidden on my macbook.  I've tried searching .mov in my spotlight (which yields nothing) and manually searching through the iTunes folde

  • Error rep-1352

    Problem : REP-1352: The fonts specified for this report cannot be found for the character set specified by NLS_LANG. Secene : I am getting this runtime error after 3 years of usage only in a particular client. (This report works fine with other clien