Problem in session management

Hi i have a servlet which simply verify the userId and password and after successful login it redirect the control to a JSP page where the data is displayed. When i log out it redirect me to another JSp page Known as "Login.jsp" and from there when i pressed back button it is again going to the previous(Data.jsp) page which sould not happen.For this back button i added "*response.setDateHeader("max-age",0);"(whcih is for IE only)* and its now asking "Ur page has expired" But from here if i press "Refresh" button it is again taking me to the "Data.jsp" page.
my servlet i am doing like this :
ResultSet result = stmt.executeQuery(str_queryString);
if(result.next())
result.beforeFirst();
while(result.next())
str_storedUserId = result.getString("userName").trim();
str_storedPassword = result.getString("password").trim();
if((str_storedUserId.equals(str_inputUserId)) && (str_storedPassword.equals(str_inputPassword)) && (str_storedUserId.length()!=0) &&
*(str_storedPassword.length()!=0))*
request.setAttribute("loginSuccessful", new String("true"));
request.getRequestDispatcher("ACPData.jsp").forward(request,response);
else
request.setAttribute("loginSuccessful", new String("false"));
request.getRequestDispatcher("Login.jsp").forward(request,response);
else
request.setAttribute("loginSuccessful", new String("false"));
request.getRequestDispatcher("Login.jsp").forward(request,response);
and my ACPData.jsp is like this :
*<%*
System.out.println("Before clearing the cache");
response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setHeader("Cache-Control","no-store");
response.setDateHeader("Expires", -1);
response.setDateHeader("max-age",0);
response.setHeader("Pragma", "public");
System.out.println("after clearing the cachessss");
*%>*
*<%*
try
System.out.println("Session id in Data.jsp  "+session.getId()+"   "+session.getCreationTime());
Statement stmt=null;
stmt= new MakeConnectionUtility().connection();
ResultSet rs=stmt.executeQuery("select from acp_data limit 0,10");*
*while(rs.next())*
*%>*
*<tr>*
*<td width="15%"><center><%=rs.getString(1)%></center></center></td>*
*<td width="20%"><center><%=rs.getString(2)%></center></td>*
*<td width="20%"><center><%=rs.getString(3) %></center></td>*
*<td width="34%"><center><%=rs.getString(4) %></center></td>*
*</tr>*
*<%*
*catch(Exception e)*
*e.printStackTrace();*
*out.println("Exception in getting resultset : " + e);*
*%>*
and in Login.jsp i am doing like this :
*<%*
*if(request.getParameter("logout")!= null)*
*if (request.getParameter("logout").equals("true"))*
*System.out.println("Logout trueeeeeee");*
*out.println("Enter Your user id and password");*
*System.out.println("Session id in Login.jsp "+session.getId()+" "+session.getCreationTime());*
*session.invalidate();*
*//session.setAttribute("logout", new String("true"));*
*if(request.getAttribute("loginSuccessful")!=null)*
*if(request.getAttribute("loginSuccessful").equals("false"))*
*%>*
*<b><font color="red">Wrong User name or Password. Please try Again.</font></b>*
*<%*
*else*
*%>*
*<b>Enter your user id and password</b></p>*
*<%*
*%>*
In my first request i am getting a url *"http://localhost/ACP/Servlet.do*" and it takes me to the "ACPData.jsp" after successful login. From there when i pressed logout i am getting a url *"http://localhost/ACP/Login.jsp?logout=true"* in my browser and it takes me to the Login screen where it is asking me to relogin and its working fine. But when i presed back button it is asking ur session has expired(as i have set the header response.setDateHeader("max-age",0); for IE only) and i am getting a url *"http://localhost/ACP/Servlet.do"* and here if i press "Refresh" button it is taking me to the ACPData.jsp which should not happen. I also checked there is only one session through out the application(in all files ie servlet and JSP) and also i am invalidating the session after "logout" and there is no data. i also set the http header in html like this
*<head>*
*<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">*
*<meta http-equiv="cache-control" content="max-age=0, must-revalidate, no-cache, no-store, private">*
*<meta http-equiv="Expires" CONTENT="0">*
*<meta http-equiv="Cache-Control" CONTENT="no-cache">*
*<meta http-equiv="Pragma" CONTENT="no-cache">*
*<title>WelCome to Smart Cathodic Protection</title>*
*</head>*
but even after that also same problem is persisting. Can anybody plz help me in this regard
Thanks in advance

Hi minal Thanks for ur reply. I have tried with Java Script but after logging out if i copy the url and paste it in a new window(browser) its again taking me to the data page.

