Page 1 of 1

About Question enthuware.jwpv6.2.603 :

Posted: Sun Oct 16, 2011 9:22 am
by ETS User
None of the answers is correct.

Despite the fact that API description says that @WebInitParam annotation can be used on Servlet and Filter classes to define init parameter this is not correct.

Servlet 3.0 Specification
8.1.3 @WebInitParam
This annotation is used to specify any init parameters that must be passed to the
Servlet or the Filter. It is an attribute of the WebServlet and WebFilter
annotation.
@WebInitParam can be used only as parameter to @WebServlet and @WebFilter annotations:

Code: Select all

@WebServlet(urlPatterns="/AuthenticationServlet", initParams=@WebInitParam(name="test", value="testVal"))
public class AuthenticationServlet extends HttpServlet {}
I have made some test on Tomcat 7.0.22 and Glassfish 3.1.1 and if you use @WebInitParam outside @WebServlet annotation it is just ignored.

Re: About Question enthuware.jwpv6.2.603 :

Posted: Sun Oct 16, 2011 10:02 am
by admin
You are right. This has been fixed.

thanks for your feedback!

Re: About Question enthuware.jwpv6.2.603 :

Posted: Wed Dec 07, 2011 5:42 am
by Guest
After clicking evaluate, the solution "None of these" is not marked with the green color.

Re: About Question enthuware.jwpv6.2.603 :

Posted: Wed Dec 07, 2011 8:01 am
by admin
This has been fixed. Thank you for your feedback!