How to create a session by AppsLocalLogin.jsp

first, in auth.jsp we check fnd_global.user_name against "ANONYMOUS" to see whether user is logged on.
if not, we invoke AppsLocalLogin.jsp to create a session.
http://server:port/OA_HTML/AppsLocalLogin.jsp?requestUrl=report.jsp%3Fparam1%3Dyyy
the login page shows, page re-directed to report.jsp.
however fnd_global.user_name doesn't work. it still returns "ANONYMOUS".
if user logged on OA normally, then the whole thing worked. it seems fnd_global.user_name doesn't like the way we login.
how should we invoke AppsLocalLogin.jsp so it'll create a proper session?
part of report.jsp:
WebAppsContext ctx =WebRequestUtil.validateContext(request, response);
conn = ctx.getJDBCConnection();
sql = "select fnd_global.user_name from dual";
(we tried to invoke RF.jsp instead.
doesn't work because we don't know how to pass the param1 to report.jsp thru RF.jsp)

This is variable what is working in my aplication
String variable;
if(user == null){
               user=new String("");
     }//if you don'y do this you will have null pointer exception
session.setAttribute("user",user);//put value
          String name=(String)session.getAttribu("user");      //get value;
I hope this will help

Similar Messages

  • How to Create a Session variable in JSP?

    How to create a session variable and add attributes to it?
    For example i want to create a session variable called "name" and add value "user" to it? if i try to do it with setAttribute(), it is giving error as both is of type string? how to do it? kindly help me

    This is variable what is working in my aplication
    String variable;
    if(user == null){
                   user=new String("");
         }//if you don'y do this you will have null pointer exception
    session.setAttribute("user",user);//put value
              String name=(String)session.getAttribu("user");      //get value;
    I hope this will help

  • How to create a session variable in Apex?

    Hello colleagues,
    Is there someone do know how to create a session variable in Apex?
    How to get them?
    Thanks
    Best Regards

    Hello,
    What do you mean by 'session variable'? You mean something that stores the value int he users session state?
    I really recommend reading the 2-Day Developer guide documentation, there is a complete section on session state -
    http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10499/concept.htm#CIHCFHBD
    Hope this helps,
    John
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd

  • How to create multiple toolbar buttons in jsp ?

    hi all,
    how to create multiple toolbar buttons in jsp ?
    plz help me

    mgmt
    plzhttp://www.catb.org/~esr/faqs/smart-questions.html#writewell
    How To Ask Questions The Smart Way
    Eric Steven Raymond
    Rick Moen
    Write in clear, grammatical, correctly-spelled language
    We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding (often enough to bet on, anyway). Answering questions for careless and sloppy thinkers is not rewarding; we'd rather spend our time elsewhere.
    So expressing your question clearly and well is important. If you can't be bothered to do that, we can't be bothered to pay attention. Spend the extra effort to polish your language. It doesn't have to be stiff or formal ? in fact, hacker culture values informal, slangy and humorous language used with precision. But it has to be precise; there has to be some indication that you're thinking and paying attention.
    Spell, punctuate, and capitalize correctly. Don't confuse "its" with "it's", "loose" with "lose", or "discrete" with "discreet". Don't TYPE IN ALL CAPS; this is read as shouting and considered rude. (All-smalls is only slightly less annoying, as it's difficult to read. Alan Cox can get away with it, but you can't.)
    More generally, if you write like a semi-literate b o o b you will very likely be ignored. So don't use instant-messaging shortcuts. Spelling "you" as "u" makes you look like a semi-literate b o o b to save two entire keystrokes.

  • How to create a session using call transaction method.

    hi , this is nagaraju,
    How to create a session using call transaction method.

    Hi,
    About Data Transfer In R/3 System
    When a company decides to implement the SAP R/3 to manage business-critical data, it usually does not start from a no-data situation. Normally, a SAP R/3 project comes into replace or complement existing application.
    In the process of replacing current applications and transferring application data, two situations might occur:
    •     The first is when application data to be replaced is transferred at once, and only once.
    •     The second situation is to transfer data periodically from external systems to SAP and vice versa.
    •     There is a period of time when information has to be transferred from existing application, to SAP R/3, and often this process will be repetitive.
    The SAP system offers two primary methods for transferring data into SAP systems. From non-SAP systems or legacy system. These two methods are collectively called “batch input” or “batch data communication”.
    1. SESSION METHOD
    2. CALL TRANSACTION
    3. DIRECT INPUT
    First step for both the methods is to upload the data to internal table. From Internal Table, the data is transferred to database table by two ways i.e., Session method and Call transaction.
    Session is intermediate step between internal table and database table. Data along with its action is stored in session i.e., data for screen fields, to which screen it is passed, the program name behind it, and how the next screen is processed.
    When the program has finished generating the session, you can run the session to execute the SAP transactions in it. Unless session is processed, the data is not transferred to database table.
    A technique similar to SESSION method, while batch input is a two-step procedure, Call Transaction does both steps online, one after the other. In this method, you call a transaction from your program.
    SESSION METHOD
    Data is not updated in database table unless Session is processed.
    No sy-subrc is returned.
    Error log is created for error records.
    Updation in database table is always synchronous
    CALL TRANSACTION
    Immediate updation in database table.
    Sy-subrc is returned.
    Errors need to be handled explicitly
    Updation in database table can be synchronous Or Asynchronous.
    Regards,
    Sruthi.

  • How to create a shopping cart in JSP?

    I am creating an online product ordering system, How can i create a shopping cart in jsp? is there a way i can save a table containg itemcode, price, quantity in jsp? Can i save it using bean or session? please help me. thanks in advance.

    Hello,
    i want to create online shopping cart using html and JSP.
    At first i want to create 1html page where login ad logup optios are provided. After his login, a JSP page containing 3 links namly T-shirts,Jeanspat and Formals is displayed.
    After user select any of the link it must go to particular page.
    There, option of color, size is provided.
    And some 5 to 6 items are displayed with its pfxd prices.
    And in the same page a cart is provided. Whe the user selects(clicks) any item the same must display in cart.
    In the same page link to T-shirts,Jeanspat and Formals is displayed agaiT-shirts,Jeanspat and Formals is displayed agaiT-shirts,Jeanspat and Formals is privided again.
    next page must show the items selected. And finally it must show the "thank you" page stating that your delivary will be delivered to you within 24 hrs.
    Thanks in advance ,
    sameer

  • How to validate a session object in jsp?

    Hi All,
    i am facing a problem.The problem is how to validate the session object object in jsp.I have written a java script by using a defined function as setInterval and has given 5 mintues if the user is idle and will show a pop up menu before time out the session but in case of page active still this pop up menu is coming. The java script as follows.
    function SetTimer(){
         //How long before timeout (should be a few minutes before your server's timeout
         //set timer to call function to confirm update
         if(timeoutMinutes)
         timerObj = setInterval("ConfirmUpdate()",60000);
    function clearTimerFn(){
              timerCount = 0;
              clearInterval(timerObj);
              //timerObj = setInterval("ConfirmUpdate()",60000);
    function ConfirmUpdate(){
         //Ask them to extend
         if(confirm("Your session is about to expire. Press 'OK' to renew your session.")){
              //load server side page if ok
              var url = "ajaxSessionchecker.do?sessionvalidate=sessionvalid";
              LoadXMLDoc(url);
    And in jsp i am calling this js function as
    <%session=request.getSession(false);
              if(session.getLastAccessedTime()==60000){ %>
              <script type="text/JavaScript">
         clearTimerFn();
    </script>
    <%}else{
    session.setMaxInactiveInterval(-1000);} %>
    could you pls help me out?

    The reason for doing this is when ever i come to this user.jsp from account.jsp with a different account number this user.jsp is not refreshed and i still
    see the same old user.jsp for the previous account that i naviated before. Also please let me know if there is any other approach to acheive this taskDoes refreshing the page by pushing F5 solve the problem?
    If so, then the browser is caching the page, despite your attempts to stop it.

  • How to create a session cookie on demand

    Hi,
    I search the web but couldn't find anything related to creating session cookies on demand. I want to create a session cookie storing encrypted user tokens when there is none, for example, when the first page is called.
    The encryption part is OK, but I want how can I intercept every call to a set of pages and create the session cookie if it doesn't exist.
    I'm using ADF, of course, and Weblogic.
    Anyone can provide some examples or source code?
    Thanks.

    Cookies are accessible via the http request and response, there you can add new cookies and or change existing ones.
            ExternalContext ectx = FacesContext.getCurrentInstance().getExternalContext();
            HttpServletResponse response = (HttpServletResponse) ectx.getResponse();
            // get existing cookies
            Cookies [] cookies =((HttpServletRequest)ectx.getRequest()).getCookies();
            // create and set a new one
            Cookie cookie = new Cookie( "key", "value" );
            response.addCookie( cookie );This code should work in a bean. After setting the cookie you need to implement a servlet filter or a page phase listener where you check the requested url and then check for your cookie.
    Timo

  • HOW DB POOLING WORK AND HOW TO CREATA A DB POOLING IN JSP

    HI! I'm new in programming JSP and in web programming. I would like to learn how does the DB pooling work and how to create a DB Pooling. THANKS....

    Thanks for the idea but i need a more detail one...
    Hi,
    Db connections are one of the most expensive
    operations in an application.So at applicatin launch
    only multiple connections to the dbase are opened and
    used and returned/closed after usage.
    You can have a loop running 10 times creating a
    connection every time and putting those in a
    Collection object (say hashtable) marked with a key.
    Then in the application code , take an available
    connection from the hashtable and use it . After use
    return /close the connection (your pool can be
    incremental..creating 5 connections evey 10-15
    minutes).

  • How to Create a session in Servlet

    will somone show me the code to create a session in servlet?
    if a session can be created in servlet file, it can be used all the jsp files in a same web ?
    Thanks!!!

    Session in Java web application is started by the web server itself.
    In a servlet you can get the session by
    HttpSession session = request.getSession();
    It will return the current session associated with this request, or if the request does not have a session, creates one.

  • How to create Reports and Forms using JSP

    Hi,
    How to create reports using JSP. And how many types of reports can be created using JSP.Can anyone explain with example please.
    Thanks,
    Vijayalakshmi.M

    Here is some code that creates xml for any SQL that returns a ResultSet. Note this uses my default out-of-the-box XML template, but you can quickly create and use your own templates to generate xml to look anyway you desire.
    FormattedDataSet fds=FormattedDataSet.createInstance();
    Map miscData=new HashMap();
    map.put("rootElement", "musicgroups");
    String xml=fds.getFormattedDataSet("select * from groups", miscData, "xml1");
    String xml has the value:
    <musicgroups>
    <row rowID='1'>
      <group_id>1</group_id>
      <group_name>Rolling Stones</group_name>
      <type>Rock</type>
    </row>
    <row rowID='2'>
      <group_id>2</group_id>
      <group_name>Beatles</group_name>
      <type>Rock</type>
    </row>
    <row rowID='3'>
      <group_id>3</group_id>
      <group_name>Led Zepplin</group_name>
      <type>Rock</type>
    </row>
    </musicgroups>steve -
    http://www.fdsapi.com - The easiest way to generate dynamic HTML and XML
    http://www.jamonapi.com - A performance tuning and scalability measuring API

  • How to create another session for a help page ?

    Hello
    I am trying to create help system for an application, which would be similar to apex's own help system. The main thing is that the help page/application/procedure would run independently of the calling application, and therefore it needs to create another session, I suppose ? How do you implement that ? I have also tried to find description of the package wwv_flow_help, but haven't found anywhere. Is it useful here ?
    Thanks for any comments

    If the link is from a page in your application then that's exactly what you want to do using javasScript to open a new window but keeping the same session ID in the request. In this way, when the new request is received by the Application Express engine, it will have the session cookie that goes with the specified session ID.
    Scott
    P.S. You can help us by telling us your first name and putting it into your handle and/or profile.

  • NW7.10: How to create NetWeaver 7.10 Mobile JSP Application

    Dear Colleagues,
       I would like to have help documents or external links, to, how to create a mobile JSP application with all the steps neccessary for the same.
      Thanks in advance.
    Regards, Siraj

    Hi,
    You can take reference from SAP Mobile Development Kit (MDK) which is integrated in SAP NWDS with MI plugin. There a complete reference is given along with the sample code.
    Below are some links for further reference:-
    http://help.sap.com/saphelp_nw04/helpdata/en/29/3255c4ef7bbc4fbe4287aa1a0557da/frameset.htm
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bc48bf90-0201-0010-5a95-b671fea8f2b4
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/a3/583aef1baa6d42b22bedcb4dec5db9/frameset.htm
    http://www.sdn.sap.com/irj/sdn/nw-mobile71#section2
    Hope that this information would be useful for you guys to start with the SAP MI.
    Regards,
    Saurabh Mathur

  • How to create crystal reports using servlets/jsp

    plase any body help me how to create and interact with crystal reports using java

    To use the inproc RAS SDK with CR.NET, you'd have to purchase either (1) Crystal Reports XI Release 2 Developer edition, and apply Service Pack 2 or above, or (2) Crystal Reports 2008 (not Crystal Reports Basic that comes with Visual Studio 2008).
    Sincerely,
    Ted Ueda

  • How to create a PDF from a JSP

    Hi , we would like to convert a HTML report generated from a JSP page into a PDF file. Appreciate if anyone has any pointers on how that can be accomplished. Search a google returned some suggestions saying that we would need some 3rd party softwares to get this done . Please let me know if you are aware of any such softwares. Is there a way we can get this done using any of the standard features of Oracle 8i/Oracle 9i lite/Java 1.3
    Thanks Gurus !

    I've used iText (http://www.lowagie.com/iText/) in the past to create some really elegant reports. This is not part of OC4J, so you will need to add the library.
    Jason

Maybe you are looking for

  • With Reader XI There was an error opening this document. Access denied

    Hi there, It looks like I have a simular problem. I also get the error "There was an error opening this document. Access denied." This when I tried to open the file by clicling on the file. When I try to open the file from out Adobe reader it gives m

  • Eprinter won't print

    I have an HP B 210 eprinter.  It is connected and working fine;  But, it will not print remotely !!  Please help !!   I have turned wireless off and on again; I have power cycled it... nothing.  Thanks in advance for your reply.

  • MIRO document number

    Hi Experts, I am trying to enter invoices using miro with two different company codes , one has document number in the header while the other doesnt . Can you please tell me how to bring back the document number in the header. The document number opt

  • Any New News on Creative Produ

    As some of you may know, Creative is no longer selling or manufacturing the Zen Vision W. I wanted to know if any of you are aware of any new wide screen PVP players creative may have in the works, or is the "ZEN" the last PVP creative will make?

  • Cant Dial a mobile number in Acapulco, MX

    Hello, I use skype to go all the time without a hitch to numbers that are in my subscription. I have the unlimited Mexico plan.  I recently added a mobile number it says its .04 a minute I have plenty of skype credit to cover the call. I tried and it