Hi,
this is no problem. i've worked
alot in servlets.
The HTML file:
===================================================
<HTML>
<HEAD>
<TITLE>
GetForm
</TITLE>
</HEAD>
<BODY>
<FORM action=http://localhost/servlet/GetForm method="GET">
<select name=hSelect>
<option value=1 selected>1</option>
<option value=2>2</option>
<option value=3>3</option>
</select>
<BR><input type=text name=hText value=test>
<BR><input type=submit value="Submit">
</form>
</BODY>
</HTML>
======================================================
The Servlet:
=======================================================
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
public class GetForm extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = new PrintWriter (response.getOutputStream());
String jSelect = request.getParameter("hSelect");
String jText = request.getParameter("hText");
out.println("<html>");
out.println("<head><title>GetForm</title></head>");
out.println("<body>");
out.println("<br>The value of Select is: "+jSelect);
out.println("<br>The value of Text is: "+jText);
out.println("</body></html>");
out.close();
}
}
=========================================================
regds
ali