Newbie need help on JSP! Thank you

I am trying to sent data from a html file to a jsp file by using request,
although it load jsp page successfully, variables are empty.( I assure
that the variable names match), here is the code
<html>
<body>
<h1>Please tell me about yourself</h1>
<form action="SimpleFormHandler.jsp" method="get">
Name:    <input type="text" name="firstName">
    <input type="text" name="lastName"><br>
Sex:
    <input type="radio" checked name="sex" value="male">Male
    <input type="radio" name="sex" value="female">Female
<P>
What Java primitive type best describes your personality:
<select name="javaType">
    <option value="boolean">boolean</option>
    <option value="byte">byte</option>
    <option value="char" selected>char</option>
    <option value="double">double</option>
    <option value="float">float</option>
    <option value="int">int</option>
    <option value="long">long</option>
</select>
<br>
<input type="submit">
</form>
</body>
</html>
<html>
<body>
<%
// Grab the variables from the form
    String firstName = request.getParameter("firstName");
    String lastName = request.getParameter("lastName");
    String sex = request.getParameter("sex");
    String javaType = request.getParameter("javaType");
%>
<%-- Print out the variables --%>
<h1>Hello, <%=firstName%> <%=lastName%>!</h1>
I see that you are <%=sex%>. You know, you remind me of a
<%=javaType%> variable I once knew.
</body>
</html>

This works- just ensure that the latest jsp is being picked up by the server. (A restart and a new IE would ensure that)
<html>
<body>
<h1>Please tell me about yourself</h1>
<form action="test3.jsp" method="get">
Name:    <input type="text" name="firstName">
    <input type="text" name="lastName"><br>
Sex:
    <input type="radio" checked name="sex" value="male">Male
    <input type="radio" name="sex" value="female">Female
<P>
What Java primitive type best describes your personality:
<select name="javaType">
    <option value="boolean">boolean</option>
    <option value="byte">byte</option>
    <option value="char" selected>char</option>
    <option value="double">double</option>
    <option value="float">float</option>
    <option value="int">int</option>
    <option value="long">long</option>
</select>
<br>
<input type="submit">
</form>
</body>
</html>
<html>
<body>
<%
// Grab the variables from the form
    String firstName = request.getParameter("firstName");
    String lastName = request.getParameter("lastName");
    String sex = request.getParameter("sex");
    String javaType = request.getParameter("javaType");
    if(firstName != null && lastName != null && sex != null && javaType !=null){
%>
           <%-- Print out the variables --%>
           <h1>Hello, <%=firstName%> <%=lastName%>!</h1>
           I see that you are <%=sex%>. You know, you remind me of a
            <%=javaType%> variable I once knew.
  <%}%>
</body>
</html>ram.