Similar Messages

  • I have a problem with session manager session files because of the invalid json storage data submited by firefox

    Hi, i have problem with session manager's session files. The problem is: the submitted storage data from firefox which is put between "storage":{ and its matching closing brace } But in some of my session files there is non equal { and } under storage's braces. I need to get storage data but in my case it is very hard to do. My question is there any char put before or after { and } like /{ or \{ to avoid confusion? If there is not such thing, i think there could be different solution but i am not sure: i look couple of my session files; after "storage":{...} there is ,_"formDataSaved" so i can get storage data in this example ... by looking between "storage":{ and ,"_formDataSaved" easily. Is there every time ,"_formDataSaved" after "storage":{ ?  Thank you.

    Well, it seems waiting is not my strong suit..! I renamed a javascript file called recovery to sessionstore. This file was in the folder sessionstore-backups I had copied from mozilla 3 days ago, when my tabs were still in place. I replaced the sessionstore in mozilla's default folder with the renamed file and then started mozilla. And the tabs reappeared as they were 3 days ago!
    So there goes the tab problem. But again when I started mozilla the window saying "a script has stopped responding" appeared, this time the script being: chrome//browser/contenttabbrowser.xml2542
    If someone knows how to fix this and make firefox launch normally, please reply! Thank you

  • Session manager + new firefox update = corrupt sessions?!

    I just updated to the new firefox and all of my sessions are now blank or possibly corrupted and it only says how many tabs i have in each session ,but i cannot click on "recover session". Can i roll back the 36 version ,or is it a problem with session manager not being compatible with the new version ? How can i recover my previous session at least?

    To reiterate , I want to fix my sessions and my session manager, because I think I do have access to most of my tabs through another backup and potentially through a text editor ,but the new firefox update has created these discrepancies and I want to know how to bring everything back in order and specifically my sessions that are just showing a blank space within the session manager addon

  • Session management problems with SSO

    Hi all-
    I've been getting an Apex app tied to SSO as a partner app (per http://www.oracle.com/technology/products/database/application_express/howtos/sso_partner_app.html). So far, it sort of works. If I go to my apex app, it redirects me to SSO, where I authenticate and end up back in the apex app. Great. Here are two problems I've run into:
    1. If I am already authenticated to SSO, and I go to my apex app (url like: http://host/pls/apex/f?p=101:1), my browser goes into an infinite redirect (url like: http://host/pls/apex/f?p=101:1:::::FSP_AFTER_LOGIN_URL:\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|\\\\\\\\\\\\\\\\\\\). To resolve, I have to clear cookies.
    2. If I am using my apex app, then log out of SSO (in another browser window), I can still click around in my apex app (i.e., apex thinks I'm still authenticated).
    Anyone have any thoughts? I'm wondering if I need to do something in page session management (under authentication schemes) to fix #2, but I have no clue about #1.
    Thanks
    Rob

    Hi Scott-
    Thanks for the info on #2 - I'll work on that after I get #1 sorted out, since it's the more dire problem. Here's some more info:
    Apex version = 3.0.1.00.08
    SSO SDK = ssosdk902.zip
    I set it up as "My Application as Partner App." I used "MY_PARTNER_NAME" as SSO Partner Application Name. In the list of SSO Partner Apps on the SSO Admin page, my partner app name is also MY_PARTNER_NAME. It gives the following info:
    Login URL:      https://sso_host/pls/orasso/orasso.wwsso_app_admin.ls_login
    Single Sign-Off URL:      https://sso_host/pls/orasso/orasso.wwsso_app_admin.ls_logout
    Home URL: http://apex_host/pls/apex
    Success URL: http://apex_host/pls/apex/RBLICK.YOUR_PACKAGE.PROCESS_SUCCESS
    Logout URL: http://apex_host/pls/apex
    RBLICK is the schema owning the apex app. In there, I created a package called YOUR_PACKAGE:
    create package YOUR_PACKAGE as
    procedure process_success(urlc in varchar2);
    end YOUR_PACKAGE;
    CREATE PACKAGE BODY YOUR_PACKAGE AS
    procedure process_success(urlc in varchar2) as
    begin
    wwv_flow_custom_auth_sso.process_success(
    urlc=>urlc,
    p_partner_app_name=>'MY_PARTNER_NAME');
    end process_success;
    END YOUR_PACKAGE;
    Anything look obviously wrong to you?
    Thanks!
    Rob

  • Hello, I have a big problem with Firefox: Session Manager & Undo Closed Tab addons are not working, Sync Is not working. History is working. How to fix this?

    Firefox remembers history but doesn't remember closed tabs, sessions.
    It happened after updating Fox to v. 19.0.2 on one computer.
    In Firefox Options is set Use Custom Settings For History, everything is checked except Always Use Private Browsing Mode. So I am not in private browsing.
    When I press on Undo Closed Button nothing happens & in session manager Save Session Button is greyed out. I've tried installing other add-ons that can remember tabs. tried to disable/reinstall these 2 add-ons. Did't help. On my 2nd computer I have same add-ons, same settings and they are working normally. on 3rd computer undo closed tabs works also. How to fix this? I decided to ask before doing Firefox Reset...
    Sync is a separate problem. It works, but quite often it logs me out of Sync account. Then I can log in only using long recovery key and password (choosing option I don't have device with me because it does not accept keys for pairing device.)
    Thanks for reading.

    I have exactly the same settings in Options (in both computers)
    for history, these 2 add-ons and all other stuff in Options. The only difference is that on 1 pc sessions can be saved and closed tabs can be reopened, on other main pc they stopped to work. + no any other add-on that does similar things works on this pc.
    It is also interesting that I can reopen closed visited sites from History Panel, but not by pressing the Button. For now I only manually bookmark links to a temporary folder.
    Recently (some 2 month ago) I pressed x and Firefox closed all tabs without saving them without displaying save & quit pop up.
    so I changed 4 settings in about.config
    browser.tabs.warn on close true
    browser.warn on quit true
    browser.warn on restart true
    browser.show.quit warning true
    but the problem with sessions appeared only 1 week ago.
    So I guess the problem is not with the History settings or other settings. Seems that something responsible for button or for storing info about tabs/sessions got corrupted. :(

  • Session Manager Problem

    Hello,
    after creating some IVI Drivers I wanted to create an IVI Steptype for Teststand 4.2.0. After searching, I found the Session manager which was created to simplify management of different kind of sessions (IVI, VISA..) in Teststand. Unfortunately I'm not able to find any helpful documentation (except the "NI Session Manager Help") describing in which way the session manager initializes a session. The example shipped with Teststand uses different functions than described in the help file (& function panel). Here is a snippet which describes my problem:
    <<....>>
    SMObj_IInstrSession session = 0;
    CAObjHandle smSession = 0;
    long instrHandle = 0;
    char * logicalName = 0;
    SM_NewIInstrSessionMgr(NULL, 1, LOCALE_NEUTRAL, 0, &smSession);
    SM_IInstrSessionMgrGetInstrSession (smSession, NULL, logicalName, VTRUE, &session);
    //SM_IInstrSessionInitialize(session, NULL, "") ); //not necessary, getHandle intializes session
    SM_IInstrSessionGetHandle(session, NULL, SMConst_SpecificDriver, &instrHandle);
    <<....>>
    If I try to call a IVI High Level Function I'll get a "A connection to the instrument has not been initialized" error.
    The IVI Driver is initialized, because the init Function is executed and the SM_IInstrSessionGetStateDescription(...) function also displays that the session is initialized. Anyone has an idea why this happens?
    I have used the driver several times in Teststand without any problems and the settings in MAX are also correct. I'm using LabWindows 8.1.
    Thanks in advance
    7even

    Example is from the Teststand Directory ("TestStand 4.2\Examples\SessionMgr"). I have now changed some lines in my code. It is exactly the same way the example shows:
    __declspec(dllexport) void _stdcall ExecutePMIStep(CAObjHandle context)
    ERRORINFO errorInfo;
    ErrMsg errMsg = "";
    int error = 0;
    CAObjHandle step = 0;
    CAObjHandle engine = 0;
    char * logicalName = "TestSession";
    ViSession handle;
    CAObjHandle session = 0;
    tsErrChk( TS_SeqContextGetEngine (context, &errorInfo, &engine)); //Get Teststandengine
    tsErrChk( TS_SeqContextGetStep (context, &errorInfo, &step)); //Get Step
    tsErrChk( SM_GetSession(logicalName, &session, &errorInfo));
    tsErrChk( SM_GetHandle (session, NULL, SMConst_ClassDriver,
    &handle, &errorInfo));
    errChk( IOLMClass_SetMode(handle, 1, 23) ); //Custom Class Driver
    Error:
    If I execute these lines I'll get a "BFFA1190 The session handle is not valid. " error.

  • JMStudio Error  "Can not create session manager"

    Hi,
    I'm trying to transmit an mpg file through a simple pc to pc network, using the transmission wizard in the JMStudio, and everytime it causes a "can not create session manager" error, even when I try to transmit .mp3 file
    I'm using an ip like 100.100.0.1 for the sender machine, and 100.100.0.2 for the receiver machine, and I don't know where is the problem
    thanks in advance

    Um,maybe the port that you use for transmission is already occupied.
    Make sure that you are not using JMStudio to transmit streams while trying to receive streams from the same port.

  • What is new with MAX 2.0 and is it compatible with Session Manager?

    We added non-IVI instrument information in, basically the same structure as for IVI instruments,
    into the ivi.ini file to keep all instrument information in the same place. Using MAX Version 1.1 caused no problems whatsoever and the system worked fine. With the advent of MAX 2.0 you seem to use ivi.ini as well as config.mxs to store instrument information. What we have found now is that given a working ivi.ini file from MAX 1.1, we end up with 2 or 3 copies of all the devices in the IVI Instruments->Devices section! When the duplicate entries are deleted and the application exited, the
    ivi.ini file is updated minus the [Hardware->] sections which contain the resource descriptors that our appl
    ications look for. As an added complication, under MAX 2.1 (From an evaluation of the Switch Executive) It behaves the same, except that it almost always crashes with one of the following errors. 'OLEChannelWnd Fatal Error', or 'Error#26 window.cpp line 10028 Labview Version 6.0.2' Once opened and closed MAX 2.1 will not open again! (Note we do not have LabVIEW on the system.) What is the relationship between the config.mxs and ivi.ini now? Also, your Session Manager application (for use with TestStand) extracts information from ivi.ini and may expect entries to be manually entered into ivi.ini (e.g. NISessionManager_Reset = True) i.e. Is the TestStand Session Manager compatible with MAX 2.0?

    Brian,
    The primary difference between MAX 1.1 and 2.x is that there is a new internal architecture. MAX 2.x synchronizes data between the config.mxs and the ivi.ini. The reason you're having trouble is that user-editing of the ivi.ini file is not supported with MAX 2.x.
    Some better solutions to accomplish what you want:
    1. Do as Mark Ireton suggested in his answer
    2. Use the IVI Run-Time Configuration functions. They will allow you to dynamically configure your Logical Names, Virtual Instruments, Instrument Drivers, and Devices. You can then use your own format for storing and retrieving that information, and use the relevant pieces for each execution. You can find information on these functions in the IVI CVI Help file located in Start >> National I
    nstruments >> IVI Driver Toolset folder. Go to the chapter on Run-time Initialization Configuration.
    I strongly suggest #2, because those functions will continue to be supported in the future, while other mechanisms may not be.
    --Bankim
    Bankim Tejani
    National Instruments

  • What is the difference between Session timeout and Short Session timeout Under Excel Service Application -- session management?

    Under Excel Service Application --> session management; what is the difference between Session timeout and Short Session timeout?

    Any call made from the API will automatically be set to the “Session Timeout” period, no matter
    what. Calls made from EWA (Excel Web Access) will get the “Short Session Timeout” period assigned to it initially.
    Short Session Timeout and Session Timeout in Excel Services
    Short Session Timeout and Session Timeout in Excel Services - Part 2
    Sessions and session time-outs in Excel Services
    above links are from old version but still applies to all.
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Problem with Sessions, Servlets, Netscape and Solaris

    We are experiencing a problem that is confounding and frustrating us (I have
              a felling that it is something exremely minor that we are overlooking).
              Here goes:
              Context:
              The problem only occurs when using a netscape browser against weblogic
              4.51running on our Solaris 7 box (Everything works fine through IE, and
              through both browsers against our development machines which are on NT)
              Problem:
              We have a bunch of JSP pages and servlets that are used togehter throughout
              our site. They both manage session information for the user. What is
              happening is that there is no problem maintaining session information among
              all the JSP pages, but when we hit a servlet that we use to stream graphs
              back to the browser, it gets the session but it has no contents all of a
              sudden. What seems to be even more strange is that the session is not
              tagged as new (by checking isNew()), it is just empty of the contents that
              were placed it by the JSP pages. Again, this is only occurring from
              Netscape browsers against our Solaris server.
              If anyone can provide any help it would be greatly appreciated. I can
              provide more details if need be.
              Jeremy
              

    There is a property in the weblogic.properties file that lets you set
              the cookie name. If this isn't set, the port will be appended as part of
              the name. I've had a similar problem switching between http and https
              and losing sessions.
              Carles
              Jeremy wrote:
              >
              > in the link tothe servlet the URL had a :80 in it. This was because the url
              > was generated by a JSP page so that when it was moved from server to server
              > and port to port the code wouldn't have to be changed. Unfortuneately,
              > Netscape sucks and takes this to mean that x.x.x.x and x.x.x.x:80 are
              > different and won't acknowledge the cookie from the JSP pages (x.x.x.x) to
              > the servlet (x.x.x.x:80). Thanks fpr your help.
              >
              > Jeremy <[email protected]> wrote in message
              > news:[email protected]...
              > > my mistake, it appears to always happen on port 80 regardless of the
              > server
              > > it is on.
              > >
              > > Jeff Martin <[email protected]> wrote in message
              > > news:[email protected]...
              > > > It really sounds like your servlet is making a new session, even though
              > > > isNew() doesn't say so. What you might try to do is use session.getId()
              > > > to print out the session ID from your jsp pages as well as your servlets
              > > > to determine if it really is a new session.
              > > >
              > > > Do your servlets and JSPs both use the same scheme (http or https) or
              > > > cookie.setSecure()? Do your cookies use domains or paths in either
              > > > servlets or jsps (cookies can be restricted to certain subdirectories
              > > > which might be different between jsps and servlets)? Are you testing
              > > > through a proxy or firewall, or does either browser have different proxy
              > > > settings than the others?
              > > >
              > > > Jeff
              > > >
              > > > Jeremy wrote:
              > > > >
              > > > > We are experiencing a problem that is confounding and frustrating us
              > (I
              > > have
              > > > > a felling that it is something exremely minor that we are
              > overlooking).
              > > > > Here goes:
              > > > >
              > > > > Context:
              > > > > The problem only occurs when using a netscape browser against weblogic
              > > > > 4.51running on our Solaris 7 box (Everything works fine through IE,
              > and
              > > > > through both browsers against our development machines which are on
              > NT)
              > > > >
              > > > > Problem:
              > > > > We have a bunch of JSP pages and servlets that are used togehter
              > > throughout
              > > > > our site. They both manage session information for the user. What is
              > > > > happening is that there is no problem maintaining session information
              > > among
              > > > > all the JSP pages, but when we hit a servlet that we use to stream
              > > graphs
              > > > > back to the browser, it gets the session but it has no contents all of
              > a
              > > > > sudden. What seems to be even more strange is that the session is not
              > > > > tagged as new (by checking isNew()), it is just empty of the contents
              > > that
              > > > > were placed it by the JSP pages. Again, this is only occurring from
              > > > > Netscape browsers against our Solaris server.
              > > > >
              > > > > If anyone can provide any help it would be greatly appreciated. I can
              > > > > provide more details if need be.
              > > > >
              > > > > Jeremy
              > >
              > >
              

  • Session management in Info View with two different logins using single sign

    There is a form with 2 user logins UserA and User B to redirect to infoview with sso in my application. I am able to go to each of the Infoview pages successfully but have the following problem.
    User A logs in and infoview opens in a new IE window and sees his/her folders based on permissions and is able to do his/her work for the first time.
    User B logs in andand infoview opens in a new IE window sees his/her folders based on permissions and is able to do his/her work for the first time.
    <b>After a while when User A tries to access the InfoView in the previously opened IE Window, he/she gets an error message. An error has occurred: The object with ID 2519 does not exist in the CMS or you don't have the right to access it.
    User B is able to continue his/her work. Who ever logs in the last, he/she is able to continue his/her work but the other one gets an error.</b>
    <b>Please let me know on how to address this issue . I added logonToken and tried everything at my hand but no success. Is this session controlled by business objects or by the jsp page. What more changes are required for my jsp page to fix the error. Attached below are the form and the applogon.jsp snippets.</b>
    <B> applogon.jsp</B>
        IEnterpriseSession enterpriseSession = null;
        Exception failure = null;
        boolean loggedIn = true;
         String redirectURL = null;
         // If no session already exists, logon using the specified parameters.
        if (enterpriseSession == null){
            try{
                // Attempt logon. Create an Enterprise session manager object.
                ISessionMgr sm = CrystalEnterprise.getSessionMgr();
                // Log on to BusinessObjects Enterprise
                enterpriseSession = sm.logon(username, password, "cms", "secEnterprise");
            }catch (Exception error){
                loggedIn = false;
                failure = error;
            if (!loggedIn){
                // If the login failed, redirect the user to the start page.
                return;
            }else{
                // Store the IEnterpriseSession object in the session.
                session.setAttribute("EnterpriseSession", enterpriseSession);
                // Create the IInfoStore object.
                IInfoStore iStore = (IInfoStore) enterpriseSession.getService("InfoStore");
                // Store the IInfoStore object in the session using the helper functions.
                session.setAttribute("InfoStore", iStore);
                // Store the CMS name for later use.
                session.setAttribute("CMS", "CMS");
                   // Create the IReportSourceFactory object.
                   IReportAppFactory reportAppFactory =(IReportAppFactory)enterpriseSession.getService("RASReportService");
                   // Store the IReportSourceFactory object in the session using the helper functions.
                   session.setAttribute("ReportAppFactory", reportAppFactory);
                // Retrieve the logon token manager.
                ILogonTokenMgr logonTokenMgr = enterpriseSession.getLogonTokenMgr();
                   String logonToken = logonTokenMgr.createLogonToken("", 60, 100);
                   String infoViewURL = null;
                   String tokenParam = null;
                   infoViewURL = "/businessobjects/enterprise115/desktoplaunch/InfoView/logon/logon.do";
                   tokenParam = "token=" + logonToken;
                   redirectURL = infoViewURL + "?" + tokenParam;
                // Retrieve a logon token and store it in the user's cookie
                // file for use later.
                Cookie cookie = new Cookie("LogonToken", logonTokenMgr.createLogonToken("", 60, 100));
                response.addCookie(cookie);
                // Store the logon token for later use.
                session.setAttribute("token", enterpriseSession.getLogonTokenMgr().getDefaultToken());
         // Redirect the user to the relevant tutorial page.
         out.println("You have been logged on to Enterprise.");
         response.sendRedirect (redirectURL);
    Thank You for your help

    // Retrieve the parameters that the user entered into the logon fields.
    <b> user name and password come from here from the above html form into the jsp here. Ted Is this what you are asking for where does the username and password come from
        String username = request.getParameter("user");
        String password = request.getParameter("pass");
    </b>
        IEnterpriseSession enterpriseSession = null;
        Exception failure = null;
        boolean loggedIn = true;
         String redirectURL = null;
         ISessionMgr sessionMgr = null;
         // If no session already exists, logon using the specified parameters.
        if (enterpriseSession == null){
            try{
                // Attempt logon. Create an Enterprise session manager object.
                sessionMgr = CrystalEnterprise.getSessionMgr();
                // Log on to BusinessObjects Enterprise
                enterpriseSession = sessionMgr.logon(username, password, "appserver.abc.com", "secEnterprise");
                   System.out.println("line61");
            }catch (Exception error){
                loggedIn = false;
                failure = error;
            if (!loggedIn){
                // If the login failed, redirect the user to the start page.
                return;
            }else{ this code is in my first post

  • Issue in session management

    Hi All,
    I have a problem regarding java session management.
    i have created one web application in which i want if user login from one browser instance and opens another instance of same browser and logs in from that then user should be logged out from previous instance. I am using Mozzila 5.0.
    Here is what i am doing while creating session in LoginServlet.java
    session = request.getSession(false); //return session if already exists
    System.out.println("Session object: "+session);
    if(session != null)
    System.out.println("Session ID Old: "+session.getId());
    session.invalidate(); //invalidate the session if already exists
    session = request.getSession(true); //Create new session
    System.out.println("Session ID New: "+session.getId());
    Second and third System.out.println() statements giving the same session id.
    This way only the information stored in session when user was logged in from first instance of browser is replaced with the new information stored when the user logged in from second instance of browser, but the user is not logged out from the first browser instance.
    Please help me out how i can log the user out from first instance if he logs in from second instance.
    Thanks in advance...

    Since user in logging again from the same machine so i think invalidating the previous session won't work.
    Suppose user opens first instance of the mozilla browser and login as say 'ashok' whose role is normal user now he opens another instance of mozilla by clicking on executable and login as 'mitch' whose role is admin then after successful login of 'mitch' on first window mitch's menus items are getting displayed instead of ashok's.
    What i am doing is,
    While creating new session on login i first check is any existing session available in above case its true
    session = request.getSession(false); //return session if already exists
    System.out.println("Session object: "+session);
    if(session != null)
    System.out.println("Session ID Old: "+session.getId());
    session.invalidate(); //invalidate the session if already exists
    session = request.getSession(true); //Create new session
    System.out.println("Session ID New: "+session.getId());
    so control will go inside the if block, here i first invalidate the existing session (this is not destroying the session but only unbinding the information that was stored in the session) and create new session (this is returning the same session which was already exists) and save mitch's information. Since the previous instance was using the same session that will now get the mitch's information so now both instances will show the mitch's information.
    I am not getting any way to destroy the existing session so next time new session id will get generated.

  • Firefox 5 on Win7: All my plugin buttons have gone from the toolbar. They are not in the customise pane. Session manager offers the correct sessions but opens with last session instead. I've re-installed % and reset toolbars. Help!

    Win 7
    Firefox 5
    Problem with high memory use.
    restarted
    Plugin buttons gone from toolbar/
    Missing plugins still show in plugin manager but buttons missing from toolbar add buttons pane.
    Tried reset toolbars - no difference.
    Tried re-instal of Firefox 5 - no difference except:
    Session manager offers correct session on startup but starts with last session

    In case you are using "Clear history when Firefox closes":
    *do not clear the Browsing History
    *Firefox > Preferences > Privacy > Firefox will: "Use custom settings for history": [X] "Clear history when Firefox closes" > Settings
    *https://support.mozilla.org/kb/remove-browsing-search-and-download-history
    Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, passwords, and other website specific data.
    You can check for problems with the sessionstore.js and sessionstore.bak files in the Firefox profile folder that store session data.
    *Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    *http://kb.mozillazine.org/Multiple_profile_files_created
    Deleting sessionstore.js will cause App Tabs and Tab Groups and open and closed (undo) tabs to get lost and you will have to recreate them (make a note or bookmark them if possible).

  • Bug in session manager. If you work for Sun, please take a look.

    While evaluating what it would take to transition from Iplanet 6 to Sun Webserver 6.1, I found a problem with the Sun Webserver's s1ws60 session managers. If the page is not explicitly flushed before ending, the session cookie JSESSIONID is never sent. So as long as the user continues to visit small pages, they keep getting new sessions (because they are never sent a session id, so the session manager creates a new one every time they visit). The session cookie is sent if larger pages are visited (the buffer is automatically flushes). The session cookie is also sent if out.flushBuffer() is explicitly called within the JSP. This problem was not present in IWS6.0.
    The problem has been tracked down to a combination of the code in com.iplanet.server.http.session.IWSSessionManager (found in the "plugins" directory) and the JSP's Java code generated by a component of the webserver (Catalina?). Under Iplanet, the code generated in the finally{} section of the JSP first flushed the buffer, then called releasePageContext. Under Sun Webserver, the code generated just calls releasePageContext without explicitly flushing the buffer before the call. When flushing the buffer for a non-committed response, the headers are first generated and sent, along with any cookies, including the session cookie. The server only sends the session cookie if, among other things, the session satisfies "_session.isNew()". The order of events in releasePageContext ensures that this is never true when used in combination with IWSSessionManager. I don't have the source code to verify this, but from experimentation I think this is the reason: Before the buffer is flushed, the session is saved by IWSSessionManager.update(session), which at line 498 calls "sn.unsetNew()". So the session is never isNew() when it gets around to sending the session cookie. This can be resolved by either adding an explicit buffer flush to the finally{} section of the JSP, or removing the unsetNew() call from IWSSessionManager. Since I don't know where the code that generates the JSP is (or if I can even change it), I ended up removing the sn.unsetNew() call from the update() function.
    Here's the code generated in the finally{} section using IWS6 and Sun Webserver:
    Iplanet 6
            } finally {
                if (out != null && (out instanceof org.apache.jasper.runtime.JspWriterImpl)) {
                    ((org.apache.jasper.runtime.JspWriterImpl) out).flushBuffer();
                if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
            }Sun Webserver
            } finally {
                _jspx_releaseTags(_jspx_curTag, null);
                if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
            }

    I posted a bug report on this.

  • JMF error - Format of Stream not supported in RTP Session Manager

    java.io.IOException: Format of Stream not supported in RTP Session Manager
    at com.sun.media.datasink.rtp.Handler.open(Handler.java:139)
    why this erro occors?
    I already created the DataSink.
    When I try to do this...
    dsk.open(); //here the error got
    dsk.start();     Code of server of media
    I want to sent audio (wav) like a radio, but from file. Without stop to send streaming. PullBufered
    *Class Server that you offers Streaming of midia
    public class Servidor {
    private MediaLocator ml;
    private Processor pro;
    private javax.media.protocol.DataSource ds;
    private DataSink dsk;
    private boolean codificado = false;
    //start the server service, passing the adress of media
    // ex: d:\music\music.wav
    // pass the ip and port, to make a server works
    public void iniciarServicoServidor(String end,String ip, int porta)
    try {
    //capture media
    capturarMidia(end);
    //creates processor
    criarProcessor();
    // configure the processor
    configurarProcessor();
    //setContent RAW
    descreverConteudoEnviado();
    //format the media in right RTP format
    formatRTP();
    //creat the streaming
    criarStreaming();
    //configure the server
    configurarServidor(ip, porta);
    //in this method raise the excepition
    iniciarServidor();
    //when I try to open the DataSink.open() raises the exception
    //java.io.IOException: Format of Stream not supported in RTP Session //Manager
    // at com.sun.media.datasink.rtp.Handler.open(Handler.java:139)
    } catch (RuntimeException e) {
    System.out.println("Houve um erro em iniciarServicoServidor");
    e.printStackTrace();
    public void capturarMidia(String endereco)
    try {
    System.out.println("**************************************************************");
    System.out.println("Iniciando processo de servidor de multimidia em " + Calendar.getInstance().getTime().toString());
    ml = new MediaLocator("file:///" + endereco);
    System.out.println("Midia realizada com sucesso.");
    System.out.println ("[" + "file:///" + endereco +"]");
    } catch (RuntimeException e) {
    System.out.println("Houve um erro em capturarMidia");
    e.printStackTrace ();
    public void criarProcessor()
    try {
    System.out.println("**************************************************************");
    pro = Manager.createProcessor(ml);
    System.out.println("Processor criado com sucesso.");
    System.out.println("Midia com durcao:" + pro.getDuration().getSeconds());
    } catch (NoProcessorException e) {
    System.out.println("Houve um erro em criarProcessor");
    e.printStackTrace();
    } catch (IOException e) {
    System.out.println ("Houve um erro em criarProcessor");
    e.printStackTrace();
    public void configurarProcessor()
    try {
    System.out.println("**************************************************************");
    System.out.println("Processor em estado de configura��o.");
    pro.configure();
    System.out.println("Processor configurado.");
    } catch (RuntimeException e) {
    System.out.println("Houve um erro em configurarProcessor");
    e.printStackTrace();
    public void descreverConteudoEnviado()
    try {
    System.out.println("**************************************************************");
    pro.setContentDescriptor(new ContentDescriptor(ContentDescriptor.RAW));
    System.out.println("Descritor de conteudo:" + pro.getContentDescriptor().toString());
    } catch (NotConfiguredError e) {
    System.out.println("Houve um erro em descreverConteudoEnviado");
    e.printStackTrace();
    private Format checkForVideoSizes(Format original, Format supported) {
    int width, height;
    Dimension size = ((VideoFormat)original).getSize();
    Format jpegFmt = new Format(VideoFormat.JPEG_RTP);
    Format h263Fmt = new Format(VideoFormat.H263_RTP);
    if (supported.matches(jpegFmt)) {
    // For JPEG, make sure width and height are divisible by 8.
    width = (size.width % 8 == 0 ? size.width :
    (int)(size.width / 8) * 8);
    height = (size.height % 8 == 0 ? size.height :
    (int)(size.height / 8) * 8);
    } else if (supported.matches(h263Fmt)) {
    // For H.263, we only support some specific sizes.
    if (size.width < 128) {
    width = 128;
    height = 96;
    } else if ( size.width < 176) {
    width = 176;
    height = 144;
    } else {
    width = 352;
    height = 288;
    } else {
    // We don't know this particular format. We'll just
    // leave it alone then.
    return supported;
    return (new VideoFormat(null,
    new Dimension(width, height),
    Format.NOT_SPECIFIED ,
    null,
    Format.NOT_SPECIFIED)).intersects(supported);
    public void formatRTP()
    try {
    // Program the tracks.
    TrackControl tracks[] = pro.getTrackControls();
    Format supported[];
    Format chosen;
    for (int i = 0; i < tracks.length; i++) {
    Format format = tracks.getFormat();
    if (tracks[i].isEnabled()) {
    supported = tracks[i].getSupportedFormats();
    // We've set the output content to the RAW_RTP.
    // So all the supported formats should work with RTP.
    // We'll just pick the first one.
    if (supported.length > 0) {
    if (supported[0] instanceof VideoFormat) {
    // For video formats, we should double check the
    // sizes since not all formats work in all sizes.
    chosen = checkForVideoSizes(tracks[i].getFormat(),
    supported[0]);
    } else
    chosen = supported[0];
    tracks[i].setFormat(chosen);
    System.err.println("Track " + i + " is set to transmit as:");
    System.err.println(" " + chosen);
    codificado = true;
    } else
    tracks[i].setEnabled(false);
    } else
    tracks[i].setEnabled(false);
    } catch (RuntimeException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    public void tocar()
    pro.start();
    public void criarStreaming()
    try {
    System.out.println("**************************************************************");
    if (codificado)
    System.out.println("Midia codificada...");
    System.out.println("Processor entra em estado de realize.");
    pro.realize();
    System.out.println("Processor realized.");
    System.out.println("Adquirindo o streaming a ser enviado.");
    ds = pro.getDataOutput();
    System.out.println("Streaming adquirido pronto a ser enviado.");
    } catch (NotRealizedError e) {
    System.out.println("Houve um erro em criarStreaming");
    System.out.println(e.getMessage());
    e.printStackTrace();
    catch (Exception e) {
    System.out.println(e.getMessage());
    public void configurarServidor(String ip, int porta)
    System.out.println("**************************************************************");
    String url = "rtp://" + ip + ":" + porta + "/audio/1";
    System.out.println("Servidor ira atender em " + url);
    MediaLocator mml = new MediaLocator(url);
    System.out.println("Localizador de midia ja criado");
    try {
    System.out.println("Criando um DataSink a ser enviado.");
    dsk = Manager.createDataSink(ds, mml);
    System.out.println("DataSink criado.");
    } catch (NoDataSinkException e) {
    e.printStackTrace();
    public void iniciarServidor()
    try {
    System.out.println("**************************************************************");
    dsk.open();
    System.out.println("Servidor ligado.");
    dsk.start();
    System.out.println("Servidor iniciado.");
    } catch (SecurityException e) {
    e.printStackTrace();
    } catch (IOException e) {
    e.printStackTrace();
    Gives that output console.
    All methods are executed but the last doesnt works.
    The method that open the DataSink.
    What can I do?
    Iniciando processo de servidor de multimidia em Sun May 13 22:37:02 BRT 2007
    Midia realizada com sucesso.
    [file:///c:\radio.wav ]
    Processor criado com sucesso.
    Midia com durcao:9.223372036854776E9
    Processor em estado de configura��o.
    Processor configurado.
    Descritor de conteudo:RAW
    Midia codificada...
    Processor entra em estado de realize.
    Processor realized.
    Adquirindo o streaming a ser enviado.
    Streaming adquirido pronto a ser enviado.
    Servidor ira atender em rtp://127.0.0.1:22000/audio/1
    Localizador de midia ja criado
    Criando um DataSink a ser enviado.
    streams is [Lcom.sun.media.multiplexer.RawBufferMux$RawBufferSourceStream;@a0dcd9 : 1
    sink: setOutputLocator rtp://127.0.0.1:22000/audio/1
    DataSink criado.
    Track 0 is set to transmit as:
    unknown, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 176400.0 frame rate, FrameSize=32 bits
    java.io.IOException: Format of Stream not supported in RTP Session Manager
    at com.sun.media.datasink.rtp.Handler.open(Handler.java:139)
    at br.org.multimidiasi.motor.Servidor.iniciarServidor(Servidor.java:291)
    at br.org.multimidiasi.motor.Servidor.iniciarServicoServidor(Servidor.java:43)
    at br.org.multimidiasi.motor.ConsoleServidor.main(ConsoleServidor.java:30)
    Since already thanks so much.
    Exactally in this method raises erros.
    Ive tried another formats (avi, mp3) but all with the same error, what I can do?
    [code] public void iniciarServidor()
    try {
    System.out.println("**************************************************************");
    dsk.open();
    System.out.println("Servidor ligado.");
    dsk.start();
    System.out.println("Servidor iniciado.");
    } catch (SecurityException e) {
    e.printStackTrace();
    } catch (IOException e) {
    e.printStackTrace();
    Track 0 is set to transmit as:
    unknown, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 176400.0 frame rate, FrameSize=32 bits
    java.io.IOException: Format of Stream not supported in RTP Session Manager
    at com.sun.media.datasink.rtp.Handler.open(Handler.java:139)
    at br.org.multimidiasi.motor.Servidor.iniciarServidor(Servidor.java:291)
    at br.org.multimidiasi.motor.Servidor.iniciarServicoServidor(Servidor.java:43)
    at br.org.multimidiasi.motor.ConsoleServidor.main(ConsoleServidor.java:30)

    unknown, 44100.0 Hz, 16-bit, Stereo,
    LittleEndian, Signed, 176400.0 frame rate,
    FrameSize=32 bits
    java.io.IOException: Format of Stream not supported
    in RTP Session Manager
    The fact that it doesn't know what the format is
    might have to do with the problem. I've had similar
    problems, and I've traced it back to missing jars and
    codecs. Have you tried running the same code locally
    without the transmission to see if you player will
    even play the file?Already and it works, I used Player to play it and play normally, I try to make it with the diferents codecs of audio and video, but no sucess.

Maybe you are looking for

  • Junk Mail no longer goes to junk folder

    I am getting mail labeled as Junk in my inbox (it is clearly spam). It used to go directly to my Junk folder, but now is staying in the inbox. (I think it started after going to 10.5.6) I check preferences, and the box is check to sent it to the junk

  • Optical Drive not recognized by Windows 7

    I have a Satellite A305-S6857 that I upgraded to Windows 7 and the BIOS shows that I have an optical drive but Windows doesn't. I've tried deleting filters in regedit, didn't work. I unchecked "hide empty drives" in the view options. I don't what to

  • Video manager for 5800 XM

    Hi all. I wanted to know of some way that I can transfer video files from PC to my device at native 640*360 resolution. I have transferred a few videos to my device from my PC using the in-box microUSB cable. These videos have to be stretched in the

  • Used rank mirror script but everyone "connection time-out

    What is going on? I can ping google no problem, but like the subject says everything says "connection time-out" when I try to pacman -Syy or when I try to pacstrap /mnt base base-devel So what is going on?

  • Need a little help here

    Hey everyone, I am brand new to JAVA and have hit a road block. It is my understanding that some information has to be added into the Environment variables. This is what I have so far. JAVA_HOME c:\Program Files\Java\jdk1.7.0 Path %JAVA_HOME%\bin; CL