This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Passing parameter problem 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 "Passing parameter problem" Watch "Passing parameter problem" New topic
Author

Passing parameter problem

Faisal Fuad
Ranch Hand

Joined: Jul 05, 2011
Posts: 79

Hi everyone. Having a very funny problem. New here in Servlet stuff and so need your help. From a simple html page i want to pass a input to a servlet where it will do some specific talks. Now the logic i was thinking is like: If the user puss null value then the servlet will check and will say "Sorry" or else the servlet will be happy to serve.

I used the IF..ELSE statement to do the evaluation part in the Servlet but don't know why it is everytime going to the ELSE part of the statement even though i am not passing anything from the html page.

The Html page is as follows:


And the Servlet "GetData.java" is as follows:


Can any one please let me know where i am doing the mistake?

Thank you very much.
Murthy Tanniru
Greenhorn

Joined: Jun 03, 2008
Posts: 14
correct the code as below:

Faisal Fuad
Ranch Hand

Joined: Jul 05, 2011
Posts: 79

..........and it is beautifully resolved. Thank you so much Tanniru. God bless
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Passing parameter problem
 
Similar Threads
Newbie: Need help with checkbox post parameters
send variable value from one servlet to another servlet for itext pdf
Need to split up servlet
About create a session!
DB2 SQL Error: SQLCODE=-103