File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Forms in Java/Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Forms in Java/Servlets" Watch "Forms in Java/Servlets" New topic

Forms in Java/Servlets

nilima komala

Joined: Mar 03, 2005
Posts: 8
Hi! can any one tell, is it possible to generate forms in Servlets or in Java

if so how can we do that.Its very urgent please tell me.
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

Forms are simple html files, you dont need servlets or Java for that.
You are talking about forms on web pages, right?
nilima komala

Joined: Mar 03, 2005
Posts: 8
What i exactly mean is I did a project in inventory control using servlets.I created user interfaces.Now i want to generate forms.
Ben Wood
Ranch Hand

Joined: Aug 14, 2001
Posts: 342
Just use the servlet to write the HTML for the form dynamically if that's what you need.

in the servlet...

SCJP 1.4,
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

If you mean HTML forms, the simplest way to do this is to use JSP to build your forms and servlets to process them.

Have a look at SimpleMVC at for an example.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: Forms in Java/Servlets
jQuery in Action, 3rd edition