DinoAdor
October 2nd, 1999, 07:04 PM
Consider:
public void doPost(HttpServletRequest req,HttpServletResponse res)
throws ServletException, IOException
{
java.util.Hashtable formData =
HttpUtils.parsePostData(req.getContentLength(),
req.getInputStream());
String[] name = (String[])formData.get("name");
String[] email = (String[])formData.get("email");
addSignee(name[0], email[0]);
doGet(req,res);
}
Question: I know all methods in the HttpUtils class are static; therefore one doesn't have to instantiate the HttpUtils class to use them. But how come object formData of java.util.Hashtable didnt have to be instantiated since the methods are NOT static? ie. new Hashtable()?
Thanks
Dino
public void doPost(HttpServletRequest req,HttpServletResponse res)
throws ServletException, IOException
{
java.util.Hashtable formData =
HttpUtils.parsePostData(req.getContentLength(),
req.getInputStream());
String[] name = (String[])formData.get("name");
String[] email = (String[])formData.get("email");
addSignee(name[0], email[0]);
doGet(req,res);
}
Question: I know all methods in the HttpUtils class are static; therefore one doesn't have to instantiate the HttpUtils class to use them. But how come object formData of java.util.Hashtable didnt have to be instantiated since the methods are NOT static? ie. new Hashtable()?
Thanks
Dino