How to validate text field with JSP

S

shyam shukla

Dear All,

I have created a application using JSP/HTML as a front end and
MS-Access as a Back End with JRun as an application server.I am not
able to prompt the user if any text field is left blank.
 
A

Andrew Thompson

I have created a application using JSP/HTML as a front end and
MS-Access as a Back End with JRun as an application server.

URL? Has it gone public yet (ever?),
or is it just local?
..I am not
able to prompt the user if any text field is left blank.

That is very vague (not exact, no detail).
<http://www.physci.org/codes/javafaq.jsp#specific>
<http://www.physci.org/codes/javafaq.jsp#exact>

....
It is possible you need to validate on the server
and return a page to the user showing them what
information is missing or invalid.

You could also do it entirely on the client-side
using Javascript, but since you need (usually) a
pure HTML fall-back, delivering the information to
the server for valifation is the usual way,
as far as I understand.

HTH
 
J

Johan Poppe

shyam shukla skrev:
Dear All,

I have created a application using JSP/HTML as a front end and
MS-Access as a Back End with JRun as an application server.I am not
able to prompt the user if any text field is left blank.

If you want that to happen client-side, you need javascript. See an
appropriate newsgroup for details.

As some users may have javascript turned off, you should have a
server-side check as well. That's simply a question of getting the
value of that textfield from the Request object, checking if it's an
empty string, and returning an appropriate error message to the
client/user if so.
 

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,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top