SESSIONS are NOT Maintained

Hello Everyone!
I am using Servlets, JSP and JDBC for my Web Application.
I am using SESSION Variables. My entry point is Login Screen "www.man.com/proj/servlet/login" where user enters USERNAME/PASSWROD.
This FORM calls PROCESS.JAVA Servlet which creates a SESSION for them as shown:
HttpSession session = req.getSession(true);
String uname = (String)session.getValue("uname");
// code coonects to JDBC and see if they match
// IF MATCH
session.putValue("uname",req.getParameter("username"));
String uid = "";
uid = uid.valueOf(rs.getInt("uid"));
session.putValue("uid",uid);
//I then redirect to MENU Page ....which list options availabe for this user.
res.sendRedirect(menuURL);
on my menu page (MENU.JAVA), I have following:
HttpSession session = req.getSession(true);
String uname = (String)session.getValue("uname");
String uid = (String)session.getValue("uid");
if (uname == null)
     PRINT ERROR.....
Later then user selects one of the MENU options and it takes to another Servlet (say OPT1.JAVA)...
OPT1 Servlet is processed and at the end it displays a LINK which will take a User back to MENU.JAVA Page....
But When users clicks this LINK (A HREF) it takes to MENU.JAVA Page but shows UNAME as NULL...... How is it possible...? SHOULD IT NOT RETAIN the SESSION....?
HOW CAN I RETAIN my PREVIOUS Session Variables...?
Any related informaiton on this is appreciated.
THANKS!

on my menu page (MENU.JAVA), I have following:
HttpSession session = req.getSession(true);
String uname = (String)session.getValue("uname");
String uid = (String)session.getValue("uid");
if (uname == null)
PRINT ERROR.....
Here when you are getting the Session from the Request object you need to use
HttpSession session = req.getSession(false);
to retain the old Session. If you use true, it creates a new Session

Similar Messages

  • Message no. 8I766 Number Ranges are not maintained For Extended Withholding

    Dear All,
    I am facing the following problem when i am trying to generate the withholding tax certificate
    1.) Message no. 8I766 Number Ranges are not maintained For Extended Withholding Tax 
         Number Ranges are not maintained for Business Place and Section. Check entries in tables J_1iewt_cert  (for Business Place) or J_1iewt_cert_n (for Section Code) and j_1iewt_certno  in EWT.
    I have checked all the above tables and found that the entries are maintained
    2) When i am trying for print priview and then print its generating spool request and the certificate is getting saved -
    > here the following problems are faced
          A) . TDS Number is not coming
          B).Details Of the tax deductor ( Name , Adress , TDS Circle , TAN & PAN is not coming Where       to update these details
          C) In Amount Paid / Credited Column - Some fixed amount is comming irrespective of the actual amount credited
    Please help me in soving the above issues
    Thanks & Regards
    Arun.R

    Hi
    You need to maintain Section Code wise number range . Go to Sm30 Select Table J_1IEWT_CERT_N and maintain it.
    Thanks
    GG

  • Data of different session are not getting refreshed.

    We used select one choice and it is bind to the iterator. Data of different session are not getting reflected.
    Problem Scenario : Two browsers are open with same screen . In browser-1, I am adding new item which display on drop down of same screen. But drop down of browser-2 is not displaying the new added value.
    Please let me know how to refresh the data of browser-2 if I added data on different session.
    //JSFF entry
    <af:selectOneChoice binding="#{backingBeanScope.Product.ICTCSTName}"
    id="iCTCSTName" simple="true"
    label="#{bindings.tpCrudeSuperTypeFindAllPopulatedCT.label}"
    required="#{bindings.tpCrudeSuperTypeFindAllPopulatedCT.hints.mandatory}"
    value="#{bindings.tpCrudeSuperTypeFindAllPopulatedCT.inputValue}"
    autoSubmit="true">
    <f:selectItems value="#{bindings.tpCrudeSuperTypeFindAllPopulatedCT.items}"
    binding="#{backingBeanScope.Product.si2}"
    id="si2"/>
    </af:selectOneChoice>
    //Pagedef entry
    <list IterBinding="tpCrudeSuperTypeFindAllPopulatedCTIterator"
    ListOperMode="navigation"
    ListIter="tpCrudeSuperTypeFindAllPopulatedCTIterator"
    id="tpCrudeSuperTypeFindAllPopulatedCT" DTSupportsMRU="true">
    <AttrNames>
    <Item Value="superTypeName"/>
    </AttrNames>
    </list>

    Are you sure backingBeanScope is the correct scope for your scenario?
    Session scope sound more appropriate to me.
    binding="#{backingBeanScope.Product.si2}"

  • AS Java sessions are not closed until they time out

    Hello Experts,
    we have a SAP PI system to integrate SAP R/3 with external applications and recently we are facing a problem with inactive sessions. There's a new application we are setting up that consumes a webservice published by this SAP PI system. The scenario is SOAP --> PI --> PROXY. What we have noticed is that when the application sends loads of requests sometimes the system fails. This is because we are reaching the maximum number of open sessions in AS Java (1000). Investigating a bit more we found out that the sessions are not "closed" once the communication between the application and SAP PI has finished. Those sessions are open until they are automatically timed-out by the system after 1800 sec.
    We have found the notes below in SAPNet:
    Note 1363751 - ICM: Java Web sessions are not terminated
    Note 1307940 - New HTTP session opened for every web service call
    However, none of them are applicable to our system because it is more updated:
    SAP PI 7.1 EHP1 SP002
    Kernel Patch Level: 87
    We have tried to close connections from the application that consumes the webservice but with no success. The sessions remain in the server until they are timed-out. Could you please tell us if this is the normal behavior of an AS Java system? Is this the way it should work? If so, can you tell us how to decrease this timeout so the inactive sessions are cleaned faster? We tried to find it but we didn't manage. Is there any way to close the session once the communication has finished?
    Thank you in advance.
    Roger Allué i Vall

    Hi Roger,
    You can do the following things to help solving your issue:
    1. Decrease session timeout default value of the web container: Use the NetWeaver Administrator
    Open Application Modules plugin within NWA
    Configuration Management -> Infrastructure -> Application Modules
    Set the desired timeout web module you are using, in minutes.
    The default value 0 in the NWA means that the value is not modified
    and the default value of 30 minutes timeout will be used.
    2. Increase the max. no. of Sessions in Configtool
    The max. number of Sessions can be set in Configtool in the Expert
    mode. There is no limitation for the parameter.
    Thanks,
    Anderson

  • The MRP parameters are not maintained in plant JK01

    Good morning,
    t-code : md04 (stock req.list) but got an error.
    MRP parameters for plant 'JK01' have not been maintained
    Message no. 61273
    Diagnosis
    The MRP parameters are not maintained in plant JK01.
    Procedure
    Maintain MRP parameters in Customizing.
    how to maintained mrp parameter fro plant JK01 ?
    Thank you.

    Hi Robert,
    First maintain the plant parameter using  tcode OMI8 for the plant JK01.
    this will solve ur issue.
    hope it wud have answered ur question
    reward if useful
    shawn

  • Labels on Forms are not maintaining positions when viewed on a different computer

    I have a project with 14 forms.  The labels for the text boxes are perfectly aligned on one machine, yet when I run the project on a different machine (same screen resolution and all fonts available) many of the labels are no longer left- or right-aligned
    as designed.  I have experimented with changing the Autoresize settings (using Font, DPI, etc.) for the forms as well as the text alignment settings for the labels themselves, but they don't fix the problem.  I am using Visual Basic (Net 4.5) in
    Visual Studio 2013. Any ideas??

    Hi DrDon81,
    According to your description, the labels on forms are not maintaining positions in different machines.
    I suggest you disable the AutoSize(set to false).
    Or you could put the label in a panel or similar, then use Dock instead of just Anchor property.
    If it still not working, you could share a little sample which can reproduce the issue. we could help you better.
    Regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • After updating to Yosemite, my screen saver settings are not maintained.  The screen saver reverts to some Apple default.  There is no way to get my setting to be maintained.

    After updating to Yosemite, my screen saver settings are not maintained.  The screen saver reverts to some Apple default.  There is no way to get my setting to be maintained.

    Hi ..
    Might be corrupted preferences.
    Open the Finder. From the Finder menu bar click Go > Go to Folder
    Type or copy paste the following:
    ~/Library/Preferences/com.apple.screensaver.plist
    Click Go then move the com.apple.screensaver.plist file to the Trash.
    Restart your Mac then reset your screen saver.

  • Preferences in Agenda are not maintained

    The preference settings in Agenda for "Show weeknumbers" and "Open activities in seperate window", are not maintained.
    Do other people face the same problem?
    Has anyone a solution?

    Okay - I think I'm good now. I had to manually edit the monitor.xml file
    and set up all of my preferences -as Danita described in another post as a
    bug.
    I couldn't just restart the monitor agent, however. I had to reboot my
    server, manually run my ncpmount statement then run the grpwise-ma script.
    If I could ever figure out how to write a script and where to put the script
    for the ncpmount I'd be in great shape. :)
    Connie W
    "Connie W" <[email protected]> wrote in message
    news:oPpdg.4369$[email protected]..
    >I just set up the latest 7.1 Beta - Monitor agent and application on a
    >SLES9.3 box. It's the only GW piece that is running on this box.
    >
    > When I try to set up preferences for notification and click Submit, it
    > isn't saving.
    >
    >
    >
    >

  • Clearing Accounts are not maintained error during CAT7

    Hi All,
    I have got query related to CATS posting to CO i.e. CAT7.
    We are doing inter company CATS. While transferring data to CO, we are getting error that clearing accounts are not maintained for the set of company codes and posting key is not defined.
    We have maintained ZERO rate in KP26 for the year for which we are posting timesheet.
    My questions are:
    Can we post CATS to CO with ZERO rates maintained in KP26 for that year??
    When rates maintained in KP26 is ZERO then do we need to have clearing accounts maintained thorugh OBYA??
    Please reply with your expert comments.
    regards
    Nishith

    I think, i have posted in the right forum. I have seen similar kind of tread. CATS is considered under PS only.
    Please suggest if still i need to post in CO forum.
    regards
    Nishith

  • Jboss sessions are not deleted automatically under tmp/sessions folder

    /server/default/tmp/sessions
    In my Production and develppment IDM ; OUt Jboss tmp/.sessions are not not clering once it reaches 31988 files the production systems stops working until we clear the sessions folder any idea will be appreciated?
    Edited by: ark on Jul 16, 2010 1:52 PM

    You won't get much help here on this issue.
    I know neither you could get any help on internet.
    Try Jboss forums at community.jboss.org and also post the query on coderanch at: http://www.coderanch.com/forums/f-63/JBoss

  • Error: Control parameters are not maintained in the current client

    Hi,
    We have recently installed IDES IS-H 6.04 - HEALTH CARE. In the SAP easy access menu when I go to Hospital>>Basic data administration>>Hospital structure>>Organizational Structure>>Organizational Unit>>Create it throws the following error message
    "Control parameters are not maintained in the current client"
    Any help on this would be greatly appreciated. I can't move ahead without getting to create an OU.
    Warm Regards,
    Prasoon Singh

    Hi Prasoon
    Are you starting from scratch?
    Was the client created after the activation of IS-H?
    For new installation I always recommend to activate the industry solution in client 000 and then to create the new clients as copy of 000.  It will bring you the configuration of the Institution 0001. If not, it's very hard to do all the customizing, specially the SD ones.
    It seams that you have nothing configured, try to do the copy, if not, probably an entry in transaction ON05 is missing.
    I hope it helps
    With best regards
    Matías

  • Session is not maintaining value in iStore 11i - JTF Framework

    I have used the following two methods to maintain the session. But, it is not working.
    java.util.HashMap hashItemsInfo = (java.util.HashMap) pageContext.getAttribute("hashItemsInfo", PageContext.SESSION_SCOPE);
    pageContext.setAttribute("hashItemsInfo", hashItemsInfo, PageContext.SESSION_SCOPE);
    and
    java.util.HashMap hashItemsInfo = (java.util.HashMap) (java.util.HashMap) session.getValue("hashItemsInfo");
    session.putValue("hashItemsInfo", hashItemsInfo);
    putSessionValue and putSessionValueDirect are not available for the current version.
    Pls let me know if anybody have an idea.
    Thanks in advance.

    Pls ignore this. session was disabled at parent JSP page. That is the reason for not maintaining session value.

  • Sales Area Not Maintained

    Gurus,
    I am trying to create a sales order with reference to a contract. When I am doing the item selection and click on the copy button, it is throwing an error "Sold-to party 100000 not maintained for sales area 2000 20"  where '2000' is the sales organization & '20' is the Distribution channel.
    But the customer is already there for that sales area.
    Please any one guide me. Its very urgent
    Regards,
    Anandk

    Hi Anandk
    Plz go to spro-Sales and distribution-sales-sales doucument header-assign sales area to sales document types and do the following steps.
    1. combine sales organisation:- go to position and find ur sales org and assign the same sales org as reference.
    2. combine distribution channel :- speicify the same dist channel as refernce.
    3. combine divisions.;- speicify the same division as reference diviosn.
    4. Assign sales order types permitted for sales area:- assign ur sales area to OR.
    Regards
    Hari

  • Seminar Sessions are not visible under My Calendar for Seminar Hosts

    Dear support Team,
    I have created 2 Seminar sessions but I am not able to see the sessions under My Calendar, even if I am the host of the Seminar. Last week, it was possible to display the session... Do you know if it is due to the settings?
    Thanks!
    BR,
    maria.

    The following details will display while applying for leave below the calender images
    You have selected the following leave requests:
    Type of Leave : Flexi Leave
    Date : 20.03.2008 To 20.03.2008
    Duration : 7.8 hours
    Note for approver:   Please may i have 1 day leave
    Cancel button
    once the manager approves the leave, employee can view the calender about the status.  If approved the employee can click on the date to see the note which was written by the manager.  Even manager also can view the note in MSS > Attendance > Team calender.
    You have selected the following leave requests:
    Type of Leave : Flexi Leave
    Date : 20.03.2008 To 20.03.2008
    Duration : 7.8 hours
    Previous Notes :   Your leave is approved
                               Please may i have 1 day leave
    Cancel button
    But after approving the leave, the employees and the manager are not able to view the note ie., Previous Note
    how can i make visible to both????

  • Sessions are not showing in V$session in 10g RAC

    Hi All,
    I have 2-node 10gR2 Rac installed on RHEL4. It is up and running fine. And i'm able to connect from clients also(from other machines). My doubt is...If i connect to the RAC database using other clients, a record is showing in v$session. But if if connect to the database from one of the RAC nodes. that record is not showing up in v$session. What might be the reason?
    And how can we see, which user has connected from which node in RAC?
    Thanks,
    Praveen.

    Thanks for response...
    I checked with the query which you have given and i'm able to see which user has connected from which instance.
    Thanks,
    Praveen

Maybe you are looking for