-
Binary text
Hi,
I am new in JSP...
Well, I need to make binary field in my JSP, but I don't know how... What I need is ordinary text field, but with restriction towards all other characters except "0" and "1". So, when someone tries to input, for example character "2" or "s" or etc. (character that is not "0" nor "1"), I would like my field not to react at all.
Is this possible?
Thanks. Bye, Igor
-
turtle rules
You have several issues, we will start by making a simple ascii generator:
Code:
while(char < limit) file.print(char);// char starts at space
That is overly abbreviated, but the first thing we need to do is move away from the char transmission as binary, there are many tools already in place that transmit a great deal of information using regular Strings, doing it as regular internet traffic. We get a PrintWriter or something like it for free in JSP when the page is invoked, we just have to remember to set the header to text/html.
Guess what, it does that by shipping a regular String.
I normally don't smile but I did the smiley to encourage you to do a few steps before getting bogged.