Meaningless Drivel is fun!
The moose likes Servlets and the fly likes Servlet question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet question" Watch "Servlet question" New topic

Servlet question

Lucky Singh
Ranch Hand

Joined: Jan 19, 2004
Posts: 125
I was going through 'Wrox Professional Server programming- Part 1'.
Had the following question with respect to the Chat servlets example mentioned there.
I have a servlet that displays an HTML form. This form contains two text fields in which we enter the name of the chat room and its description.
On submitting the form, this must go to which is a jar file already ready in Tomcat-- (lib subdirectory). adds a new chat room to its stack.
My questions were-
Do I need to have both doGet() and doPost() in my servlet?
I had some blank spaces in my HTML form. How do I fill up the gaps, for example form action?
Where will I include code for servlet to pass chatroom name and chatroom description to What will the code look like?
public void doGet(...........)
out.println("<FORM METHOD=Post Action=________________>");
form is displayed with 2 text fields.
I agree. Here's the link:
subject: Servlet question
It's not a secret anymore!