Identifying type of web control that sent some information to servlet

A

Asad

Is there anyone we can identify in a servlet, what type of web control
(e.g. textbox, textarea, radio buttons etc.) sent a particular piece
of information?

One dumb way to do it is that if your controls have a naming
convention such as txtboxFoo, radioButtonFoo, etc. you can decipher it
using String class. But I am hoping there is a better more fool proof
way of doing it rather than relying on naming convention.

Asad
 
M

Michael Borgwardt

Asad said:
One dumb way to do it is that if your controls have a naming
convention such as txtboxFoo, radioButtonFoo, etc. you can decipher it
using String class. But I am hoping there is a better more fool proof
way of doing it rather than relying on naming convention.

No, there is none.
 
P

perry

if you encapsulate the technique you have described, you can switch to a
better method at a later date without requiring much overhaul on your code.

- perry
 
A

Asad

Would you kindly describe what you mean by encapsulating the
technique? And also how that would allow me to switch to a better
method later on?

Thanks.

Asad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top