This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one for details.
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

Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

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