Creating a session and a new variable in the session

Hi
my problem is i create a new session ok then i try to allocate a new session varible but it wont work i think it is something to do with scope but i cannot work it our anyone can you help.
the variable is
currentName = request.getParameter("currentName");
session = pageContext.getSession();
session.setAttribute ("sessionName", new String (currrentName));%>
<%@ page language="Java" import="java.util.*,pizza.*" %>
<%@ include file="NoCache.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Pizza Club Mian Page</title>
</head>
<body>
<CENTER><P><H1>Pizza Club Main Page</H1></P></CENTER>
<jsp:include page="navigation.jsp" />
<%
//Process
List pizzaList = (ArrayList)application.getAttribute("myPizzaList");
if (pizzaList == null) {%>
<Blockquote></Blockquote>
<Blockquote></Blockquote>
     <center><blockquote><b>Hello you need to register your first order on the New Member page thanks</b></blockquote></center>
     <Blockquote></Blockquote>
<Blockquote></Blockquote>
<%} else {
%>
<center>
<form method="POST" action="<%pageContext.getPage();%>">
<p>
</p>
<table width="400" height="80" border="1">
<tr>
<td>Please input your Name to sign in</td>
<td><input name="currentName" type="text" value=""> </td>
</tr>
<td> </td>
<td><input type="submit" name="submit" value="Submit" /> </td>
</tr>
</table>
<p>  </p>
</form>
</center>
<%
if(request.getMethod().equals("POST")){
if (request.getParameter("currentName").equals("")){
out.print("you didnt enter a Name please enter a Name");%>
<br><blockquote></blockquote>
<%=request.getParameter("currentName")%>
<%} else {
THIS IS THE SECTION HERE
String currentName = request.getParameter("currentName");
Iterator litr = pizzaList.iterator();
while(litr.hasNext()){
PizzaEater nextPizzaEater = (PizzaEater)litr.next();
String nextName = nextPizzaEater.getName();
if(nextName.equals(currentName)){
currentName = request.getParameter("currentName");
session = pageContext.getSession();
session.setAttribute ("sessionName", new String (currrentName));%>
               <jsp:forward page="/currentMember.jsp" />
<%}
}%>

dont worry i have solved this problem cant spell

Similar Messages

  • Creating variables in Process Flows and using thse variables in the filter

    Hi,
    I am new to OWB and in learing stage. Need to information.
    *1. as to how pass/create/use variables to OWB mapping ?*
    *2. Creating variables in Process Flows and using thse variables in the filter operator of the OWB mapping?*
    *3. Other mechanisms of how to create/use variables within OWB mapping itself ?*
    can you please provide the above details and guide me / help me in this regard.
    Thanks,
    skms.

    1. Add parameters to your mapping using the MAPPING INPUT PARAMETER from the pallette.
    2. Add parameters to the START operator in the process flow. Bind the process flow parameter to the Mapping parameter.
    3. May be appropriate to use CONSTANTS instead of parameters.
    Regards
    Si

  • ISE v1.2 - Endpoint abandoned EAP session and started new

    Hi.
    I have lots of clients that are not able to log on to both wired and wireless networks, and they always fails with these errors.
    5411 Supplicant stopped responding to ISE
    5440 Endpoint abandoned EAP session and started new
    This is with certificate authentication, both for client and for machine.
    The clients are for the most part Windows 7.
    We use both Cisco and Aerohive for wireless, and the switch I have tested with is a Cisco2960S
    A few strange things:
    It works perfectly for a lot of clients too, with the excact same configuration.
    One PC I'm testing with works fine when authenticating via wireless, but when I plug it into the switch, I get these errors.
    I seems to be a timeout of some kind, either to short or too long, but where?
    In the Win7 supplicant?
    In the switch?
    In the Cisco WLC
    or in the Aerohive AP?
    I have spent hours and hours on this problem, but I can't make it go away, it is very exhausting.
    There surely must have been others with the same problem?
    Thank you.

    Thank for trying to help out, but this is.. insanely vague.
    How can i verify that NAS (the C2960S) is properly configured?
    What timers are we talking about here? There are many to choose from..
    The problem is still here, even with the latest patch 7 for ISE 1.2. It works fine on wireless, but not with wired, from the same computer. So it is logic to assume it has something to do with the switch.
    This is the configuration from the switch:
    interface GigabitEthernet1/0/20
      switchport mode access
     authentication event fail action next-method
     authentication open
     authentication order dot1x mab
     authentication port-control auto
     snmp trap mac-notification change added
     dot1x pae authenticator
     spanning-tree portfast
    end
    sh dot1x int g1/0/20
    Dot1x Info for GigabitEthernet1/0/20
    PAE                       = AUTHENTICATOR
    QuietPeriod               = 60
    ServerTimeout             = 0
    SuppTimeout               = 30
    ReAuthMax                 = 2
    MaxReq                    = 2
    TxPeriod                  = 30
    sh run aaa
    aaa authentication login default group radius local
    aaa authentication dot1x default group radius
    aaa authorization exec default group radius local
    aaa authorization network default group radius
    aaa accounting dot1x default start-stop group radius!
    aaa server radius dynamic-author
     client 192.168.100.85
     server-key nope!
     auth-type any
    radius server hmz
     address ipv4 192.168.100.85 auth-port 1812 acct-port 1813
     key nope!
    radius-server attribute 6 on-for-login-auth
    radius-server attribute 6 support-multiple
    radius-server attribute 8 include-in-access-req
    aaa new-model
    aaa session-id common
    Some debug from the switch:
    Apr  6 11:07:01.745: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] Create attr list, session 0x1E0000E0:
    Apr  6 11:07:01.745: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] - adding MAC d43d.7e97.1e26
    Apr  6 11:07:01.745: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] - adding Swidb 0x4F8BAC8
    Apr  6 11:07:01.745: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] - adding AAA_ID=14B
    Apr  6 11:07:01.745: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] - adding Audit_sid=C0A864FA0000014B6983A2E0
    Apr  6 11:07:01.745: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] - adding Domain=DATA (1)
    Apr  6 11:07:01.745: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] - adding [email protected]
    Apr  6 11:07:01.745: %AUTHMGR-5-START: Starting 'dot1x' for client (d43d.7e97.1e26) on Interface Gi1/0/20 AuditSessionID C0A864FA0000014B6983A2E0
    Apr  6 11:07:01.745: AUTH-DETAIL: No default action(s) for event RX_METHOD_AGENT_FOUND.
    Apr  6 11:08:21.182: %DOT1X-5-FAIL: Authentication failed for client (d43d.7e97.1e26) on Interface Gi1/0/20 AuditSessionID C0A864FA0000014B6983A2E0
    Apr  6 11:08:21.187: %AUTHMGR-7-STOPPING: Stopping 'dot1x' for client d43d.7e97.1e26 on Interface Gi1/0/20 AuditSessionID C0A864FA0000014B6983A2E0
    Apr  6 11:08:21.187: %AUTHMGR-5-FAIL: Authorization failed or unapplied for client (d43d.7e97.1e26) on Interface Gi1/0/20 AuditSessionID C0A864FA0000014B6983A2E0
    Apr  6 11:08:21.187: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] Create attr list, session 0x1E0000E0:
    Apr  6 11:08:21.187: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] - adding MAC d43d.7e97.1e26
    Apr  6 11:08:21.187: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] - adding Swidb 0x4F8BAC8
    Apr  6 11:08:21.187: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] - adding AAA_ID=14B
    Apr  6 11:08:21.187: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] - adding Audit_sid=C0A864FA0000014B6983A2E0
    Apr  6 11:08:21.187: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] - adding Domain=DATA (1)
    Apr  6 11:08:21.187: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] - adding Username=host/HovedPC.gaasdal.net
    Apr  6 11:09:22.079: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] Create attr list, session 0x1E0000E0:
    Apr  6 11:09:22.079: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] - adding MAC d43d.7e97.1e26
    Apr  6 11:09:22.079: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] - adding Swidb 0x4F8BAC8
    Apr  6 11:09:22.079: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] - adding AAA_ID=14B
    Apr  6 11:09:22.079: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] - adding Audit_sid=C0A864FA0000014B6983A2E0
    Apr  6 11:09:22.079: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] - adding Domain=DATA (1)
    Apr  6 11:09:22.079: AUTH-DETAIL: [d43d.7e97.1e26, Gi1/0/20] - adding Username=host/HovedPC.gaasdal.net
    Apr  6 11:09:22.079: %AUTHMGR-5-START: Starting 'dot1x' for client (d43d.7e97.1e26) on Interface Gi1/0/20 AuditSessionID C0A864FA0000014B6983A2E0
    Apr  6 11:09:22.079: AUTH-DETAIL: No default action(s) for event SESSION_STARTED.

  • 5440 Endpoint abandoned EAP session and started new

    We have an ISE deployment for testing.
    This is running v1.2.0.899.
    We have an auth policy configured for domain-joined computers for 802.1x and domain credentials:
         Condition: Wired_802.1X
         Allow Protocols: PEAP_CHAPv2
         Use: AD
    This works, and authenticates both the machine (pre-login) and user (post-login).
    However, I am seeing some errors int the Auth logs before the 5200 Authentication succeeded message.
    These messages are not shown in the Cisco ISE Log Messages spreadsheet!
        5441 Endpoint started new EAP session while the packet of previous EAP session is being processed. Dropping new session.
        5405 RADIUS Request dropped
        5440 Endpoint abandoned EAP session and started new

    I am seeing this error when a windows supplicant is booting up, we want them to use EAP-TLS. Before the GPOs has struck, they try to authenticate using EAP-PEAP on their own, which they aren't configured to do. Shortly after that, they send the EAP-TLS packets. After the supplicant has been authenticated, the 5440 error shows up but without affecting the authentication.
    My guess is that this is the result of Windows behaviour. This generates a couple of "failed" authentications that in our case just confuse the costumer. I know this isn't an answer on your question, just my experience with the problem.

  • Store a variable in the session

    Hi, i'm working with jsp+struts.
    I can't store, from an ActionServlet, a variable in the session.
    I want store a String in the session. I write in the ActionServlet : request.setAtribute ("popo").
    I can't recover the value of the variable. I try : request.getAtribute ("popo",aux);
    Any solution???
    Thanks
    Hola! Estoy trabajando con jsp + struts. No consigo almacenar, desde un ActionServlet, una variable en la sesion.
    Quiero almacenar un String en la sesion, y lo hago mediante: request.setAtribute, pero luego no me recupera el valor desde un jsp, mediante request.getAtribute.
    Alguna soluci�n???
    Gracias

    use a java class, make it simple, I just threw this together so might have typos:
    class MyStorage{
    private String myValue;
    public MyStorage(){
    myValue = "";
    public void setValue(String what){
    myValue = what;
    public String getValue(){
    return myValue;
    In the jsp do:
    HttpSession sess = request.getSession(true);
    MyStorage safeKeeper = (MyStorage)sess.getAttribute("MySafeKeeperName");
    if(safeKeeper = null){
    safeKeeper = new MyStorage();
    sess.setAttribute(safeKeeper,"MySafeKeeperName");
    safeKeeper.setValue("Some Stupid Value");
    out.println(safeKeeper.getValue());

  • How can i view the variables of the session memory

    Hi experts
       How can i view the variables of the session memory.Such as I want display the variables of memory which id is 'BULRN' in ABAP debug.
    In program i can use import from memory id visit the momery of session,but i don't know the name of variables which store in momery of my session.

    Its not possible to view in the debug mode..
    SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens
    SAP global memory retains field value through out session.
    set parameter id 'MAT' field v_matnr.
    get parameter id 'MAT' field v_matnr.
    They are stored in table TPARA.
    ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data
    to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.
    ABAP memory is temporary and values are retained in same LUW.
    export itab to memory id 'TEST'.
    import itab from memory Id 'TEST'.
    Here itab should be declared of same type and length.

  • Question abt session and need advise in designing the project

    Hi,
    I am developing an application which searches for a particular document in some kind of database and returns the results and when the user clicks on one of the results, it should show the corresponding document from the db. Now I could get that functionality in my app. But my question is right now I am planning to store the document in temp folder and giving it back to the user for a particular session and am going to use a file name specific to the session and particular document for storing the docs.
    My questions:
    I want to delete the file after the session times out/user closes the window.How do I do that?
    And also please advise me if the whole thing is the right approach to achieve the functionality of the application considering the performance issues. I am using JSP and java classes right now.
    I am completely a beginner and was asked to develop this application on my own.
    Please help me out.
    Thanks

    javax.servlet.http.HttpSessionBindingListener
    or
    javax.servlet.http.HttpSessionListener
    The former, you have to create a class that implements that interface and store an instance of that class in the session and leave it there. When the session expires, the object is removed and valueUnbound() is called.
    The latter, you have to create a class that implements that interface and there's some way in the web.xml format to specify listeners (I forget offhand).

  • Main.vi creates 2D Arrays and I want to save the arrays in an microsoft Excel file(e.g engine_1)and in differnt worksheets(e.g. measure_1;measure_2;...)

    main.vi creates 2D Arrays and I want to save the arrays in an microsoft Excel file(e.g engine_1)and in differnt worksheets(e.g. measure_1;measure_2;...)
    The path(Grundpfad)for the excel file should be inserted in the main.vi.

    1. There's a shipping example called Write Table To XL.vi (Help>Find Examples>Communicating with External Applications>ActiveX>Excel) that you can use as a starting point.
    2. Buy the LabVIEW Report Generation Toolkit. Info can be found here.
    3. Search this forum for other examples of writing to Excel.

  • I need to reinstall my original factory disc and reset my computer to the beginning. It currently has lion. Do I need to erase my HD first to clear and make new room for the install disc.

    I need to reinstall my original factory disc and reset my computer to the beginning. It currently has lion. Do I need to erase my HD first to clear and make new room for the install disc.

    Prepare Your Mac for Sale
    Boot from the OS X Installer Disc One that came with the computer.  After the installer loads select your language and click on the Continue button.  When the menu bar appears select Disk Utility from the Utilities menu.  After DU loads select the startup volume from the left side list then click on the Erase tab.  Set the format type to Mac OS Extended (Journaled) then click on the Options button.  Select the one pass Zero Data option and click on the OK button.  Then click on the Erase button.
    Note: You can skip the Zero Data option if you are not concerned about removing sensitive personal data from the hard drive.  If you choose to skip this part of the process then it is possible for others to recover data from the hard drive.  The Zero Data procedure will prevent others from getting access to your personal information.
    This process will take 30 minutes to several hours depending upon the size of the hard drive.  After formatting has completed quit DU and return to the installer.  Now complete the OS X installation.  At the completion of the installation do not restart the computer.  Instead just shut it off.  The next user will be presented with the Setup Assistant when they turn on the computer just as it would if new out of the box.

  • How can i setup pages to automatically open when double clicked.  Currently when I double click it creates cpgz file and does not open.  The only way to open pages doc is to manually ask to open with pages.

    Currently when I double click it creates cpgz file and does not open.  The only way to open pages doc is to manually ask to open with pages.

    Hi Karen,
    Sounds like OS X has lost the association between Pages and its files.
    Start by quitting Pages, then going to Finder.
    In Finder, locate a .pages file. Click on it (once), then press command-I (eye, not one) to Get Info.
    In the Info window that opens, expand the Open With section.
    In this section, click on the pop-up menu and choose Pages (even if Pages is already shown).
    Click the Change All button to associate all files with the .pages extension with Pages.
    Close the info window.
    Double click any .pages file to check that Pages will now launch and open the file.
    Regards,
    Barry

  • Where are the bullets for adobe. im creating a document and they are not in the toolbar

    where are the bullets for adobe. im creating a document and they are not in the toolbar

    ADOBE PRO   I JUST GOT IT A FEW MONTHS AGO

  • I want to disable "restore previous session" and enable "History record" at the same time.

    I want to disable "restore previous session" and enable "History record" at the same time.
    Because I don't want others to access my account such as "Gmail", "Facebook". But I want firefox to record my browsing history.
    What should I do?

    I managed to remove the "Restore Previous Session" button from the home page by changing my default home page with this : www.google.com/firefox/ (the default home page from the previous versions of Firefox). It worked for me, I hope it works for you too.

  • How to create RFQ s and use them to complete the program

    hi,
    how to create RFQ s and use them to complete the program
    thanks in advance

    Hi Santosh,
    RFQ is created through transaction ME41.
    You need to write down BDC for mass update of RFQ, because BAPI is not available.
    Regards,
    Tutun

  • Clearing Session and/or App variables with Log-out Page?

    Greetings
    I have 3 distinct user types for my app- admins, appraisers and clients.
    All have their own directories and each directory has it's own Application.cfm:
    1) <cfapplication name="appraiseri"
    applicationtimeout="#CreateTimeSpan(0,2,0,0)#"
    clientmanagement="Yes"
    sessionmanagement="Yes"
    sessiontimeout="#CreateTimeSpan(0,2,0,0)#"
    SetClientCookies="Yes">
    2) <cfapplication name="appraiserview" ......
    3) <cfapplication name="clientview" .......
    Each have their own login which simply uses their ID in the DB as the session variable.
    login_do.cfm:
    1) Appraisers: <CFIF auth_direct_appraiser.RecordCount NEQ 0 >
    <cfset Session.appraiser_user_id =auth_direct_appraiser.appraiser_ID>
    <cfset Session.appraiser_fname =auth_direct_appraiser.appraiser_fname>
    <cfset Session.appraiser_lname =auth_direct_appraiser.appraiser_lname>
    2) Admins: <cfset Session.user_id =auth_direct.staff_ID> ......
    3) Clients: <cfset Session.processor_user_id =auth_direct_processor.processor_ID>
    I have had a session persisting for a week now- I have no idea how to get rid of it, and if one simply hits the "login" submit button with no UN or PW, it runs a query on a client (the same one) ?
    My logout page is not working at all- if the code were correct, it would clear any session variable? I have not really set an app variable (except timeout) so no need to clear that?
    Here is the code:
    <CFLOCK SCOPE="Session" TYPE="Exclusive" TIMEOUT="60">
        <CFLOOP COLLECTION="#Session#" ITEM="Key">
            <CFIF NOT ListFindNoCase('IveSeenIT', Key)>
                <CFSET StructDelete(Session, Key)>
            </CFIF>
        </CFLOOP>
    </CFLOCK>
    <SCRIPT LANGUAGE="JavaScript">
        alert("You have been logged out from the XXXXX Intranet")
        location.href='login.cfm';
    </SCRIPT>
    Any help would be appreciated- this is leaving a huge security gap in the app right now.
    Thanks

    It in unnecessary to delete session keys to invalidate them. With proper coding they should be invalidated once the session times out.
    Sessiontimeout values are usually around half an hour and applicationtimeout values are usually of the order of 1 day. Also, one way to relate session to login is to use the loginStorage attribute. If you have no need for client management, switch it off.
    Hence, for example,
    <cfapplication name="appraiseri"
    applicationtimeout="#CreateTimeSpan(1,0,0,0)#"
    clientmanagement="no"
    sessionmanagement="Yes"
    sessiontimeout="#CreateTimeSpan(0,0,30,0)#"
    SetClientCookies="Yes"
    loginStorage="session">
    I am assuming that, for login and logout pages, you will - ignoring the details - have something like
    Login:
    <cflogin>
            <cfloginuser name = "some_name" password = "some_password"   roles = "appraiser"/>
    </cflogin>
    Logout:
    <cflogout>

  • After typing master password in session can I force typing master password again without ending current session and starting new session?

    Sometimes after using the master password to access an account during a given firefox session I would like to "revoke" this ability for automatic access (i.e. require typing the master password again) without having to end the current session and restart firefox.
    While it is nice to only have to type the master password once per session, there are times when after starting some action I would like to leave the browser unattended for a short time but prevent others from accessing sensitive information at other sites if they do not know my master password. Note this is not the same as "locking the browser." Presently the only way I know to force this is to kill the current session and restart the browser but this is not very satisfactory if I actually want to stay connected (authorized) at a particular site. I would hope that adding a button on the security tab to "require master password for current session" would be a simple fix to implement? Thank you for your attention.

    While waiting for a response to this question, I stumbled upon a partial (good workaround) answer to my question in the form of a Firefox addon, Master Password Timeout [https://addons.mozilla.org/en-US/firefox/addon/master-password-timeout/ ]. Among other things it adds "Logout Master Password" as an option under the Firefox "Tools" menu which then gives the functionality I was looking for.
    It seems to me though that this is a basic security option that would be good for a general Firefox user to be aware of since leaving a browser open unattended with no master password required could easily lead to trouble. Before finding this addon I was not aware that Firefox 4 had a 30 minute default timeout for the master password. At least in my case I have left Firefox going overnight on home computers and have not had to retype the master password the next morning... so somehow I missed having this "default" set when I upgraded to Firefox 4.

Maybe you are looking for

  • Error while executing Hibernate query?

    Hi: I am using JSF,Hibernate amd Mysql in my project. I have written update query as, <code> update payslipmaster set instrumentNo=3 where memberNo=3733 </code> But at compile time it will be converted like, update payslipmaster, set instrumentNo=3 w

  • Creating vertical text box form field in Adobe Acrobat 10 Pro

    I'm very new to AAPro10.  I've serched the forums and internet and couldn't find out how (or if it is possible) to do what I want to do. I started with a premade pdf form with LOTS of potential form fields. I used the wizard to create a form.  It did

  • Reverse the order of elements in array?

    Hi All, i have elements of string[] aray = {one,two,three};i want the elements needs to be in reverse order.. ex : {three,two,one};how can we do this... plz help on this...with example.. thanks in advance.. jags.

  • Extra points on graph

    Hello I have a set of data in two colums Col 1 = date in M/D/Y format Col 2 = Data (numbers) I have the XY graph plotting the data according to the date but as I zoom in and out I notice weekend dates are showing up the data was only taken during the

  • Third Party Application Crashes

    I've been an Apple owner since the first Apple IIe. I have never experienced so many problems with a software upgrade that I have recently experienced with both Lion and iCloud. I have two computers in my home as well as an iphone and iTV. I was happ