How do i retrieve information from the JSP into my SELECT statements?

I need to retrieve the information that is being entered into JSP page.. So that i can use them to do an SQL statement.. but im not very sure if my codes are correct.. Following are my codes.. Pls help.. thx
MyJSPPage.jsp
<jsp:useBean id="user" class="user.User" scope="session"/>
<form name="loanItem" method ="POST" action="user">
<input type="hidden" name="userID" value="<jsp:getProperty name="user" property="userID"/>">
     <tr><td align=left height="34"> <b> <font size="4">Member ID:</font>
</b> </td>
          <td height="34">
          <jsp:getProperty name="user" property="userID"/></td>
     </tr>     
==================================================================================
MyManager.java --> this file is where all my SQL statements are ..
[l]String itemType = session.getParameter("itemType");[l] (--->> is how i retrieve info from the JSP page?)
          if (itemType.equals("Book"))
               String sqlQuery1 = "select loanDuration from ItemPolicy where itemType ='" + itemType+ "'";
               System.out.println(sqlQuery1);
               ItemPolicy itempolicy = null;
               try {
                    db = new Database();
                    rs = db.readRequest(sqlQuery1);
                    if (rs != null && rs.next()) {
                         itempolicy = new ItemPolicy();
                         itempolicy.setLoanDuration(Integer.parseInt(rs.getString("loanDuration")));
                    db.close();
               } catch (SQLException se) {
                              se.printStackTrace();
                              throw (new UserException("Unable to retrieve from Database!"));
                         } catch (Exception e) {
                              e.printStackTrace();
                              throw (new UserException("Unknow error encountered!"));
               String dueDate = util.getDueDate(itempolicy.getLoanDuration());
          else if (itemType.equals("Magazine"))
==================================================================================
Thanks in advance...

you should change to request.getParameter("itemType").
or just System.out.print the itemType to see it got the value.
Hope it helps.

Similar Messages

  • HT3275 how can i retrieve information from  time machine if my computer has less storage capacity? How can I access data that is on my time machine but can not be copied to a computer with less storage capacity? I used to have 180 GB, now I have 128 GB.

    how can i retrieve information from  time machine if my computer has less storage capacity? How can I access data that is on my time machine but can not be copied to a computer with less storage capacity? I used to have 180 GB, now I have 128 GB.

    Plug an external drive into the computer and use that to expand data onto.
    http://pondini.org/TM/16.html

  • TS4009 how do you retrieve information after the system has been reset to default

    how do you retrieve information after the system has been reset to default?

    From a backup on itunes or icloud, assuming you have made backups.  Connect to itunes and in the first tab for your device, choose to perform a restore.

  • HT4539 how do I download information from the cloud.  I just purchased a new phone?

    How do you download information from the cloud?  I just purchased a new phone?

    What information are you referring to?  You may mean restoring an iCloud backup from a previous device.  Or you may mean adding iCloud calendars, contacts, etc. to your iPhone.
    In the former case (restoring a backup), the setup assistant should walk you through that process.
    In the latter case (adding contacts, etc.), simply set up your iPhone as an iCloud device in Settings > iCloud.

  • How can you retrieve information from a iCloud backup on a previous iPhone? Backup from old phone is taking up a lot of space, would like to save pics to computer before deleting. How can I open up the backup from previous phone that is now on the iCloud?

    I originally had an iPhone 4 but switched service carriers back in June.  When I bought the new iPhone 4s, all my information from the iPhone 4 was saved as a backup on the iCloud.  On my new phone in the iCloud settings, Storage & Backup, it shows the backup from the iPhone 4.  This backup is taking up a lot of space on my phone and I would like to delete to avoid having to purchase more space.  However, I know I have pictures on this backup from the iPhone 4 that I would like to view and save on my computer if at all possible before deleting.  Is it possible to view the photos from this backup? If so, how? Thank you in advance for any assistance.  I hope this makes sense, lol, I'm not very computer literate.

    Unfortunately with the issues I mentioned above I don't even think I have enough space for that on the computer!  I have literally moved all moy pictures, music, etc. to another drive and all that's left are some small docs and applications.  I don't know how to find any more space on the thing and can't get things updated until I fix this...

  • Unable to retrieve information from the sync server

    This only just started after I updated to the new 3.1 software, which included an update to the Mobile Me control panel. I sure would love to fix it, because the error message pops up every 20 seconds. My phone is syncing with MM and with my PC.Also,i have been ok with retrieving my job bids from http://www.besteventstaff.com since i signed up.Which was over 2 weeks ago but today everything won't load.I contacted the admin at Best Event Staff and hey are telling me they haven't had any other complaints.Pls help me out here.Why has things stopped loading so suddenly?Thanks in advance

    I have notes from my palm days too!  If you haven't resolved this, below there is a "more like this" set of links. One of them lists four solutions to this problem including how I resolved mine. Good luck!
    Re: How do I resolve "unable to retrieve conflict information from the sync server" when syncing with Outlook

  • Synching my Ipad and PC, my contact info disappeared from Outlook. How do I retrieve them from the cloud.

    I recently synced my Ipad and PC. All my contacts disappeared. How do I restore them from the cloud?

    In Outlook, open the iCloud Contacts folder

  • How I can transfer data from the database into a variable (or array)?

    I made my application according to the example (http://corlan.org/2009/06/12/working-in-flash-builder-4-with-flex-and-php/). Everything works fine. I changed one function to query the database - add the two parameters and get the value of the table in String format. A test operation shows that all is ok. If I want to display this value in the text area, I simply drag and drop service to this element in the design mode
    (<s:TextArea x="153" y="435" id="nameText" text="{getDataMeanResult.lastResult[0].name}"  width="296" height="89"  />).
    It also works fine, just a warning and encouraged to use ArrayCollection.getItemAt().
    Now I want to send the value to a variable or array, but in both cases I get an error: TypeError: Error #1010: A term is undefined and has no properties..
    How can I pass a value from the database into a variable? Thank you.
    public var nameTemp:String;
    getDataMeanResult.token = authors.getDataMean(arrayOfNumber[0], dir_id);
    nameTemp = getDataMeanResult.lastResult[0].name;
    public var nameArray:Array = new Array();
    for (var i:uint=o; i<3; i++){
    getDataMeanResult.token = authors.getDataMean(arrayOfNumber[i], dir_id);
    nameArray[i] = getDataMeanResult.lastResult[0].name;
    And how i can use syntax highlighting in this forum?

    Astraport2012 wrote:
    I have to go back to the discussion. The above example works fine when i want to get a single value of the database. But i need to pass an array and get an array, because i want to get at once all the values for all pictures tooltips. I rewrote the proposed Matt PHP-script and it works. However, i can not display the resulting array.
    yep, it won't work for Arrays, you'll have to do something slightly more intelligent for them.
    easiest way would be to get your PHP to generate XML, then read that into something like an ArrayList on your HTTPService result event (depends what you're doing with it).
    for example, you could have the PHP generate XML such as:
    <pictures>
         <location>test1.png</location>
         <location>test2.png</location>
         <location>test3.png</location>
         <location>test4.png</location>
         <location>test5.png</location>
         <location>test6.png</location>
    </pictures>
    then you'll read that in as the ResultEvent, and perform something like this on it
    private var tempAC:ArrayList = new ArrayList
    protected function getStuff_resultHandler(event:ResultEvent):void
        for each(var item:Object in event.result.pictures)
           var temp:String = (item.@location).toString();
           tempAC.addItem(temp);
    in my example on cookies
    http://www.mattlefevre.com/viewExample.php?tut=flash4PHP&proj=Using%20Cookies
    you'll see an example of how to format an XML structure containing multiple values:
    if($_COOKIE["firstName"])
            print "<stored>true</stored>";
            print "<userInfo>
                    <firstName>".$_COOKIE["firstName"]."</firstName>
                    <lastName>".$_COOKIE["lastName"]."</lastName>
                    <userAge>".$_COOKIE["userAge"]."</userAge>
                    <gender>".$_COOKIE["gender"]."</gender>
                   </userInfo>";
        else
            print "<stored>false</stored>";
    which i handle like so
    if(event.result.stored == true)
                        entryPanel.title = "Welcome back " + event.result.userInfo.firstName + " " + event.result.userInfo.lastName;
                        firstName.text = event.result.userInfo.firstName;
                        lastName.text = event.result.userInfo.lastName;
                        userAge.value = event.result.userInfo.userAge;
                        userGender.selectedIndex = event.result.userInfo.gender;
    depends on what type of Array you're after
    from the sounds of it (with the mention of picture tooltips) you're trying to create a gallery with an image, and a tooltip.
    so i'd probably adopt something like
    <picture>
         <location>example1.png</location>
         <tooltip>tooltip for picture #1</tooltip>
    </picture>
    <picture>
         <location>example2.png</location>
         <tooltip>tooltip for picture #2</tooltip>
    </picture>
    <picture>
         <location>example3.png</location>
         <tooltip>tooltip for picture #3</tooltip>
    </picture>
    etc...
    or
    <picture location="example1.png" tooltip="tooltip for picture #1"/>
    <picture location="example2.png" tooltip="tooltip for picture #2"/>
    <picture location="example3.png" tooltip="tooltip for picture #3"/>
    etc...

  • How do I retrieve data from the cloud to put back on my iPad after it was restarted, I.e. my calendar, notes, reminders?

    I took my 1st gen iPad to an Apple store because of some glitches in the operating system, and I had forgotten my restrictions pass code. They backed up my data on the cloud, then took everything off of my iPad to basically "start over" with a new iPad. Now I don't know how to retrieve my calendar, notes, reminders. Somehow my contacts are there. I went to general settings and made sure the cloud was turned on, but I don't know how to pull from the cloud what we had previously backed up. Thanks for ANY suggestions:)

    When you have forgotten a restrictions password, you can no long restore from a backup that had the restrictions turned on.  You can only start over with a full reset.
    But you can sign back into icloud (Setting>icloud) and turn on the services you have used before (calendars, reminders, etc...).  That will sync down the data to your ipad.

  • How do I retrieve images from the iPad simulator's Photo app?

    I created some images with my app running in the ipad simulator and redorded them in the photos app.
    How do I retrieve these images from the iPad simulator to my mac?
    Thanks in advance! =]

    Hey ArmidaKers,
    Thanks for using Apple Support Communities.
    This article explains how to restore a backup from iCloud.
    iCloud: Restore your iOS device from iCloud
    https://support.apple.com/kb/ph12521
    Have a nice day,
    Mario

  • How do I retrieve information from an existing web page?

    I'm not sure if I'm in the right place to ask this question,
    but I hope I am. I'm trying to creating a catalog program for
    myself. I am envisioning it to be something like netag or
    pricewatcher. How do I create a search box that will search a
    listing of websites and pull certain information, then add that to
    a databse? Thank you for help on such a bizzare question.

    Read up on CFHTTP at
    http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-p58.htm#wp1632966.
    After execution, the variable CFHTTP.FileContent will contain the
    entire Web page. You'll have to build a parser to scrape the
    screen.
    A couple of observations.
    Plan on it taking several seconds for each Web site your
    getting. More an issue of Internet speed and remote server
    responsiveness than any thing else.
    Also, it would be a good idea if you have permission from the
    owners of the sites you plan to tap.

  • In VB how do I pass my low and high limit results from a TestStand Step into the ResultList and how do I retrieve them from the same?

    I am retrieving high and low limits from step results in VB code that looks something like this:
    ' (This occurs while processing a UIMsg_Trace event)
    Set step = context.Sequence.GetStep(previousStepIndex, context.StepGroup)
    '(etc.)
    ' Get step limits for results
    Set oStepProperty = step.AsPropertyObject
    If oStepProperty.Exists("limits", 0&) Then
    dblLimitHigh = step.limits.high
    dblLimitLow = step.limits.low
    '(etc.)
    So far, so good. I can see these results in
    VB debug mode.
    Immediately after this is where I try to put the limits into the results list:
    'Add Limits to results
    call mCurrentExecution.AddExtraResult("Step.Limits.High", "UpperLimit")
    call mCurrentExecution.AddExtraResult("Step.Limits.Low", "LowerLimit")
    (No apparent errors here while executing)
    But in another section of code when I try to extract the limits, I get some of the results, but I do not get any limits results.
    That section of code occurs while processing a UIMsg_EndExecution event and looks something like this:
    (misc declarations)
    'Get the size of the ResultList array
    Call oResultList.GetDimensions("", 0, sDummy, sDummy, iElements, eType)
    'Step through the ResultList array
    For iItem = 0 To iElements - 1
    Dim oResult As PropertyObject
    Set oResult = oResultList.GetPropertyObject("[" & CStr(iItem) & "]", 0)
    sMsg = "StepName = " & oResult.GetValString("TS.StepName", 0) & _
    ", Status = " & oResult.GetValString("Status", 0)
    If oResult.Exists("limits", 0&) Then
    Debug.Print "HighLimit: " & CStr(oResult.GetValNumber("Step.Limits.High", 0))
    Debug.Print "LowLimit: " & CStr(oResult.GetValNumber("Step.Limits.Low", 0))
    End If
    '(handle the results)
    Next iItem
    I can get the step name, I can get the status, but I can't get the limits. The "if" statement above which checks for "limits" never becomes true, because, apparently the limit results never made it to the results array.
    So, my question again is how can I pass the low and high limit results to the results list, and how can I retrieve the same from the results list?
    Thanks,
    Griff

    Griff,
    Hmmmm...
    I use this feature all the time and it works for me. The only real
    difference between the code you posted and what I do is that I don't
    retrieve a property object for each TestStand object, instead I pass the
    entire sequence context (of the process model) then retrieve a property
    object for the entire sequence context and use the full TestStand object
    path to reference sub-properties. For example, to access a step's
    ResultList property called "foo" I would use the path:
    "Locals.ResultList[0].TS.SequenceCall.ResultList[].Foo"
    My guess is the problem has something to do with the object from which
    you're retrieving the property object and/or the path used to obtain
    sub-properties from the object. You should be able to break-point in the
    TestStand sequence editor immediately after the test step in question
    executes, then see the extra results in the step's ResultList using the
    context viewer.
    For example, see the attached sequence file. The first step adds the extra
    result "Step.Limits" as "Limits", the second step is a Numeric Limit (which
    will have the step property of "Limits") test and the third step pops up a
    dialog if the Limits property is found in the Numeric Limit test's
    ResultList. In the Sequence Editor, try executing with the first step
    enalbled then again with the first step skipped and breakpoint on the third
    step. Use the context viewer to observe where the Limits property is added.
    That might help you narrow in on how to specify the property path to
    retrieve the value.
    If in your code, you see the extra results in the context viewer, then the
    problem lies in how you're trying to retrieve the property. If the extra
    results aren't there, then something is wrong in how you're specifying them,
    most likely a problem with the AddExtraResult call itself.
    One other thing to check... its hard to tell from the code you posted... but
    make sure you're calling AddExtraResult on the correct execution object and
    that you're calling AddExtraResult ~before~ executing the step you want the
    result to show up for. Another programmer here made the mistake of assuming
    he could call AddExtraResult ~after~ the step executed and TestStand would
    "back fill" previously executed steps. Thats not the case. Also, another
    mistake he made was expecting the extra results to appear for steps that did
    not contain the original step properties. For example, a string comparison
    step doesn't have a "Step.Limits.High" property, so if this property is
    called out explicitly in AddExtraResult, then the extra result won't appear
    in the string comparison's ResultList entry. Thats why you should simply
    specify "Step.Limits" to AddExtraResul so the Limits container (whose
    contents vary depending on the step type) will get copied to the ResultList
    regardless of the step type.
    I call AddExtraResult at the beginning of my process model, not in a UI
    message handler, so there may be some gotcha from calling it that way. If
    all else fails, try adding the AddExtraResult near the beginning of your
    process model and see if the extra results appear in each step's ResultList.
    Good luck,
    Bob Rafuse
    Etec Inc.
    [Attachment DebugExtraResults.seq, see below]
    Attachments:
    DebugExtraResults.seq ‏20 KB

  • How do i retrieve data from the cloud

    How can get a back up of my contacts from the cloud

    When you have forgotten a restrictions password, you can no long restore from a backup that had the restrictions turned on.  You can only start over with a full reset.
    But you can sign back into icloud (Setting>icloud) and turn on the services you have used before (calendars, reminders, etc...).  That will sync down the data to your ipad.

  • How to dispaly information from the webpage into the gadget???

    hi ,
    i have successfully executed few widgets given in the blogs..now am developing a widget for getting the information from webpage..
    ex: am trying to display the contributors list/page in a widget..
    thankx
    jaideep

    Thank You Jaideep,
    I tried creating the "RSS Reader Widget" as described in the SAP Enterprise Widget Development Guide pdf.
    But when I launch the widget, I am getting the below mentioned error
    Data Received! Text Length 11318
    out of memory (SkinCell.js: Line 222)
    /* SkinInput */ this.input = null;  // valid if the cell contains an input [code in line 222 of SkinCell.js]
    But I am getting the data received text length.
    I went through the net and they asked me to download latest service pack....
    Could you kindly let me know as to what might be the problem?
    Regards,
    Shilpa B.V

  • Is there a link that demonstrates how to get the information from the forms into a database?

    I have set up a form for a client's web site and I don't want the client to have to deal with a vast quantity of emails each with the form entries. I want the information to go directly into my client's database and I didn't want to use Business Catalyst. Let me know which database program would be the best for them to use. Preferably Mac.

    Hi David,
    There is a similar thread live with us , you can follow the Database of Form Entries
    Hope that works
    Thanks
    Prabhakar Kumar

Maybe you are looking for

  • Parallels 8 with Windows 7 Ultimate how Memory?

    Hello Everyone, I'm trying to setup a Windows 7 environment using Parallels 8 for Visual Studio Development. My Hardware: Mac Pro 2 x 2.26GHz (Quad-Core Dual CPU) with 96GB of RAM (6 x 16GB) and Four 1 Terrabyte Western Digital VelociRaptor 10K RPM H

  • Process Order API not initiating PO Acknowledgment Transaction.

    I have set up a Customer as trading partner in XML Gateway, taking care that the primary Sold To site is used for set up in XML Gateway. When i am creating orders using API, it is not triggering the Purchase Order Acknowledgment transaction. Does API

  • Why do i keep getting an error message when i try to backup my iphone 4

    My iphone 4 will not back up, keep getting message "backup was not able to save to computer" i have reconfigured my anti virus and uninstalled and reinstalled itunes. Can anyone help me?

  • Garage Band run from external drive

    Can I run GB from an external drive? I have en external that I also use as a boot drive. I have plently of room for the application & scratch files but not on my internal drive. Thanks.

  • Battery drain on iPad and IOS 7.1

    Since IOS 7.1 upadate several weeks ago, my 2nd Gen iPad's battery drops nearly 50% in three hours. I place it in Airplane Mode and turned off several options, according the the suggestions for the iPhone running IOS 7.1. My iPhone does not seem to h