Re; page forwarding and retrieving pr

Hi
i am stuck i need to collect a persons name if they are a current member to then forward them to another page using page fowared and passing their name as a property or parameter.
then on this page i need to then retrieve their name variable and use it to say hello then i need to use this varible to help populate a collections list once they enter some more information for the order.
where i am stuck i cannot seem to get the varible to transfer and then retrieve it on the new page. can you help .
the page that takes their name and forwards them to a members page
<%@ page language="Java" import="java.util.*,pizza.*" %>
<%@ include file="NoCache.jsp"%>
<%
//Process
List pizzaList = (ArrayList)application.getAttribute("myPizzaList");
if (pizzaList == null) {
pizzaList = new ArrayList();
page.setAttribute("myPizzaList", pizzaList);
}//endif %>
<!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" />
<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="name" type="text" value=""> </td>
</tr>
<td> </td>
<td><input type="submit" name="submit" value="Submit" /> </td>
</tr>
</table>
<p>  </p>
</form>
</center>
<jsp:useBean id="myPizzaEater" class="pizza.PizzaEater" scope="page"/>
<jsp:setProperty name="myPizzaEater" property="*"/>
</jsp:useBean>
<%
if(request.getMethod().equals("POST")){
if (myPizzaEater.getName() == null || myPizzaEater.getName() == "Guest" ){
out.print("you didnt enter a Name please enter a Name");%>
<br><blockquote></blockquote>
<%}else{%>
<jsp:forward page="currentMember.jsp">
<jsp:param name="myPizzaEater" value="name" />
</jsp:forward>
<%}
}//endif %>
</body>
</html>
this is the current members page that is to recieve the name variable
<%@ page language="Java" import="java.util.*,pizza.*" %>
<%@ include file="NoCache.jsp"%>
<%
//Process
List pizzaList = (ArrayList)application.getAttribute("myPizzaList");
if (pizzaList == null) {
pizzaList = new ArrayList();
application.setAttribute("myPizzaList", pizzaList);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Current Member</title>
</head>
<body>
<jsp:useBean id="myPizzaEater" class="pizza.PizzaEater" scope="page"/>
<jsp:setProperty name="myPizzaEater" property="*"/>
</jsp:useBean>
<form method="POST" action="<%pageContext.getPage();%>">
<p>
</p>
<table width="655" height="152" border="1">
<tr>
<td>Hello</td>
<td> <%myPizzaEater.getName();%></td>//this is where i have been trying to retrieve the variable forme the passing page
</tr>
<tr>
<td>Do you Prefer Halal</td>
<td><select name="halal" size="1">
<option value="true">Yes</option>
<option value="false" selected>No</option>
</select></td>
</tr>
<tr>
<td>How Many Meat Pizza Slices would you like
</td>
<td><input name="meat" type="text" value=""></td>
</tr>
<tr>
<td>How Many Vegitable Pizza Slices would you like
</td>
<td><input name="veg" type="text" value=""></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="submit" value="Submit" /> </td>
</tr>
</table>
<p>  </p>
</form>
<%
if(request.getMethod().equals("POST")){
if (myPizzaEater.getName() == null || myPizzaEater.getName() == "Guest" ){
out.print("you didnt enter a Name please enter a Name");%>
<br><blockquote></blockquote>
<%}else{
boolean NameExists = false;
if (!pizzaList.isEmpty()){
String myName = myPizzaEater.getName();
Iterator itr = pizzaList.iterator();
while(itr.hasNext()){
PizzaEater nextPizzaEater = (PizzaEater)itr.next();
String nextName = nextPizzaEater.getName();
if(nextName == myName){
NameExists = true;
if(NameExists == true){
out.print("i am sorry that name already Exists");%>
<br><blockquote></blockquote>
<%}
if(NameExists == false){
pizzaList.add(myPizzaEater);
if(pizzaList.size() == 0){ %>
<p>No members in collection</p>
<%}else{
ListIterator litr = pizzaList.listIterator(0);
while(litr.hasNext()) {
out.print(litr.next());%>
<br>
<%}
} //endif %>
</body>
</html>

ok i have solved the problem of passing the variable to the second page got other problems of i made the scope of the list on the first page page scope but it has survived to the second page any ideas

Similar Messages

  • What are the parameters "page-forward" and "page-backward"  used for?

    In the LIMITS section of the Netscape Calendar Server configuration
    documentation, there are two parameters called "page-forward" and
    "page-backward." The default setting for these parameters is FALSE. However,
    it is unclear what these parameters are used for.
    <P>
    With previous versions of Calendar Server, you could scroll one page forward
    or one page backward through the user search screens. However, with the
    implementation of LDAP in later versions, the options have been disabled in
    the client.
    <P>
    Although the page-forward and page-backward parameters are documented in the
    Administrator guides for Calendar Server versions 3.5 and 4.0, the guides
    state that the default value of FALSE for both parameters cannot be
    changed. In actuality, the parameters can be changed. However, the reason
    that users should not change these parameters is that versions 3.5 and 4.0
    do not support the page-forward and page-backward capabilities. So to avoid
    errors, please do not change these parameters from the default value of FALSE.

    if AdobeRGB is the more professional working space, then why not use that profile?
    on the web (and in unmanaged and broken work flows) sRGB is the safest profile (source space)
    just open your tagged Adobe RGB and tagged ProPhoto RGB document (use the embedded profile in each document)
    and go to View> Proof Setup: Monitor RGB (notice the loss in saturation? that's how most of the people on the Internet will be viewing your color, assuming you have a standard-gamut monitor like most people)
    always CONVERT to sRGB for the World Wide Web
    i didn't read your link
    anyone who recommends "disable color management in Photoshop" -- set Working RGB to "Monitor RGB" -- AND MOST UNBELIEVABLY -- "Don't color manage this document" (ignore embedded profiles) ------ is pretty mixed up (in my opinion)
    i will recommend reading JEFF SCHEWE and BRUCE FRASER for professional color management information

  • How can one page forward and backwards through a table?

    I want to use mutli-pages in my web order search .But I don't know how to do?
    Please help me!

    If you are using CS4, there is a Command to create a Web Album... this does it automatically for you.
    Otherwise, you can create this manually.  Say you have 3 pages,
    page1.html  (is the index page of the album)
    page2.html
    page3.html
    Therefore, using ordinary text links
    Home would link to page1.html
    Previous would link to page3.html
    Next would link to page2.html
    You would need to make adjustments naturally to each page as you move along with the gallery pages, changing the previous and the next links as needed.  Below is a a basic example of setting up the links in a simple table structure.  You would also then style the table layout as you see fit - yes, using css preferably  :-)
    <table>
    <tr>
    <td><h2>MY GALLERY OF PHOTOS</h2>
    <a href="page3.html">Previous</a> | <a href="index.html">Home</a> | <a href="page2.html">Next</a>
    </td>
    </tr>
    <tr>
    <td>
    <br>
    <a href="../images/img_2401_jpg.jpg"><img src="../images/img_2401_jpg.jpg" border=0></a><br>
    </td>
    </tr>
    </table>
    Here's an article on creating an album using the DW Command I mentioned earlier. You could create the album and then copy and paste the code into a current page if you've already designed on.,... not too difficult, I just tested it.  You do however, need to have Fireworks to process the images.
    http://livedocs.adobe.com/en_US/Dreamweaver/9.0/help.html?content=WSc78c5058ca073340dcda91 10b1f693f21-7ad1.html
    You could also check out the Lightbox effect which is very popular:
    http://www.lokeshdhakar.com/projects/lightbox2/
    Or do a google search for 'jquery'.  There are different album effects using that framework as well.
    Hope some of this helps  :-)
    Nadia
    Adobe® Community Expert : Dreamweaver
    Unique CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    Book: Ultimate CSS Reference
    http://www.sitepoint.com/launch/005dfd4/3/133
    http://twitter.com/nadiap

  • Forward and backward list is gone. Sucks.

    I don't like much about the new Firefox, and will probably try to go back to earlier version. Especially hate that page forward and page backward full list is gone. I used to be able to see a whole list of previous pages, and could skip to one 10 pages back. Now I have to page by page by page by page by page by page by page by page by page, and I'm on dial up some of the time, for God's sake. Forget this.
    And hey, where'd all these add-ons come from? I didn't ask for all these!!!

    You can also look at this extension:
    *Backward Forward History Dropdown: https://addons.mozilla.org/firefox/addon/backforedrop/

  • How to set cookie value in one page and retrieve in another page using setA

    How to set cookie value in one page and retrieve in another page using setActionListener?
    I have tried with following code srcpage.jspx->destpage.jspx
    srcpage.jspx
    <af:table value="#{bindings.DepartmentsView1.collectionModel}"
    var="emp" rows="#{bindings.EMPView1.rangeSize}"
    first="#{bindings.EMPView1.rangeStart}"
    emptyText="#{bindings.DepartmentsView1.viewable ? 'No rows yet.' : 'Access Denied.'}">
    <af:column sortProperty="EmployeeName" sortable="false"
    headerText="Cookie Testing">
    <af:commandLink text="#{emp.EmployeeName}" action="success">
    <af:setActionListener from="#{emp.EmployeeName}"
    to="#{cookie}"/>
    </af:commandLink>
    </af:column>
    </af:table>
    espage.jspx
    <af:outputText value="Test Cookie Value: #{cookie}"/>
    ,Here Test Cookie Value prints the following instead of its original String value
    {JSESSIONID=javax.servlet.http.Cookie@7da288, oracle.uix=javax.servlet.http.Cookie@399f62}
    I have passed employee name "Robert" to cookie in srcpage.jspx,but it prints "JSESSIONID....." instead of "Robert" in destpage.jspx
    Thanks in advance
    Kalee

    Hi,
    "cookie" is a reserved name. If you want to write to a session scope attribute called "cookie" then you have to call #{sessionScope.cookie}. If you want to use EL to set and read from cookies then you will have to use
    #{cookie.cookieName}
    Note that #{cookie} writes to and returns a map
    check this: http://www.informit.com/articles/article.aspx?p=30946&seqNum=7
    Frank

  • In latest version of MF there`s missing button, which was in previous version: between buttons back/forward and the typing bar there used to be little flash, which showed few last pages I have just browsed. How can I restore it?

    In latest version of MF there`s missing button, which was in previous version: between buttons back/forward and the typing bar there used to be little flash, which showed few last pages I have just browsed. How can I restore it?

    If you mean the drop marker then you can still get the History of the Back and Forward buttons if any by either Left-Click and hold for a second or by Right-Clicking them.
    If you still want the drop mark there also then there is this Extension at https://addons.mozilla.org/en-US/firefox/addon/backforward-dropmarker/
    Also the abbreviation for Firefox is '''Fx'''

  • Embed pdf in website, show one page at a time, with forward and back controls?

    Hi,
    Not sure if this is possible (or if this is the right place to ask), but I need to take a multiple page pdf, embed it in a website so its on the left half of the screen, have it only show one page at a time, and have the forward and back page controls.
    Is this possible, and if so, could someone point me in the right direction?

    Typically you would save it to a JPeg and post those on the web site. Expecting a PDF to show up depends on the client computer configuration and browser. This is too risky, unless you don't mind getting nasty little notes that it does not work. If you do it with JPegs, then all the browsers I know of can handle it. Then simply put the PDF separately for those who prefer to download the PDF and look at it separately.

  • I reset my toolbars and now no longer see the "page back" or "page forward" icons on the top left corner of the screen

    just loaded the new version of firefox. i went into "library" and told the computer to forget the mp3tube toolbar and it got rid of all the toolbars and also shows no search engine in new tabs, and has no page back or page forward arrows in top left corner of screen. how do i at least get the page back and forward function enabled?

    Make sure that you do not run Firefox in Full Screen mode with all toolbars hidden.
    * Press F11 to toggle full screen mode (Firefox/File > Full Screen)
    If the menu bar is hidden then press the F10 key or hold down the Alt key, that should make the menu bar appear.
    Make sure that toolbars like the "Navigation Toolbar" and the "Bookmarks Toolbar" are visible: "View > Toolbars"
    * If items are missing then open the Customize window via "View > Toolbars > Customize" or via "Firefox > Options > Toolbar Layout" (Linux, Windows)
    * If a missing item is in the toolbar palette then drag it back from the Customize window on the toolbar
    * If you do not see an item on a toolbar and in the toolbar palette then click the "Restore Default Set" button to restore the default toolbar set up.
    See also:
    * http://kb.mozillazine.org/Toolbar_customization
    * https://support.mozilla.com/kb/Back+and+forward+or+other+toolbar+items+are+missing

  • In Firefox 3.6.10 I was able to go forward and backwards between pages without the page defaulting to the top of the page. Is there any way to prevent the page from automatically moving to the top when using the forwards and back buttons in Firefox Four?

    I like to be able to navigate backwards and forwards without having to scroll down and find where I was previously. In Firefox Four, when using the forwards and back buttons, the page will automatically return to the top of the page. Is there any way to change this setting in Firefox Four to prevent it from doing that?

    Thanks for the response. No Time Machine, but I probably have a backup from a few months ago on an external hard drive. :/ I guess it'd have useful history, but not if it overwrote the last 3 months or so of Awesome Bar, that might not be so great.

  • MY page up and down key does not what its suppose to do but now instead it goes forward or back a web page

    Seems like since I installed the new Firefox my Page up and down key has stopped making my web pages go down or up but instead the page up key makes the web page go forward in history and the page down key makes it go back a webpage.

    " Is there anyway the apple or my service provider can help me with this? "
    No.
    "What is the point of the app if it only works when the phone is on? "
    The pont is to assist with locating a lost iphone.
    "Then it is only usefull within those first couple of days."
    Correct.  How would any device be tracked if it had no power?
    Very sorry for your situation, but there is nothing to do.
    Report it to the police and change your passwords.

  • How to store images in database and retrieve them back to page?

    Well I don't know how to store an image file to a database (say MSSQL) from the JSP and retrieve it back whenever needed and put it on the JSP page? Please help me.

    I am not sure how to store images in database but what you can do is store the image into particular folder using FileOutputStream and its unique name into the database...and than retrieve it from the folder using that name retrieved from database...
    <%
    response.setContentType("text/html");
    response.setHeader("Cache-control","no-cache");
    String err = "";
    String lastFileName = "";
    String contentType = request.getContentType();
    String boundary = "";
    final int BOUNDARY_WORD_SIZE = "boundary=".length();
    System.out.println("contentType --> "+contentType);
    System.out.println("BOUNDARY_WORD_SIZE --> "+BOUNDARY_WORD_SIZE);
    if(contentType == null || !contentType.startsWith("multipart/form-data"))
    err = "Ilegal ENCTYPE : must be multipart/form-data\n";
    err += "ENCTYPE set = " + contentType;
    else
    boundary = contentType.substring(contentType.indexOf("boundary=") + BOUNDARY_WORD_SIZE);
    System.out.println("boundary --> "+boundary);
    boundary = "--" + boundary;
    try
    ServletInputStream sis = request.getInputStream();
    byte[] b = new byte[1024];
    int x=0;
    int state=0;
    String name=null,fileName=null,contentType2=null;
    java.io.FileOutputStream buffer = null;
    while((x=sis.readLine(b,0,1024))>-1)
         System.out.println("************ x ********** "+x);
         String s = new String(b,0,x);
                   System.out.println("************ s ********** \n"+s);
         if(s.startsWith(boundary))
         state = 0;
         System.out.println("name="+name);
         System.out.println("filename="+fileName);
         name = null;
         contentType2 = null;
         fileName = null;
         else if(s.startsWith("Content-Disposition") && state==0)
              System.out.println("-- 1 --");
              state = 1;
              System.out.println("s.indexOf(filename=) --> "+s.indexOf("filename="));
              if(s.indexOf("filename=") == -1)
                   name = s.substring(s.indexOf("name=") + "name=".length(),s.length()-2);
                   System.out.println("after name substring 1 "+name);
              else
                   name = s.substring(s.indexOf("name=") + "name=".length(),s.lastIndexOf(";"));
                   System.out.println("after name substring 2 "+name);
                   fileName = s.substring(s.indexOf("filename=") + "filename=".length(),s.length()-2);
                   System.out.println("fileName --> "+fileName);
                   //String fileName1 = s.substring(s.indexOf("filename=") + "filename=".length(),s.length());
                   //System.out.println("fileName1 -->"+fileName1);
                   if(fileName.equals("\"\""))
                   fileName = null;
                   else
                        String userAgent = request.getHeader("User-Agent");
                        System.out.println("userAgent --> "+userAgent);
                        String userSeparator="/"; // default
                        if (userAgent.indexOf("Windows")!=-1)
                        System.out.println("test --> "+"\\");
                        userSeparator="\\";
                        if (userAgent.indexOf("Linux")!=-1)
                        userSeparator="/";
                        System.out.println("userSeparator "+userSeparator);
                        System.out.println("fileName before inserting userSeparators "+fileName);
                        fileName = fileName.substring(fileName.lastIndexOf(userSeparator)+1,fileName.length()-1);
                        System.out.println("fileName after userSeparators "+fileName);
                        if(fileName.startsWith( "\""))
                        fileName = fileName.substring( 1);
              name = name.substring(1,name.length()-1);
              System.out.println("name 2 --> "+name);
              System.out.println("final file name "+fileName);
              if (name.equals("file"))
                   if (buffer!=null)
                   buffer.close();
                   lastFileName = fileName;
                   buffer = new java.io.FileOutputStream("/Documents and Settings/sunil/Desktop/images/"+fileName);
         else if(s.startsWith("Content-Type") && state==1)
                             System.out.println("-- 2 --");
              state = 2;
              contentType2 = s.substring(s.indexOf(":")+2,s.length()-2);
              System.out.println("contentType2 --> "+contentType2);
         else if(s.equals("\r\n") && state != 3)
                   System.out.println("-- 3 --");
              state = 3;
         else
              System.out.println("-- 4 --");     
              if (name.equals("file"))
              System.out.println("Final x :: "+x);     
              buffer.write(b,0,x);
    }     // while closing
    sis.close();
    buffer.close();
    }catch(java.io.IOException e)
    err = e.toString();
    boolean ok = err.equals("");
    if(!ok)
    out.println(err);
    else
    %>
              <SCRIPT language="javascript">
              history.back(1);
              alert('Uploaded <%=lastFileName%>');
              window.location.reload(false);
              </SCRIPT>
    <%
         out.println("done");
    %>
    </BODY>
    </HTML>
    I think it will solve ur problem..

  • When I last up dated Firefox the forward and back arrows dissapeared. Now if I want to go back I have to go to History to get back to previous page. How do I get these forward and back arrows?

    On MSN web sight there use to be forward and back arrows on the left hand upper side of page that let me go forward and back from page to page. Now the arrows are gone and I have to use the History or Bookmarks to move back and forth.
    The arrows didn't reappear when I up dated to the new foxfire.

    Click the Firefox button, go to Add-ons, then Plugins and disable the following:<br><br>
    * Fun Web Products Plugin<br><br>
    * My Web Search<br><br>
    Both of these are adware/spyware and cause performance issues in Firefox.
    Next, click the Extensions menu link (above Plugins where you are) and remove the "Ask Toolbar".
    If the problem persists, please do the following:<br><br>
    #Click '''Help '''| '''Restart with Add-ons disabled'''.<br><br>
    #In the next menu which appears, checkmark: "'''Reset toolbars and Controls'''".<br><br>
    #Finally, click the button called "'''Make changes and restart'''".
    Just in case you weren't aware of it, you can right click the Back or Forward buttons to get a list of sites visited. If you'd like to see the return of the arrow on the Back button, install this add-on: https://addons.mozilla.org/en-US/firefox/addon/backforward-dropmarker/
    Last but not least, some of your plugins are seriously out of date which exposes your system to exploits. Please visit the [http://www.mozilla.com/en-US/plugincheck/ Plugins Check] page and update where necessary.
    See: http://www.adobe.com/support/security/bulletins/apsb11-08.html

  • "Data Page" and "Page Forward"

    Friends!
    What is the difference between "Data Page" and "Page Forward"?
    Thanks for all!

    Here is a nice trick for you.
    Right-Click on an element in the component palette and choose help.
    You'll get the explanation there.

  • I just purchased photoshop elements and went to retrieve my serial code.  The web page provided to retrieve it loads blank, even when clicking on the URL through adobe's web site.  I can not install my product without this.  Please help

    I just purchased photoshop elements and went to retrieve my serial code.  The web page provided to retrieve it loads blank, even when clicking on the URL through adobe's web site.  I can not install my product without this.  Please help

    Drusso77 if you are continuing to face difficulties locating your serial number then please see Find your serial number quickly - http://helpx.adobe.com/x-productkb/global/find-serial-number.html.  You are also welcome to contact our support team at http://adobe.ly/1aYjbSC.

  • Computer froze recently and pages document was open, now can't find it anywhere..is there anyway to try and retrieve it?

    Computer froze recently and pages document was open, now can't find it anywhere..is there anyway to try and retrieve it?

    If you haven't saved it even once it is gone!

Maybe you are looking for