• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Some JWebplus Questions....

 
Poonam Akash
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
These qs. are from JwebPlus..
Note:I forget the Qs.Id of 1st qs...Sorry!
Q1.In which of the following cases will the method doAfterBody() of a tag handler be invoked?
Ans:
1.This method will be called only when doEndtag() returns Tag.EVAL_BODY_INCLUDE or BodyTag.EVAL_BODY_BUFFERED.
2.This method will be called only when doStarttag() returns Tag.EVAL_BODY_INCLUDE or BodyTag.EVAL_BODY_BUFFERED.
3.This method will be called when doAfterBody() returns Tag.EVAL_BODY_AGAIN.
The correct was option 3.Why not onption 2?
Q2.
Question ID :999998515240
You are designing a complex webapp that uses multi tier architecture. The application must provide interfaces for HTML as well as XML and should be maintainable.Which design pattern would you use?
Ans:
1.MVC
2.Business Delegate
3.DAO
4.Value Objects
The correct option was 2,but again i think 1!
Any clue?
Bye
 
Poonam Akash
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello........
Anyone there??
 
Fred Su
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,Poonam
In Q1:
The option 2 was a trick!!
2.This method will be called 'only' when doStarttag() returns Tag.EVAL_BODY_INCLUDE or BodyTag.EVAL_BODY_BUFFERED.
Wrong! Because 'not only'!!
Fred
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For your 2nd question this thread might help. http://www.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=18&t=000681
 
Ram Dhan Yadav K
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think MVC is a architecture/framework not a pattern! When they ask you to select pattern you cannot actually select MVC. You have to select on of the patterns which enables the MVC. Struts FRAMEWORK is built to optimize MVC features.
One more thing what i believe is that, while asking questions on patterns especially, they should ask to select more than one pattern, as some of the patterns have similar features and cater to the same functionality.
But i have seen a question in Anand Chawlas exam which was confusing telling that MVC is a pattern.
Correct me if I am wrong.
 
Ram Dhan Yadav K
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Poonam,
API says this:
This method returns Tag.EVAL_BODY_INCLUDE or BodyTag.EVAL_BODY_BUFFERED to indicate that the body of the action should be evaluated or SKIP_BODY to indicate otherwise.
So, you have the liberty to ask webplus guys to change the selection criteria to 2 instead of 1.
good luck,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic