About Question enthuware.jwpv6.2.639 :

Moderator: admin

Post Reply
webdeveloper
Posts: 8
Joined: Tue Jan 19, 2016 9:05 pm
Contact:

About Question enthuware.jwpv6.2.639 :

Post by webdeveloper »

Option a is incorrect. Initialization Parameters are configured through the parent (of ServletRegistration) interface - Registration

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

Re: About Question enthuware.jwpv6.2.639 :

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

mhaque05
Posts: 1
Joined: Thu Mar 10, 2016 8:20 am
Contact:

Re: About Question enthuware.jwpv6.2.639 :

Post by mhaque05 »

ServletRegistration also has a method getRunAsRole(). So, option C "Run As Role" also can be correct answer.

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

Re: About Question enthuware.jwpv6.2.639 :

Post by admin »

It returns the role. It doesn't let you configure the role.

-Paul.

manoj6992
Posts: 3
Joined: Wed Dec 30, 2015 1:17 am
Contact:

Re: About Question enthuware.jwpv6.2.639 :

Post 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

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

Re: About Question enthuware.jwpv6.2.639 :

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

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests