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
}
}
About Question com.enthuware.ets.scwcd.v5.2.21 :
Moderator: admin
-
- Posts: 33
- Joined: Mon May 02, 2011 5:09 pm
- Contact:
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question com.enthuware.ets.scwcd.v5.2.21 :
This has been changed to super.service();
Thanks for the feedback!
Thanks for the feedback!
Who is online
Users browsing this forum: No registered users and 20 guests