This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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 Building Microservices this week in the Design 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.
Have you checked out Aspose?
subject: Issue with POST and Forms
It's not a secret anymore!