Set session

i have a peculiar problem.....when my application loads the search page appears. When i press get record....it shows no data or only one record when there are two records. This is due to the fact that the session is not being set as i am using radiogrps with submit. I have written the javascript and in the form elements i have given the command onBlur......but the session is only set if i click on dat particular item and not when the page loads.....pls help me......

Hello,
Your situation is not clear to me.
>> This is due to the fact that the session is not being set as i am using radiogrps with submit
Are you sure you are using radiogroup with submit and not radiogroup with redirect? Every time the page is submitted, session state is set automatically by the system, so you should not have any problem with session state values.
>> … i have given the command onBlur......but the session is only set if i click on dat particular item
The onblur even is being fired only after the item it attached to is losing its focus. In order to lose focus, the item first need to gain it, hence the need to ‘click’ on the item.
>> … and not when the page loads
If you want to fire a JavaScript code when the page loads, you should use the onload event.
If you need some more help, please give us some more specific details on your situation, including what you are trying to achieve, and the code you are using.
Regards,
Arie.

Similar Messages

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • 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

  • NEWBIE: Submit Page to set session state

    I have a form that displays various items to include Popup LOVs (dynamic; based on session variables). If the user displays a page, the session state is not yet set so the Popup LOVs don't function correctly (until the user presses the Apply Changes button to submit the page). Can I automatically submit the page or set session state for those items used in the LOVs on page load? Note that I'm not too familiar with the use of javascript. I'm using Application Express version 2.0

    Yes, I discovered that! Thanks for responding, though. I basically run a process (PL/SQL) under page rendering section that looks like:
    begin
    htmldb_util.set_session_state('P10_MACHINE_TYPE','&P10_MACHINE_TYPE.');
    end;
    Thanks!

  • Setting session timeout in OracleWeblogic Server

    Hi All,
    I have doubt in setting session time out in Oracle WLS server 12c. Please suggest,
    There are two ways as i know editing the below files.
    1) weblogic.xml
    2) web.xml
    But when I open the weblogic.xml it has the below code, if we edit the value in
    <timeout-secs>3600</timeout-secs>
    the value implied for the admin console only as i know, the admin console will ask the user to re-login if the session is idle for morethan 6 mins.
    But If there is an application deployed like a bank.war file and customer is accessing the application. I want to set the user session time out to 2 mins i.e 120 seconds. How to set this in the server level ?
    Oracle Webogic server level ?
    <session-descriptor>
        <timeout-secs>3600</timeout-secs>
        <invalidation-interval-secs>60</invalidation-interval-secs>
        <cookie-name>ADMINCONSOLESESSION</cookie-name>
        <cookie-max-age-secs>-1</cookie-max-age-secs>
        <url-rewriting-enabled>false</url-rewriting-enabled>
    </session-descriptor>
    In the default web,xml  there is no param called timeout..
    Thanks
    Venkat

    Hello Venkat,
    I have implemented the same in my Application(OBIEE).Check it may helpful for you.
    Sasi Nagireddy: HOW TO CONFIGURE SESSION TIMEOUT IN OBIEE-11G..
    Thanks,
    Sasi Nagireddy..

  • Xsql:set-session-param

    I experience a problem with exception arising when I try to set session parameter and then to post to a page with insert-request.
    Here is exception message:
    XSQL-018: Unexpected Error Occurred processing stylesheet null
    oracle.xml.parser.v2.XMLDOMException: Node of this type cannot be added.
    at oracle.xml.parser.v2.XMLDocument.checkChildType(XMLDocument.java, Compiled Code)
    at oracle.xml.parser.v2.XMLNode.appendChild(XMLNode.java, Compiled Code)
    at oracle.xml.parser.v2.XMLDocument.appendChild(XMLDocument.java, Compiled Code)
    at oracle.xml.parser.v2.XMLNode.appendChild(XMLNode.java, Compiled Code)
    at oracle.xml.parser.v2.XMLDocument.appendChild(XMLDocument.java, Compiled Code)
    at oracle.xml.parser.v2.XMLNode.appendChild(XMLNode.java, Compiled Code)
    at oracle.xml.xsql.XSQLStylesheetProcessor.processToDocument(XSQLStylesheetProcessor.java:66)
    at oracle.xml.xsql.actions.XSQLInsertRequestHandler.handleAction(XSQLInsertRequestHandler.java:82)
    at oracle.xml.xsql.XSQLDocHandler.getDocument(XSQLDocHandler.java, Compiled Code)
    at oracle.xml.xsql.XSQLPageProcessor.process(XSQLPageProcessor.java, Compiled Code)
    at oracle.xml.xsql.XSQLServlet.doGet(XSQLServlet.java, Compiled Code)
    at oracle.xml.xsql.XSQLServlet.doPost(XSQLServlet.java:81)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:521)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
    at org.apache.jserv.JServConnection.processRequest(JServConnection.java, Compiled Code)
    at org.apache.jserv.JServConnection.run(JServConnection.java, Compiled Code)
    at java.lang.Thread.run(Thread.java:479)
    Using 1.0.4.1 production xsql servlet.
    Code to set param:
    <xsql:set-session-param name="issuethesid" value="aaa" only-if-unset="yes"/>
    Code for the page producing error
    <?xml version="1.0"?>
    <!--?xml-stylesheet type="text/xsl" href="coastbasepost.xsl"?-->
    <page connection="coastbase" xmlns:xsql="urn:oracle-xsql">
    <xsql:include-request-params/>
    <xsql:insert-request
    table="domain"
    transform="coastbaseinsert.xsl"/>
    <xsql:set-page-param name="CURRENTID">
    SELECT ID_SEQ.CURRVAL FROM DUAL
    </xsql:set-page-param>
    <xsql:include-param name="CURRENTID"/>
    </page>
    Works everything but insert-request.

    This error usually occurs when your transformation produces an illegal XML fragment.
    If you temporarily rename the transform attribute to transformXXX so that the inbound XSLT transformation is not performed, does the stack trace go away?

  • 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

  • Using the Set Session Info to populate Custom Variable

    Hey everybody, I'm trying to setup a Set Session Info step so when a caller presses 1 for instance to go to a specific department I can go into the database and see how many callers pressed a certain button.
    Here's what I've done so far, I've setup a Session called session_info with the value of null.  At the very beginning of the script it shows session_info = Get Contact Info --Triggering Contact--, Session)
    Then in the menu field when a caller presses 1 I have the Set Session Info step with the Session being session_info and then in the Context tab I have "_ccdrVar3" for the name and "1" for the value.
    The script doesn't fail it's just not populating any Custom Variable with any data. 
    Also I've tried using the Set Enterprise Call Info and using a value of 1 and then Call.PeripheralVariable3 for the name.  Not sure what the proper way to do this is.  Anybody have any ideas?

    Hi
    You don't need a session var.
    You just need to use 'set enterprise data' to set a call.peripheralvariable to what you like.
    The data goes straight into the contactcalldetail table.. You can check it by doing:
    run uccx sql db_cra select * from contactcalldetail where customvariableX = 'yoursetting'
    Where 'yoursetting' is what you set the ent data to, and customvariableX is the var you use (e.g. customvariable3 if you use call.peripheralvariable3)
    Regards
    Aaron
    Please rate helpful posts..

  • URL to set session properties?

    Is there a URL to SET session properties?  I know I can get a list of them by calling "/XMII/PropertyAccessServlet?mode=list&Content-Type=text/xml", but is there a way to set them in a similar manner?

    Hi all,   If you want me to start a new thread let me know...
    I'm having funky, although repeatable, results using the URL to set a session parameter via AJAX call,
    which always gets a Successful message.
    /XMII/PropertyAccessServlet?mode=Store&PropName=plantId&PropValue=60
    I am verifying the session parameter 2 ways:
    1.  Refresh the page and view source  (I took the lt and gt out)
    ...............span id="savedPlantId" style="visibility:hidden;"
    2.  AJAX call to /XMII/PropertyAccessServlet?mode=List
    Quirk #1:   I see the value in the span.  I do not see it in the servlet list.
    Quirk #2:   I can change the value a couple (2 or 3 times) then it doesn't change after that
    Quirk #3:   When it stops changing via the AJAX call, I can still change it with a browser URL
    http://<server>:50000/XMII/PropertyAccessServlet?mode=Store&PropName=plantId&PropValue=199
    Any hints or ideas? 
    Yes, I am trying to use a single pixel applet, but having trouble with that too!  See a different post. 
    I really would prefer to use the URL as there is no visual indication to the user
    and an applet (and JVM) doesn't have to load.
    --Amy Smith
    --Haworth
    Oh, and P.S.   Is there a mode=Delete to remove the session parameter?

  • Setting session value

    hi one & all..
    i've a problem with session.setAttribute()
    I've two folders in my web-apps.....namely.....ONE ...TWO ...
    am setting session value from the folder ONE...and i redirect a page from folder ONE to folder TWO using response.sendRedirect()....
    when i getting session value from folder TWO it shows null...
    how can i get tat session value from folder ONE to folder TWO
    can any1 help me????????/

    Each web app effectively has it's own session normally. Generally you separate your functionality between web-apps to provide some isolation of object classes etc..
    How about putting the value you want to forward in the sendRedirect URL as a query string parameter?

  • How to set session timeout per user

    Hi,
    Ho do I set the session timeout per User in the
    Application.cfm File??
    I tried using
    <cfif SESSION.UID EQ 1>
    <CFAPPLICATION NAME="appControl" SESSIONMANAGEMENT="Yes"
    sessiontimeout="#CreateTimeSpan(0,0,20,0)#">
    </cfelse>
    <CFAPPLICATION NAME="appControl" SESSIONMANAGEMENT="Yes"
    sessiontimeout="#CreateTimeSpan(1,0,0,0)#">
    </cfif>
    But this didnt work because the cfapplication seems to have
    to be at the top before I call the variable SESSION.UID which
    I set on my login page..
    Someone know how to do this??
    Regards
    Martin

    Martin,
    Your code example cannot work because the "session" scope
    doesn't exist until your application scope is defined. So you have
    to handle this manually. Here's how you can get it done. First,
    define your application to the maximum sessiontimeout you want to
    have.
    <CFAPPLICATION NAME="appControl" SESSIONMANAGEMENT="Yes"
    SESSIONTIMEOUT="#CreateTimeSpan(1,0,0,0)#">
    Then, I don't know how you are doing your login
    authentication but when you have authenticated the user, you need
    to define the userid and the most recent activity in the session.
    Also determine your timeout value based on the userid. See example:
    <CFIF IS_AUTHENTICATED>
    <CFSET session.user.uid = form.userid>
    <CFSET session.user.most_recent_activity = now()>
    <CFIF session.user.id eq 1>
    <CFSET session.user.timeout_mins = 20>
    <CFELSE>
    <CFSET session.user.timeout_mins = 1440>
    </CFIF>
    </CFIF>
    Now, all you have to do is check whether the user has been
    idle for too long and kill the session by purging all session
    variables. For example:
    <!--- if user id is defined, this means user is logged in
    --->
    <CFIF structKeyExists(session, "user") and
    structKeyExists(session.user, "id")>
    <!--- check if timeout has expired --->
    <CFIF datediff("n", session.user.most_recent_activity,
    now()) gt session.user.timeout_mins>
    <!--- timeout has expired, kill the session and log the
    user out --->
    <CFSET StructClear(session)>
    <!--- insert your logout code here --->
    <CFELSE>
    <!--- user hasn't timed out, so reset the most recent
    activity to now --->
    <CFSET session.user.most_recent_activity = now()>
    </CFIF>
    </CFIF>

  • Setting Session Timeout for HANA Cloud Portal

    Hi all,
    is there any way for setting the session timeout period on HANA cloud Portal?
    If not, what is the predefined session timeout?
    Thank you in advance.
    Silvia Grabmann

    Hi Silvia,
    Session timeout is 20 minutes and cannot be changed. In fact it is configured at the platform level.
    Regards,
    Ifat.

  • Unable to set session in Oracle Portal useing reverse proxy

    I have deployed a reverse proxy (using Oracle HTTP Server) in front of a Oracle Portal Install (version 10.1.2.0.2). The steps followed to set this up came from the following documents:
    Steps mentioned in Section 9.2 Configuring a Reverse Proxy for OracleAS Portal and OracleAS Single Sign-On for a reverse proxy on a Oracle HTTP Server.
    http://download-west.oracle.com/docs/cd/B14099_15/core.1012/b13998/variants.htm#ASTED005
    Also performed steps mentioned in -> Section 5.3.7 - Step 7: Enable Session Binding on OracleAS Web Cache of the Oracle® Application Server Portal Configuration Guide 10g Release 2 (10.1.2) -- B14037-03.
    My current (example names shown only)setup details are as follows:
    Reverse Proxy for SSO server (running on internal.oracle.com:7777): proxy.oracle.com:7777
    Reverse Proxy for Portal server (running on internal.oracle.com:7778): proxy.oracle.com:7778
    With the above steps completed, I can successfully use the http://proxy.oracle.com:7777/pls/orasso for login into SSO without any issues.
    Users get authenticated successfully.
    I can also use http://proxy.oracle.com:7778/pls/portal for viewing pages on the portal fine . All self referencing links have also been successfully modified to point to proxy.oracle.com:7778.
    However, an attempt to login in the portal is not successful. Clicking on the 'Login' link successfully redirects to the SSO login page (http://proxy.oracle.com:7777/<login-page>). However, after successful authentication, the success page fails to show up and the user gets shown the initial login portal home page again.
    There are no error messages shown on the screen.But it seems that user session is failing to be initiated/set correctly, as shown by the log file (in $PORTAL_ORACLE_HOME/j2ee/OC4J_Portal/application-deployments/portal/OC4J_Portal_default_island_1/application.log ):
    06/11/21 16:49:31 portal: [module=RepositoryServlet, ecid=83928411196,1] Repository Gateway: LWUser: PUBLIC, Cookie: oracle.uix=0^^GMT+10:00;
    portal=9.0.3+en-au+us+AUSTRALIA+22BC75924EEAD8A2E040007F010019F7+8DAC5E3559C95F5E0090A6F56FFA58192CB0F437CA57A9102A6394F1EB7FAB5DEE3BFA12C65
    91C0C009B6......
    06/11/21 16:49:31 portal: [module=RepositoryServlet, ecid=83928411196,1] ERROR: Repository Gateway error: Database Error: ORA=20001 ORA-20001:
    Unable to obtain session information from the cookie. Please close your browser and reconnect.
    ORA-06512: at "PORTAL.WPG_SESSION", line 149
    ORA-06512: at line 22
    Any help with this will be appreciated.
    Thanks.

    Hi Chris,
    The begin of the expection stack gives you the reason:
    06/11/03 09:13:59 java.sql.SQLException: The method 'setSavepoint' cant be called when a global transaction is active
    The reason is, that either the whole global transaction must be commited or rollbacked.
    I don't know your actual configuration, but between the methods begin() and commit()/rollback() of the UserTransaction instance, OC4J/OracleAS uses a global transaction (= XA transaction) in your configuration. The state of a global transactions is completely under the control of the application server and several restrictions must be considered. One of them is, that you can't use the method setSavePoint/. E.g. you can't also call the method setAutoCommit(true) in this state, or change the transaction isolation level via setTransactionIsolation(newLevel).
    This is NOT a limitation of the OC4J/OracleAS but is true for ALL application servers.
    P.S. I can successfully set savepoints and rollback to savepoints in weblogic 9.0This means, that WebLogic 9.0 doesn't use a global transaction in this case.
    Because I don't know your configurations (Oracle and WebLogic) I can't say, why the behave different in this situation.
    Best,
    Manfred

  • Setting Session level parameter in FORMS 10g

    Hi folks,
    I want to setup session level setting for NLS DATE FORMAT in FORMS 10g at environment settings. because, i can't change these setting at database level. b,cz different client applications (i.e. .NET,Forms 10g and SQL PLUS) using different settings.
    So, i want to set this NLS DATE FORMAT for SESSION level in FORMS 10g.
    can i include this in default.env, if yes, how to include that one in .env file
    Edited by: user12212962 on Jul 23, 2010 7:18 PM

    No, i want to setup the session parameter for DATE FORMAT. why because, i'm executing oracle stored procedure from forms and this procedure does some logic based on date value.
    In this procedure, i have used all variables as DATE datatype only. and i can't change this procedure due to some other client application's using same procedure like JAVA, .NET, Oracle BI and scheduled jobs. And all these application's working fine, even when i use forms 6i also it's working.
    but when we use FORMS10g, date was treating as DD-MON-RR and all other client applications using DD-MON-YYYY due to session level setting and at database level also has a same format i.e. DD-MON-YYYY. because i logged this NLS value in audit_table when i executed through FORMS10G, JAVA application,.NET
    May be some where it's changing this setting to DD-MON-RR for FORMS10g. Is any settings at Oracle APP server level
    (iAS) for this parameter?

  • 'In Between' Date Prompt to set Session Variables???

    Hi
    Im very new to OBIEE and was hoping someone could help me. I have a date prompt using the 'in between' operator based on a date column.
    I am trying to set up a table in the Physical layer of the RPD using a stored proc (EXEC sp_name). The stored proc takes 2 input paramaters - a start data and an end date. These dates i would like to come from the in between prompt. I have set up the physical table structure to receive the results of the request.
    I looked at setting a session variable but it is asking me to insert sql to set the value and i dont want to hit the database outside of the stored proc. Also, even if i have session variables i cant see how to set them to the values in the prompt when using the 'In Between' operator.
    Im really very confused and i have been searching the net and the documentation for any clue.
    Any help would be appreciated
    Thanks

    In between operator doesn't support presentation variable..
    so break this into is into two prompts...and use equal to operator, then you can use them as request variables which will in turn override your session variables.
    in the report use operator between and use these variables in the filter..

  • Set Session State with Shuttle items

    Is it possible to have session state set with each item selected in a shuttle? You have a shuttle with 4 possible options, you select item 2 from the left portion of shuttle and it is moved to the right.. Can you set the session state at that point?
    What I am trying to do is take the session state after change in the control and use it to populate a text field below. The returned values are used in a sql select to populate the text box with a looked up value...
    Thank you,
    Tony Miller
    Ruckersville, VA

    TexasApexDeveloper wrote:
    Won't this just push the last items value in, as apposed to appending the value?
    Tony,
    No. Because for shuttle items the return value is stored as colon delimited string.
    Means after each change you will have a colon delimited string in the session state with selected values(moved to right).
    See this http://apex.oracle.com/pls/apex/f?p=46417:47

Maybe you are looking for

  • Query takes long time for first time

    I have a table with 100 million records and another tables with many rows. When I ran a query - it's takes about 1 minute to complete, but when I ran it again it takes less than 1 second to complete. Why it is happening? Thanks, Tz.

  • How to upload pictures from laptop to iphone

    Dear friends, i have iphone 4 with IO6, could you please help me with tools how to upload pictures from my laptop to my Iphone? Best wishes.

  • Problems in FTPS file adapter

    Hi, I have configured a sender file adapter to use FTPS.When I lookinto the adapter monitor the corresponding communication channel has a red symbol saying 'Error: Error connecting to ftp server 'dev-db1': FTPEx: Please login with USER and PASS'. I h

  • Print wirelessly on canon pixma MP780 from Macbook Pro

    Hi I have a Canon Pixma MP780 and want to know if I can set it up to print wirelessly from my Macbook Pro.  I would appreciate any advice if you know how to do this.  Thanks very much.

  • Can't get Addictive Drums on Inst. track to record.

    ok I just installed Addictive Drums and am having a hard time getting it to record the audio. I have AD set up on an instrument track and have my drums all set to go, but when I play the beats in the AD window and hit record in Logic it is not record