About Question enthuware.jwpv6.2.623 :

Moderator: admin

Post Reply
Ciprian Mihalache
Posts: 51
Joined: Wed Sep 28, 2011 12:14 pm
Contact:

About Question enthuware.jwpv6.2.623 :

Post by Ciprian Mihalache »

I need some help in understanding this question.
From the explanation I understood that the best choice is Custom Tags for View and POJOs for Model, so this makes answers 3 and 5 to be true. But we had to choose 3 answers, and it is explained why Filter should not be used for View, Servlet as Front Controller and JSP with scripting as a view. However, the option "JSP Scripting - View" is marked as correct and I don't understand why.
Thank you.

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

Re: About Question enthuware.jwpv6.2.623 :

Post by admin »

Hi,
JSP forms the substrate of all the view components. All the HTML and customs tags are actually embedded in the JSP page. So JSP scripting is unavoidable.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

sireesha

Re: About Question enthuware.jwpv6.2.623 :

Post by sireesha »

The question asks to select one option for each layer, But the answer shows 2 picks for view and one for model. It should be servlet for controller and pojo for model and JSP Scripting/ custom tag for view

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

Re: About Question enthuware.jwpv6.2.623 :

Post by admin »

Hi,
Although question doesn't explicitly ask for one option for each layer but I think you are right. It is not very clear that there could be two choices for same layer.
Option 1 is Front Controller and not Controller. Since servlets are not usually suited for front controllers, it is not a correct option.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

sebastien
Posts: 12
Joined: Tue Mar 26, 2013 2:38 pm
Contact:

Re: About Question enthuware.jwpv6.2.623 :

Post by sebastien »

Hi,
Since servlets are not usually suited for front controllers, it is not a correct option.
What can we use for front controller if servlet are not suited for that purpose ?

Sébastien

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

Re: About Question enthuware.jwpv6.2.623 :

Post by admin »

A filter would be more suitable in this case.
-Paul.
If you like our products and services, please help us by posting your review here.

jmkenny
Posts: 8
Joined: Sun Jun 02, 2013 11:04 am
Contact:

Re: About Question enthuware.jwpv6.2.623 :

Post by jmkenny »

Well... What about using a Servlet as Front Controller? Why is the filter more suitable?

Even here: http://www.oracle.com/technetwork/java/ ... 35648.html, it seems to have been implemented with a Servlet...

Such questions are really annoying... Is there any offical resource that states that Filter is more suitable for Front Controller?

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

Re: About Question enthuware.jwpv6.2.623 :

Post by admin »

I agree that it is difficult to find 100% accurate source because these things can really be done in multiple ways. It can be done using a jsp file as well.

Unfortunately, exam does have a questions that have ambiguous answers and our guess is as good as yours.

Our goal with these types of questions is not to annoy you but to bring this problem to your attention so that you are not surprised in the exam. It is easy for us to get rid of this (and other similar) question but then it would be detrimental for your preparation.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

gfrascadore
Posts: 1
Joined: Mon Nov 03, 2014 3:47 am
Contact:

Re: About Question enthuware.jwpv6.2.623 :

Post by gfrascadore »

admin wrote:Hi,
JSP forms the substrate of all the view components. All the HTML and customs tags are actually embedded in the JSP page. So JSP scripting is unavoidable.

HTH,
Paul.
Ok, but reading the text I understand that it referes to Scripting components like scriptlets, expression, declaration and so on, you are sayng therefore that behind the scenes custom tags and so on become jsp Scripting?

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

Re: About Question enthuware.jwpv6.2.623 :

Post by admin »

No, they are not "converted" into scripting. They are embedded in a JSP page. The whole page is converted into a Java class.
What the explanation is trying to say is that a view is built using a JSP page and in that page you embed HTML and/or custom tags. But constructs such a loops, temporary variables, or even EL are the glue that bind everything together in a JSP page. So JSP scripting is essentially meant for building the "view" component of the application.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests