Page 1 of 1

About Question enthuware.jwpv6.2.639 :

Posted: Sat Feb 27, 2016 2:26 pm
by webdeveloper
Option a is incorrect. Initialization Parameters are configured through the parent (of ServletRegistration) interface - Registration

Re: About Question enthuware.jwpv6.2.639 :

Posted: Sat Feb 27, 2016 8:56 pm
by admin
The problem statement is, "What all can be configured for a servlet using a ServletRegistration object?"
Are you claiming that you cannot configure initialization parameters using a ServletRegistration?

The point is ServletRegistration is an interface. So a "ServletRegistration object" implies an object of a class that implements this interface. You can certainly configure initialization parameters using that object. Yes, you can do so using an object of a class that implements Registration as well but that doesn't make the question wrong.

Paul.

Re: About Question enthuware.jwpv6.2.639 :

Posted: Mon Sep 05, 2016 4:33 am
by mhaque05
ServletRegistration also has a method getRunAsRole(). So, option C "Run As Role" also can be correct answer.

Re: About Question enthuware.jwpv6.2.639 :

Posted: Mon Sep 05, 2016 11:14 am
by admin
It returns the role. It doesn't let you configure the role.

-Paul.

Re: About Question enthuware.jwpv6.2.639 :

Posted: Mon Jul 10, 2017 10:47 am
by manoj6992
javax.servlet.ServletRegistration extends javax.servlet.Registration: Provides addMapping and addMappings All Known Subinterfaces: ServletRegistration.Dynamic
Looks like the above explanation provided is wrong.
I don't find any addMappings() for javax.servlet.ServletRegistration Interface.

Below is what I found (ref: http://docs.oracle.com/javaee/6/api/jav ... ation.html)
==================================================================
addMapping(java.lang.String... urlPatterns)
getMappings()
getRunAsRole()

Can you please confirm.

Regards,
Manoj

Re: About Question enthuware.jwpv6.2.639 :

Posted: Mon Jul 10, 2017 10:02 pm
by admin
Yes, it should be getMappings. But this was fixed almost 6 months ago. Please download the latest version of the question bank from our website.

HTH,
Paul.