I want to know how do i know the type of component on the requst object. That means if i have an HTML page with textbox, button and few other components, if on submitting this form i call i servlet. Then in a servlet how do i know the type of the compenent.
I'm not sure why you would want to do that, but the only way I can think of is by using naming conventions since the name of the field/button is submitted as the name of the parameter. For instance, name an input field with a name attribute of "ifirstname" or a button with a name of "bsubmit". You could then parse the name to determine the component type.
But this seems like a lot of trouble for little gain. Why do you need this information? If you'll explain why you want to do this, maybe there is a better way to accomplish your goal.
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." -- Ted Nelson