jQuery in Action, 2nd edition*
The moose likes Servlets and the fly likes Issue with POST and Forms Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Issue with POST and Forms" Watch "Issue with POST and Forms" New topic

Issue with POST and Forms

Kenny Johnson
Ranch Hand

Joined: Jan 01, 2007
Posts: 37
I have this code:

html file

then inside of doGet for my servlet i have this:

The output is always null...
what the heck am i doing wrong? I want it to say light if the user chose light, dark if they pick dark etc ...

what little thing am i forgetting?
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
Did you mean inside of doPost?
vijay kumarg
Ranch Hand

Joined: Dec 14, 2006
Posts: 105
Your method attributes indicates the HTTP request is of type POST.
You should write the above logic in doPost() but not in doGet().
The default http request is GET.
jQuery in Action, 2nd edition
subject: Issue with POST and Forms
Similar Threads
HTTP Status 404 Error
HFS: Problem with deploying and testing Beer-v1 App
Problem getting the Beer Selection Page screen shot
servlet programming problem in Eclipse
HFSJ 2nd edition page 75