Similar Messages

  • I have and ipod touch 4th gen and it will show up on my computer but not on my itunes i need help please and thank you

    I have an ipod touch 4th gen and when I plug it into my computer it shows up but it wont on iTunes and I was trying to put more music on it today and it wasn't showing up can u help please and thank you.

    Hey Babetta94,
    Thanks for using Apple Support Communities.
    After reviewing your post, the iPod is not recognized in iTunes. A frustrating situation to be sure. You haven't mentioned what OS the computer you are using uses. You can choose what article to use either OS X or Windows from this quoted section.
    iPod not appearing in iTunes
    http://support.apple.com/kb/TS3716
    If you have an iPod touch:
    For Windows: See iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows
    For Mac OS X: See iPhone, iPad, iPod touch: Device not recognized in iTunes for Mac OS X
    Have a nice day,
    Mario

  • Problems installing CS5.5 ~ Really need help.. Thank you.

    Operating system = WinXP
    Trying to install purchased CS5.5 Web Premium on completely clean machine recently reformatted.
    Installing from files downloaded from Adobe.
    I did a successful install of this last summer, but this time it's been a real pain.
    I am completely lost on what is wrong and I have customers waiting for web page fixes.
    1. I bought the CS5.5 Web Premium upgrade last summer. I had 4.0 on my system at the time. No problem installing 5.5.
    2. Yesterday I wiped my hard drive clean and now need to reinstall CS5.5. I do not have CS4.0 on my machine now.
    3. I downloaded my CS5.5 files from Adobe today.
    4. The installation instructions said:
    "Navigate to the directory containing the downloaded files.... Double-click the Set-up.exe file to begin the installation. In some cases, the Set-up.exe file may open
    automatically."
    Today, that magic did NOT happen. Nor had it happened last summer.
    So I tried to install the files anyhow.
    5. On my previous install I opened files individually when the magic didn't happen and it still went okay. But not today.
    Today I started with WebPremium_DesignPremium_CS5_5_Content_ALL.exe file. Can someone tell me if opening that file first was a mistake? And if so, what file should I have opened first?
    It opened but I can see nothing in my program files. So I tried the three other files with no success... Here are the error messages:
    WebPremium_DesignPremium_CS5_5_Content_ALL.exe - - - Which I already opened. No files can be found on my computer, but they must be there.
    WebPremium_CS5_5_LS1.exe - - - I get an error message that says it is not a valid Win32 application.
    Illustrator_15_1_Content_LS1.exe - - - This acts like it will open and download fine. I did not do it pending why the other files aren't working.
    WebPremium_CS5_5_LS1.7z - - - I try to open this and get an error message, "Windows cannot open the file..." and it wants to find it on the Internet.
    This worked fine last summer. Can someone help me? Do I need to reformat my whole computer again?
    You don't know how appreciated the answer would be. I would be most grateful. Thanks!!!
    BLee

    WebPremium_DesignPremium_CS5_5_Content_ALL.exe - - - Which I already opened. No files can be found on my computer, but they must be there.
    Probably not. That really is just the additional content and without a qualifying product install it won't do anything most likely since the directories it expects do not yet exist.
    WebPremium_CS5_5_LS1.exe - - - I get an error message that says it is not a valid Win32 application.
    Could be damaged, could be blocked. Anything from virus scanners to flakey drives. Could also be missing a critical system library. No way to tell from afar.
    WebPremium_CS5_5_LS1.7z - - - I try to open this and get an error message, "Windows cannot open the file..." and it wants to find it on the Internet.
    7zip, WinZip, WinRar
    Mylenium

  • I have a 2009 13"MacBook pro running on OS X 10.6.8.  How do I know whether this is leopard or mountain? What would you advise that I use as I need to be running OS X 10.7?  All help appreciated.  Thank you.

    I have a 2009 13"MacBook pro running on OS X 10.6.8. 
    How do I know whether this is leopard or mountain?
    What would you advise that I use as I need to be running OS X 10.7? 
    Also can you advise how I upgrade please?
    All help appreciated.  Thank you.

    Thank you for your response Niel.
    I do run Microsoft Office 2011 - will Snow Leopard support this?
    Finally why snow leopard and not mountain lion?

  • MacBook - Newbie: Need help on printing wirelessly to XP shared printer

    MacBook - Newbie: Need help on printing to XP shared printer
    Bear with me please. I read tons of articles on this but somehow as a newbie to MAC (girlfriends sick daughter), I am missing something. 10.5.2
    Currently, she can print directly if we plug in the HP Deskjet printer directly via USB to the MACBook. No problem.
    When we first got the MACBOOK I tried setting up the MACBOOK wirelessly to recognize the workgroup where the printer was attached via USB to the Windows XP PC. However it printed out garbage since I did not know there was a difference between XP printing and MAC (Gutenberg/gimp printing/drivers).
    Now I know there is a difference.
    But in reading various instructions, I no longer can find how to connect the MAC to the Windows workgroup. Note we do have a printer set up currently as USB-HP Deskjet on the Macbook (not sure I need to delete it yet).
    I went to System Preferences on MACBOOK and clicked on printers, more printers. In the drop down box was CANON, APPLETALK, IP HP printing and Firewire. There was no WINDOWS selection as I saw in other online web instructions.
    So not sure how to proceed to find a way to:
    1. Connect to Windows workgroup (click on what exactly), step by step please!!
    2. Add correct HP Deskjet 5490 printer (perhaps there is one with Gutenberg or perhaps I need Gutenprint-really not sure what I am talking about)
    Thanks so much in advance. Fiancé's kid has had her cancer recur in a different place and someone was nice enough to buy her a MACBOOK as a gift.
    Sincerely
    Peter

    ccarbery wrote:
    OK...I figured it out...no need to reply.  I noticed that there was another Protocol to use to set up the printer on the Mac, I was using LPD, so I switched it to HP Jet Direct-socket, and it prints fine...thanks.  I am curious as to why LPD wouldn't work; if anyone has that answer I would like to know...thanks
    Any chance of posting the Protocol you used to connect to your printer with your laptop?  I'm have the exact same problem printing from my MB.  Same error message "..is busy".

  • How can I connect my Mac Book Pro (year 2008) to the TV set through  HDMI? I've seen a DVI to HDMI iwire but I'm no sure that it is correct. Could anyone help me? Thank you very much.

    How can I connect my Mac Book Pro (year 2008) to the TV set through  HDMI? I've seen a DVI to HDMI iwire but I'm no sure that it is correct. Could anyone help me? Thank you very much.

    I do not know the iWire adapter, but I use an inexpensive ($3) DVI to HDMI adapter from Monoprice, along with a regular HDMI cable:
    http://www.monoprice.com/products/product.asp?c_id=104&cp_id=10419&cs_id=1041902 &p_id=2029&seq=1&format=2
    Be aware that this will only transfer video. You Macbook Pro cannot combine audio through DVI to HDMI. You will need to listen to the audio through the Mac speakers, or attach speakers or a sound system to the Mac earphone jack, or determine if your TV has the ability to accept external sound from the Mac while showing video through HDMI (few can).

  • I NEED HELP! How do you Create a Drop Down Accordion Navi with the child pages remaining expanded

    I would like to know how I can create a vertical accordion navigation with some custom modifications.
    I need it to function like this sites vertical navigation. (link is below)  Click on the parent page "bedrooms" and it expands revealing all of the "child pages" then click on one of the child pages, it turns the font to Underlined and all the child pages remain exposed!  (it does not collapse after you click on a child page!!!!!!!) I need my site to do this as it tells the visiter where they are exactly on the site!     Please HELP ME!  Thank You! 
    I would actually like mine to be a little more pronounced.  Perhaps having the link turn to BOLD Font indicating you are on that page.  And the main Parent page would have a diffrent background color. 
    Site that has the Navi that I want to Mimic:
    http://www.fowfurniture.com/
    EXAMPLE: Adhesives IS IN BOLD indicating you are on that page. and it remains open it should remain open until you click on another parent page like Hardwood. (Then the Hardwood child pages (Sub Menu) would expand looking like the carpet sub menus/child pages.  All of the accordians i have found seam to collapse after you select a child page (sub menu) and the visitor wouldn't know where he is on the site...  Please Help Me accomplish this!
    Carpet
                          Repairs
                          Fibers
                          Adhesives    
                          Tools
                          Pad
    Hardwood
    When nothing is selected it should look like this: The cell of "Carpet" is a slightly a diffrent color because it is in the "Hover"  state. 
    Carpet
    Hardwood
    Tile
    Vinyl
    Linoleum

    Still need help, I could do it for a value lower. contact me at [email protected]

  • HT201303 I forgotten my answer of security questions, please help me. Thank you !

    I forgotten my answer of security questions, please help me. Thank you !

    You need to ask Apple to reset your security questions; as described in this article, it can be done in Vietnam by phoning 1-201-0288 and then 800-708-5413.
    (107433)

  • IPhone 5s disabled. Please help me. Thank you.

    Hello. My iPhone got disabled after entering the password 8-10 times wrong. I didn't synchronize it to iTunes nor back up. I keep seeing that I have to format it but I don't want to lose my data on it. Is there any way to recover my data ? If there is can you help me? Thank you.

    Sorry if you haven't been backing up to icloud or iTunes then there is no data to recover.
    You will need to proceed with the restore in order to use your phone again.   Forgot passcode for your iPhone, iPad, or iPod touch, or your device is disabled - Apple Support

  • My iphone don't have power. I am using a iPhone 5 automatic turn off. Now I press power but it don't turn on. Please help me. Thank you so much

    Dear Apple,
    I am using an iPhone 5. It automatic turn off after that I press power on iphone but it don't turn on power.
    Please help me. Thank you so much.
    <Personal Information Removed by Host>

    Try a reset. Hold the sleep/wake and home buttons together until you see the Apple logo and then release. The phone will reboot. You may need to connect the device to the charger before you attempt the reset.

  • HT5312 I dont remember security questions. i want to take it. I hope you help me. Thanks you.

    Hi!
    I don't remember security questions. i want to take it. I hope you help me. Thanks you.

    You need to contact Apple. Click here, phone them, and ask for the Account Security team.
    (87159)

  • My Mac is producing gray screen at startup and crashes. I'm afraid that everything explode and disappear, and can no longer connect and work with my Mac. Can anyone help ?? Thank you.

    My Mac is producing gray screen at startup and crashes. I'm afraid that everything explode and disappear, and can no longer connect and work with my Mac. Can anyone help ??
    Thank you.
    Problem description:
    gray screen at startup and crashes
    EtreCheck version: 2.1.1 (104)
    Report generated 6 de dezembro de 2014 13:29:43 BRST
    Hardware Information: ℹ️
      MacBook Pro (15-inch, Early 2011) (Verified)
      MacBook Pro - model: MacBookPro8,2
      1 2.2 GHz Intel Core i7 CPU: 4-core
      4 GB RAM
      BANK 0/DIMM0
      2 GB DDR3 1333 MHz ok
      BANK 1/DIMM0
      2 GB DDR3 1333 MHz ok
      Bluetooth: Old - Handoff/Airdrop2 not supported
      Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
      AMD Radeon HD 6750M - VRAM: 1024 MB
      Color LCD 1440 x 900
      Intel HD Graphics 3000 - VRAM: 384 MB
    System Software: ℹ️
      Mac OS X 10.6.8 (10K549) - Uptime: 0:31:56
    Disk Information: ℹ️
      TOSHIBA MK7559GSXF disk0 : (698,64 GB)
      S.M.A.R.T. Status: Verified
      - (disk0s1) <not mounted> : 210 MB
      Macintosh HD (disk0s2) / : 749.81 GB (378.70 GB free)
      MATSHITADVD-R   UJ-898 
    USB Information: ℹ️
      Apple Inc. FaceTime HD Camera (Built-in)
      Apple Inc. Apple Internal Keyboard / Trackpad
      Apple Inc. BRCM2070 Hub
      Apple Inc. Bluetooth USB Host Controller
      Apple Computer, Inc. IR Receiver
    Thunderbolt Information: ℹ️
      Apple, Inc. MacBook Pro
    Problem System Launch Daemons: ℹ️
      [not loaded] org.samba.winbindd.plist [Support]
    Launch Agents: ℹ️
      [running] com.babylon.activation.plist [Support]
      [loaded] com.divx.dms.agent.plist [Support]
      [loaded] com.divx.update.agent.plist [Support]
      [loaded] com.hp.help.tocgenerator.plist [Support]
    Launch Daemons: ℹ️
      [loaded] com.adobe.fpsaud.plist [Support]
      [loaded] com.microsoft.office.licensing.helper.plist [Support]
    User Launch Agents: ℹ️
      [loaded] com.adobe.ARM.[...].plist [Support]
      [loaded] com.facebook.videochat.[redacted].plist [Support]
      [loaded] com.google.keystone.agent.plist [Support]
      [running] com.skype.c2c_service.plist [Support]
    User Login Items: ℹ️
      iTunesHelper UNKNOWNHidden (missing value)
      FaceboxPro Aplicativo (/Applications/FaceboxPro.app)
      Safari Aplicativo (/Applications/Safari.app)
      Octoshape Aplicativo (/Users/[redacted]/Library/Octoshape/Octoshape.app)
      uTorrent UNKNOWN (missing value)
      Dropbox Aplicativo (/Applications/Dropbox.app)
      Inkscape UNKNOWN (missing value)
      RealPlayer Downloader Agent Aplicativo (/Users/[redacted]/Library/Application Support/RealNetworks/RealPlayer Downloader Agent.app)
      HP Product Research Aplicativo (/Library/Application Support/Hewlett-Packard/Customer Participation/HP Product Research.app)
    Internet Plug-ins: ℹ️
      OVSHelper: Version: 1.1 [Support]
      Google Earth Web Plug-in: Version: 7.1 [Support]
      Flip4Mac WMV Plugin: Version: 2.4.4.2 [Support]
      RealPlayer Plugin: Version: Unknown [Support]
      AdobePDFViewerNPAPI: Version: 10.1.12 [Support]
      FlashPlayer-10.6: Version: 15.0.0.239 - SDK 10.6 [Support]
      DivX Web Player: Version: 3.1.1.9 - SDK 10.6 [Support]
      Silverlight: Version: 5.1.30514.0 - SDK 10.6 [Support]
      Flash Player: Version: 15.0.0.239 - SDK 10.6 [Support]
      QuickTime Plugin: Version: 7.6.6
      iPhotoPhotocast: Version: 7.0 - SDK 10.7
      SharePointBrowserPlugin: Version: 14.1.2 [Support]
      AdobePDFViewer: Version: 10.1.12 [Support]
      JavaAppletPlugin: Version: 13.9.8 - SDK 10.6 Check version
    User internet Plug-ins: ℹ️
      npsf_uni: Version: sf 3.3.2.1 [Support]
      OctoshapeWeb: Version: 1.0 - SDK 10.8 [Support]
    Safari Extensions: ℹ️
      Searchme Adware! [Remove]
      Skype Click to Call
      iSkyDeluxe
      TED HTML5 video playe
    Audio Plug-ins: ℹ️
      iSightAudio: Version: 7.6.6
    3rd Party Preference Panes: ℹ️
      Flash Player  [Support]
      Flip4Mac WMV  [Support]
      Skype Click to Call  [Support]
      Tuxera NTFS  [Support]
    Time Machine: ℹ️
      Time Machine information requires OS X 10.7 "Lion" or later.
    Top Processes by CPU: ℹ️
          5% WindowServer
          4% DivXMediaServer
          1% fontd
          0% RealPlayer Downloader Agent
          0% WebProcess
    Top Processes by Memory: ℹ️
      296 MB WebProcess
      202 MB FaceboxPro
      185 MB Microsoft PowerPoint
      163 MB Safari
      137 MB Microsoft Word
    Virtual Memory Information: ℹ️
      843 MB Free RAM
      1.76 GB Active RAM
      706 MB Inactive RAM
      978 MB Wired RAM
      577 MB Page-ins
      0 B Page-outs
    Diagnostics Information: ℹ️
      Dec 6, 2014, 12:58:24 PM Self test - passed
      Dec 6, 2014, 12:23:11 PM Kernel_2014-12-06-122311_MacBook-Pro-de-...panic [Details]
      Dec 6, 2014, 07:08:28 AM PluginProcess_2014-12-06-070828_MacBook-...crash
      Dec 5, 2014, 05:24:39 PM WebProcess_2014-12-05-172439_MacBook-Pro...crash
      Dec 5, 2014, 10:45:59 AM Kernel_2014-12-05-104559_MacBook-Pro-de-...panic [Details]
      Dec 5, 2014, 10:18:14 AM Kernel_2014-12-05-101814_MacBook-Pro-de-...panic [Details]
      Dec 3, 2014, 08:28:35 PM locationd_2014-12-03-202835_localhost.crash
      Dec 5, 2014, 10:25:44 AM Kernel_2014-12-05-102544_MacBook-Pro-de-...panic [Details]

    Startup - Gray, Blue or White screen at boot, w/spinner/progress bar
    Startup Issues - Resolve
    Startup Issues - Resolve (2)

  • Hello, since I actualized my Mac with Maverick it doesn't recognize any  external hard disk ,... only the one to make copy on the time machine. Can anybody help me? thank you!!!!

    hello, since I actualized my Mac with Maverick it doesn't recognize any  external hard disk ,... only the one to make copy on the time machine. Can anybody help me? thank you!!!!

    Hello Laurabcn,
    Thank you for using Apple Support Communities.
    For more information, take a look at:
    USB and FireWire Quick Assist
    http://support.apple.com/kb/ht1151
    Have a nice day,
    Mario

  • My iPhone was stolen in Asia and it's now in Germany. How do I get it back? All I have left is a serial number, apple ID and password, plus a police report. What do I do now? I really want my phone back. Can someone help me? Thank you, Bobi

    My iPhone was stolen in Asia and it's now in Germany. How do I get it back? All I have left is a serial number, apple ID and password, plus a police report. What do I do now? I really want my phone back. Can someone help me? Thank you, Bobi

    No one here can help you, nor can Apple or any carrier. If you know the location, contact the local police where it is located.

  • I tried to download an app on the mac app store and it continues to  say: "There was an error in the App Store. Please try again later. (null)" Please help me. Thank you.

    I tried to download an app on the mac app store and it continues to  say: "There was an error in the App Store. Please try again later. (null)" Please help me. Thank you.

    Change your Date &amp; Time settings to reflect automatic. It will fix the problem.

Maybe you are looking for

  • Install windows 8.1 in 10.9 Mac Pro Mid 2013

    Hey guys I am trying to install windows 8.1 using ISO in CD ROM, boot camp says "Windows 8.1 cant be installed". Here is the info.pst. A post said to change the msb to  one lower mode where windows 8.1 is  but there is no windows 8.1 only windows 7.

  • Http headers, http receiver adapter

    Hello, I have a scenario SAP -> RFC -> XI -> HTTPREQUEST -> webserver SAP <- RFC <- XI <- HTTPRESPONSE <- -""- I need to read a http header in the httpresponse. How can that be done? Anyone has an example? Best regards /Otto

  • Migrate MS SQL Server procedure to Oracle

    Can any one suggest me any user friendly tool to Migrate MS SQL Server procedure to Oracle. I think using OMWB we can migrate schemas, as i could not find any interface to migrate a single procedure

  • 'Paper Available' box / 'printMediaReady' registry key not sticking

    I am running a print server on Windows Server 2008 R2. When you open the printer properties box, on the general tab, there is a 'Paper Available' box.  All the printers pretty much all say 'letter' in that box - some say Letter and Legal and we also

  • Listener supports no service

    Hi , i am having issues with listener when i chk the listener status it is runnig buti get the one message The listener supports no services and when i am trying to connect from the client using sqlplus or forms 6i i get ORA-12514: TNS:listener does