Re: maintain session after login

Is the session object not working for you? Are you implementing some special security features such as WebSphere secured pages?

U need to store the id & password in session when a user is auntenticated . When user clicks on "buy", just check up if the session object exists .If exits, then proceed, else login screen sud appear

Similar Messages

  • On new session after login procedure and :APP_USER

    Hi,
    I need to get some info using :APP_USER on a new session after login procedure but it's always null:
    I'm referencing it this way:
    my_var := :APP_USER;
    Any help is wecome
    For the forum moderator, I got some problems, could you please close 2 of my repeating treads. Thanks
    Message was edited by:
    Rafael M

    Hi Scott,
    I am facing the same problem. I have created one application process with process condition On New Session: After Authentication. In this application process i am checking for :app_user in particular table, if the person does not exist i am inserting a record in to the table. But every time :app_user is having null value with On New Session: After Authentication process condition. It is working fine for remaining process conditions.
    Thanks in advance for your help
    Regards
    Ram.

  • Save cookie/session after login on web service client

    I am calling a web service that has a login method. It sets a session id in
    a cookie. Every subsequent call fails and says I'm not logged in. How do I
    save their cookie or session ID such that the server thinks I'm logged in?
    Here's the client code (I used clientgen to create jar from wsdl);
    DatashareManager dsm = new DatashareManager_Impl();
    WebServiceContext wsContext = dsm.context();
    WebServiceSession session = (WebServiceSession)wsContext.getSession();
    DatashareManagerSoap dsmsoap = dsm.getDatashareManagerSoap();
    String result = dsmsoap.login("username", "password"); // this works
    EResult result2 = dsmsoap.deleteReusableList(1, "bob"); // this fails 'Not
    logged in'

    That sounds like a difficult one to implement because you'll essentially need to intercept the AppsLogin servlet (or AppsLocalLogin.jsp) to conditionally redirect the user somewhere else - and that would be an intrusive (and not recommended) customization.
    Some possible alternatives:
    1. Rather than publish http://hrlive.myintranet.local:8000/OA_HTML/AppsLogin as the URL that you users connect to, publish something like http://hrlive.myintranet.local:8000/OA_HTML/XxLogin.jsp instead. That could be a custom JSP that asks the user to agree to the disclaimer and, when they agree, store that agreement in a cookie and then redirect to AppsLogin.
    That's not quite the same because you're asking the user to agree before they login. It also means that they can navigate direct to AppsLogin and bypass the disclaimer (unless you customize AppsLogin to verify the cookie).
    2. Assign all users a default 'Disclaimer' responsibility with a single function (such as an EIT, or a custom OA Framework page) that allows the user to agree to agree to the disclaimer. Then once they've agreed to it have some process that automatically grants them their real responsibilities and revokes the Disclaimer responsibility. For example, if you used an EIT that could be an API User Hook.
    One problem with this approach is that you'll need to clear cache through Functional Administrator before the new responsibilities are visible so you'll either need to find a way of doing that programatically or ask the user to wait until tomorrow (assuming you do a nightly web server bounce).

  • Session state always invalid after login

    Hello community,
    i have a functional login process which uses my own login with username and password. After login i branch to application start page, but this session now is different from the start login session, so every login is invalid and will branch to authentication scheme invalid page.
    My login url is: f?p=100:100:123456
    After correct login (i have tested in the database with a lot of inserts into tmp_table)
    i want to branch with the standard login procedure wwv_flow_custom_auth_std.login() to page 1000.
    The correct url is shown in the browser, but the current page is the login page 100, because (i think) the session is invalid. In the authentication theme the invalid session page is set to page 100.
    I have tested several pages and always this page is branched.
    So im shure, that the session state is always invalid after login.
    But why ????
    Has anyone an idea ?
    Thank you for responding.
    Frank

    Hi Jari,
    problem was solved.
    The IE8 has cached an invalid site.
    I know now were it is come from.
    I have an after submit process which sets the cookie with following code:
    owa_util.mime_header('text/html; charset=UTF-8;', FALSE);
    owa_cookie.send(
    name=>'DHW_COOKIE',
    value=>utl_raw.cast_to_raw(dbms_obfuscation_toolkit.md5(input_string => ':P100_REGCODE' || :P100_USERNAME ))
    owa_util.http_header_close;
    But this results in display on the screen like html text without tags, so it looks like text on the screen header.
    It shows "content-type=text/html charset=WINDOWS 1252 .......
    The cookie is not set to the disk and now the IE8 explorer is dead.
    The described problem of this thread is shown.
    If you close all sessions and restart IE8 then the error is fixed.
    Also i have disabled the after submit process with setting the cookie.
    So i live now without having a cookie set.
    Do you have any idea for this behaviour ?
    Frank

  • Edit session value after login

    I would like to edit the session value of a session that is set after a user logs in.
    Problem:
    I have a field 'date of birth' in my database: yyyy-mm-dd, but i need the age value instead in the session.
    I know how to calculate this but that is not the question, i need to know where to edit this value so that after a login the session is set to the age of the user instead of his/her date of birth value from the database.
    I hope you understand.
    Can someone please help me out...
    Thanks,
    Jim

    Hi Jim,
    <br />
    <br />nope, Adobe/Interakt are not participating here.
    <br />
    <br />However, I do *think* that converting these values *upon* login seems quite weird to do -- ADDT´s session variables are based on the "as is" contents of DB table fields, and what you´re asking for is a very special usage scenario which was even never asked for in the Interakt forums, so that´s why assumingly other forum particpants reading this keep scratching their heads as well.
    <br />
    <br />The only approach I can suggest for now, is to convert the session variables *after* login, and that´s quite easily possible -- on that very page that´s going to display the banner, it should be possible to initialize the abovementioned "calculate age from birthday" conversion routine and assign the session variable "current_age" to the PHP variable "$birthday_user", e.g. $birthday_user = $_SESSION['current_age'];
    <br />
    <br />Once you have this clearly assigned, all you´d have to do is to apply a "Show IF conditional region" that´s checking against the $birthday_user value, e.g.
    <br />
    <br /><?php<br />// Show IF Conditional region_check_user_age<br />if ($birthday_user < 20) {<br />?>
    <br />display banner for folks under 20
    <br /><?php<br />// else Conditional region_check_user_age<br />} else { ?>
    <br />display banner for folks older than 20
    <br /><?php }<br />// endif Conditional region_check_user_age<br />?>
    <br />
    <br />As the line breaks in the code posted above will most likely disappear as before, I´m attaching a text-only version
    <br />
    <br />Cheers,
    <br />Günter Schenk
    <br />Adobe Community Expert, Dreamweaver

  • Waiting components some time to be rendered after login

    Hi all,
    I have an ADF application with a login page. When I run the application for the first time with integrated weblogic server and click the login button
    ,go to the second page after login, it takes about 5 seconds for the all components to be rendered in the second page.
    Actually , at first, only the icon and toolbar of a panelbox is shown and after some time (about 5 sec), all the remaining components( that are inside other
    panelboxes) are shown...
    After this first run, there is no problem . I login , logout and login again without any waiting.. I also try with other browsers (without re-run from jdev)
    open the first login page,login with other users and there is still no problem ..
    What I want to ask is that , when I deploy this application to a production environment, will all the users live this problem when they run the application for the first time ?
    Thanks ...

    Hi Alejandro ,
    Thanks for the reply...
    Users login with a request scoped loginBean. In this bean users are forwarded to a new page and after that, 3 session variables are set for that user(HttpSession). These 3 variables come from
    "public ArrayList<String> getPersonelInfo(String userid)" function that is in AppModuleImpl class:
        public String doLogin() {
            String un = _username;
            byte[] pw = _password.getBytes();
            FacesContext fctx = FacesContext.getCurrentInstance();
            HttpServletRequest request = (HttpServletRequest)fctx.getExternalContext().getRequest();
            try { 
                Subject subject = Authentication.login(new URLCallbackHandler(un, pw));
                weblogic.servlet.security.ServletAuthentication.runAs(subject, request);  
        ////// ServletAuthentication.generateNewSessionID(request);
                String loginUrl = "/adfAuthentication?success_url=/faces/secondPage.jsf";
                HttpServletResponse response = (HttpServletResponse)fctx.getExternalContext().getResponse();
                sendForward(request, response, loginUrl);
                setLoginSessionData(un);
    public void setLoginSessionData(String un){
                  String amDef = "model.AppModule";
                  String config = "AppModuleLocal";
                  AppModuleImpl am = null;
            ArrayList<String> pi = new ArrayList();
    am = (AppModuleImpl)Configuration.createRootApplicationModule(amDef, config);
                  try{
                      am = (AppModuleImpl)Configuration.createRootApplicationModule(amDef, config);
                       pi=am.getPersonelInfo(un);
    In this new second page, there is a page template different from the login page.Thare are about 12 af:commandImageLinks inside a panelBox in this template
    In the body facet of this page there are 4 panelboxes
    In the first pbox, user info is displayed (6 variables from a view object )
    In the second pbox, a inputNumberSpinbox , a selectOneChoice and a button that calls an Oracle Report with a view scoped managed bean
    In the third pbox, 2 inputText and a goButton that calls an another Oracle report with a request scoped managed bean..
    and in the fourth pbox, there is a questionnaire application:
    a panelFormLayout, questions with "First","Next","Previous" and "Last" buttons ( based on a entity based VO )
    and selectOneRadio for options of the question ( based on a query based VO)
    and a button to vote ( request scoped managed bean - this bean also calls a method in AppModuleImpl class to insert the user's answer into dbase)
    and a graph to show results ( based on a query based VO)
    and some bindings to show user's choice if the user has already answered that question..
    questions VO are linked to options VO, graph VO and answers VO ...
    and there is also a session scoped managed bean ( that sets some variables about user-environment etc.) when the user comes
    to second page..
    I think that  is all ...
    Thanks..

  • Cannot create a session after the response has been committed (Tomcat 6)

    I'm getting a rather annoying error when I try to open a pretty basic JSP page.
    I'm rather new to the whole JSP scene, so I'm following the example found on pages 287 and onwards in "JSF in Action - Manning" in case anyone wanted to check my code against the source.
    I've searched for about 4 hours now, coming back to this site a couple of times, once reading about writeouts and stuff. But I'm not really sure this is the issue in this case and if it is, where exactly the problem lies.
    I've already fixed a number of errors I got (jtsl.jar and standard.jar missing etc...) but this particular problem is driving me (and my co-workers for that matter :-) ) up the wall.
    Anyone willing to help me out here?
    Error:
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Cannot create a session after the response has been committed
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
    root cause
    java.lang.IllegalStateException: Cannot create a session after the response has been committed
         org.apache.catalina.connector.Request.doGetSession(Request.java:2301)
         org.apache.catalina.connector.Request.getSession(Request.java:2075)
         org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
         org.apache.myfaces.context.servlet.SessionMap.setAttribute(SessionMap.java:53)
         org.apache.myfaces.util.AbstractAttributeMap.put(AbstractAttributeMap.java:103)
         org.apache.myfaces.util.AbstractAttributeMap.put(AbstractAttributeMap.java:35)
         org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedViewInServletSession(JspStateManagerImpl.java:523)
         org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedView(JspStateManagerImpl.java:358)
         javax.faces.application.StateManager.saveView(StateManager.java:47)
         org.apache.myfaces.application.jsp.JspViewHandlerImpl$StateMarkerAwareWriter.flushToWriter(JspViewHandlerImpl.java:387)
         org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:322)
         org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
         org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
    Source Code of login.jsp:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <f:view>
    <html>
    <head>
         <title>
              <h:outputText value="ProjectTrack"/>
         </title>
    </head>
         <body>
              <table>
                   <tr>
                        <td>
                             <h:graphicImage url="/images/logo Skillteam.jpg"
                             alt="Welcome to ProjectTrack"
                             title="Welcome to ProjectTrack"
                             width="435" height="120"/>
                        </td>
                   <td>
                        <font face="Arial, sans-serif"
                        size="6">
                        <h:outputText value="ProjectTrack"/>
                        </font>
                   </td>
                   </tr>
         http://forum.java.sun.com/post!default.jspa?forumID=45#
    Click for bold     </table>
         </body>
    </html>
    </f:view>
    web.xml & faces-config
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
         <display-name>ProjectTrack</display-name>
         <welcome-file-list>
         <welcome-file>faces/login.jsp</welcome-file>
         <welcome-file>index.html</welcome-file>
         </welcome-file-list>
         <servlet>
         <servlet-name>Faces Servlet</servlet-name>
         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
         <load-on-startup>1</load-on-startup>
         </servlet>
         <servlet-mapping>
         <servlet-name>Faces Servlet</servlet-name>
         <url-pattern>/faces/*</url-pattern>
         </servlet-mapping>
    </web-app>
    <?xml version="1.0"?>
    <!DOCTYPE faces-config PUBLIC
    "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config>
         <navigation-rule>
              <from-view-id>/login.jsp</from-view-id>
              <navigation-case>
                   <from-outcome>success</from-outcome>
                   <to-view-id>/inbox.jsp</to-view-id>
              </navigation-case>
              <navigation-case>
                   <from-outcome>failure</from-outcome>
                   <to-view-id>/login.jsp</to-view-id>
              </navigation-case>
         </navigation-rule>
    </faces-config>Setup:
    Eclipse Europe 3.3.0
    Tomcat 6.0.13
    MyFaces 1.2
    JRE 1.6.0_02

    When searching for this error, this was the first page google gave me. I found the answer and just in case anyone else stumbles in here with the same question I thought I'd share my findings.
    Unfortunately, if your problem is the same as mine, you're going to feel pretty silly. I was navigating to the wrong page. If MyFaces(when running tomcat) tries to resolve to a page that doesn't exist, the error given above is what happens.
    In my case I accidentally put my .jsp page into the wrong directory and ended up banging my head against the wall for an hour figuring that out. Hope this helps someone.

  • Maintaining Session State

    Hello,
    Does anyone know how to maintain session and application variables through server restarts? I want to be able to shutdown and startup my Tomcat server without having the users lose their session and application variables (and consequently, their data and login state).
    Any ideas?
    Thanks!
    -David

    I dont think its possbile since stopping and restarting gets new sessions. Only way that I would know would be to use cookies.
    But then again i dont like the idea of saving passwords in cookies

  • Regarding maintaining session in flex

    Hello,
              I am developing a flex application which is using jsp for database connectivity. I am using HTTP request for connecting to jsp page and passing and retrieving parameters. Now I wanted to ask how can I maintain session in flex so that I can know which client has logged into the system and on the basis of that can assign privileges to the client. Is it possible in flex and how?Reply needed urgently.
    Thanks in advance.

    Hi a.bhavika,
    There is not specifically any session management in Flex as it runs everything on the client side if at all you want to mainatain you can maintain it on the server side. ...and I think for your case I dont think you need any session managemenet as at the time of login only you can identify which user has logged in to the syetem and based on the user logged in you can load all the previleges of that particular user in the Flex application.
    Check out the links below for your understanding...
    http://www.forta.com/blog/index.cfm/2006/9/24/flex-and-session-state-management
    http://www.assembla.com/wiki/show/romoz/Session_Management_in_Flex
    Thanks,
    Bhasker

  • Maintain session in Multiple soap calls

    Hi Experts,
    We have an requirement which runs 2 synchronous calls.
    1st synchronous cal is for validating user credentials and
    2nd synchronous call (for successful log in) for uploading data in R/3 system.
    The main task is to maintain session(ex: time 15 mins) .
    1st synchronous call looks like Mobile Application (soap sender)<--->PI<----->(Soap receiver)Active Directory.
    2nd synchronous call looks like Mobile Application (Soap sender)<--->PI<----->(Proxy)R/3 system.
    can you pls let me know how can I achieve this requirement and
    how to maintain session ID, session (is it in PI or in third party) and from where to maintain session.
    Thanks in Adv..

    I am calling multiple web service apis from my bpel process on the same link. The Web services are written such that I always have to call a "login" api first which creates a context that's maintained throughout the session. Thus subsequent ws calls have to be made in the same session because all the other web service apis require the context to be present.
    You can think of this as a stateful SessionBean (sort of).
    The question is does bpel support this?

  • Maintaining Sessions through Multiple Servlets and Contexts

    Hi,
    I have a webapplication that works like this:
    * User connects to a login servlet on HTTPS
    * Users information is authenticated on HTTPS
    * An object is stored in the session for other servlets to validate the users access
    * Authenticated users are forwarded to an HTTP page where the session is used to make sure they were granted access
    My problem is this....Since I create the session in an HTTPS context, when I am in the HTTP context, I am unable to access the session and constantly get NULL. Is there any way that I can access the session from an HTTP context?

    What you can do is, just login using HTTPS and switch over to HTTP
    and then store data in session.That is true, but what I want in the session is basically a flag on whether or not the user was granted access. I would much rather set all that up on the secure line, and then just access it from the unsecure ones...
    For example, you are creating session using the
    http://testdev:port/index.jsp page.
    If access the same page(with hostname)
    http://10.300.20.18:8080/index.jsp, you can't get the session even
    though both are same web server and same web application. Because the
    browser treats it different sessionI think if you use my above solution with the explicit passing of the jsessionid, you can move from one domain to another and still maintain session. Not positive on that though...

  • Since I installed OSX Lion on my MacBook Pro, sometimes after login, the colored wheel keeps turning and I can't do anything

    Since I installed OSX Lion on my MacBook Pro, sometimes after login, the colored wheel keeps turning and I can't do anything. When I click on some icon or in the menu, no happens.
    After a long time (more than 1 hour), I decide to switch off my Mac holding the button down and when I boot and log in again, it works normally.
    Remark: When I logoff, I do not ask to keep my open programs for the next session.
    I have a MacBook Pro 2010 with 4GB Ram.

    wrong reply

  • Maintain session

    I have a client side java program running. It is to comunicate with a web server using HTTP. How do I maintain session in my java program in the client machine. I have no access to the web server.
    java.net.URL and java.net.HttpURLConnection are not maintaining session, tough allow me to transact. It creates a new session for every hit.
    help!!!
    Trijoy
    [email protected]

    Hello Darted,
    I have a small task ahead. My boss hates logging in userid and passwords every time he logs ont a site, which he dose 10-15 times a day. Due to session timeouts, he has to repeat the login process.
    The requirement is that, I should have a process running, that will maintain the session throughout the day by hitting the URL every 18 mins or so..(session timeout is of 20 mins), and when he writes the URL the old session is maintained.
    The process is such that it sends data over http to the server. The data is accepted only for the live and valid session. At present we are sending it through a form (post). If the state can be maintained in the java applet, swing or whatever, we will remove the HTML form and will automate the process of form sending.
    I am looking for a mechanism which emulates a browser, i.e. maintain the session till it gets time out or browser is closed.... only I want to avoid using a browser and refreshing it every time and want to implement it thru java so that I can have control over it.
    Thanks
    Trijoy
    PS. Any help in design, source code, suggestion is highly appreciated

  • Cisco ace Load balancer not maintaining session persistence

    Hi All,
    We have observed from the IIS logs on the internal webservers that loadbalancer is not maintaining session persistence for two specific request for the internal servers.
    https://123.xyz.com/Webresource.axd
    https://123.xyz.com/ScriptResource.axd
    Error
    Webresource.axd : 500
    Scriptresource.axd: 404
    Session persistence is maintained for all other requests hitting loadbalancer.
    Issue is observerd on hits for these two specified components. WebResource.axd and ScriptResource.axd are Http Handlers used by ASP.NET and Ajax to add client-side scripting to the outgoing web page.
    For e.g /WebResource.axd d=t2GXfySdqWmJ-lZSI0KVbw2&t=634868473645172160 is valid for server 1 and return 200 response but the same request is seen on few other servers where the response is 404 even though load balancer cookie is same. This means that if the request for the both the axd contains a valid decrypter and it connects to the right server then the response seen is 200.
    The url passed by the user contains d and t parameters when are unique for each user session.
    Solution tried:
    Accessed website via another VIP without http redirect rule but could not see difference.
    Tried to match machine key across all servers : Failed . Could see the ‘d’ value different for each server.
    Load balancer VIP :
    x.x.x.x
    redirect: http > https
    SSL Offload : ON
    Poool:
    WEB1
    WEB2
    WEB3
    WEB4
    WEB5
    All servers listening on port 80
    sticky config:
    sticky ihttp-cookie cookie1 vip-1.1.1.1-80-stickyfarm
      cookie insert browser-expire
      replicate sticky
      serverfarm vip-1.1.1.1_80
    sticky http-cookie cookie1 vip-farm:1.1.1.1:443
      cookie insert browser-expire
      replicate sticky
      serverfarm farm:1.1.1.1:443
    Has anyone else come across similar issue?
    Can you plese check if there is any config on cisco ace that will ensure that session persistence is maintained for these 2 requests.
    Thank you for all the help.
    regards,
    Sangram

    Hello Sangram,
    We would need simultanous packet traces before and after the ACE to get to the root cause of this issue so I would recommend that you open a cisco tac case for more in depth troubleshooing of this issue.
    Joel Lamousnery
    CCIE R&S - 36768
    Engineer, Customer Support
    Technical Services

  • How to maintain Session between two ear files?

    HI Guys
    I have deployed two ear files in oc4j. One is used to open applet and other for business operations.
    My problem is after calling applet my session gets invalidate. How to save session between two context
    I am new in this field please help!!
    the sooner the better
    Rahul

    Can I do this if I integrate oc4j with apache!!
    Can I maintain session
    Plz. Help
    Rahul

Maybe you are looking for

  • How do I use the same pictures for all desktops

    I am trying to use the same folder of picture across all my desktops.  It seems that every desktop I have to go in to preferences and click the same thing over and over.  Is there a way to do it once and apply it across all desktops?

  • ADF :Hello world Page and discussion for its deployment with Oracle guys!

    I have written a small article of creating hello world page in ADF with screenshtots,here is the link: http://mukx.blogspot.com/2008/03/adf-hello-world-page.html This article can help you for a self starter with ADF and some baisc idea of same compon

  • No Carrier

    Hello! Yesterday morning my 2G iPhone lost its Carrier Signal and I can't find any Singal since then. I tried to restart the phone, I turned on an off the airplaine mode, I reinsert the SIM-card and I even restored the phone! If I start manually a Ca

  • Downloading Oracle9i Database Release 2 Enterprise/Standard/Personal Editio

    Downloading Oracle9i Database Release 2 Enterprise/Standard/Personal Edition for Windows NT/2000/XP. I have Windows XP Media Edition on my home PC. The file sizes do not match the page and when I try to unzip I get the message it is not a valid archi

  • Lightroom JPG import problem.

    Hi, I just downloaded the trial version of Lightroom. I have a Nikon D50 and I am using it in the highest JPG quality (or RAW when I shoot for special occasions) in P mode. I do now have about 1500 photos on my hard drive and because I just installed