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

Moderator: admin

Post Reply
max2fl
Posts: 33
Joined: Mon May 02, 2011 5:09 pm
Contact:

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

Post 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
}
}

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

This has been changed to super.service();

Thanks for the feedback!

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests