Page 1 of 1

About Question com.enthuware.ets.scwcd.v5.2.21 :

Posted: Mon May 02, 2011 5:47 pm
by max2fl
com.enthuware.ets.scwcd.v5.2.21 Test2 question 12 in exhibit section

super() possible to call only from constructor.

import java.util.*;
import javax.servlet.http.*;
public class TestServlet extends HttpServlet
{
static HashMap staticMap = new HashMap();
HashMap theMap = new HashMap();
public void init()
{
}
public void service(HttpServletRequest req, HttpServletResponse res)
{
super();
}
public void doGet(HttpServletRequest req, HttpServletResponse res)
{
HashMap localMap = new HashMap();
//do something
}
public void doPost(HttpServletRequest req, HttpServletResponse res)
{
HashMap sessionMap = (HashMap) req.getSession().getAttribute("map");
//do something
}
}

Re: About Question com.enthuware.ets.scwcd.v5.2.21 :

Posted: Tue May 03, 2011 6:19 am
by admin
This has been changed to super.service();

Thanks for the feedback!