Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passed with 88%

 
Andy Ng
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just passed the exam with 88%.
The exam is pretty easy and straight forward.
Some trick you have to concern:
1. directives can define anywhere in the page.
2. scope for useBean, when the bean available within the page?
3. what happen for session and application when the web-app shut down and startup? (Listener).
4. using combination of ' and "
5. body content of a tag
Good luck!
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
 
tony lee
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Andy,
I have some questions on your points:

2. scope for useBean, when the bean available within the page?
3. what happen for session and application when the web-app shut down and startup? (Listener).
4. using combination of ' and "

->2. As soon as we declare <%useBean id=".." %>, right? Some guy said such a bean is available in the page by default (without specifying scope attribute), but I can't find it on spec.
->3. When web-app shut down:
session: seesion.invalidate() is called.
application: Servlet.destroy() is called.
When web-app startup:
session: After a request, session.getSession is called.
application: class is loaded, instanciate(), init(), service()are called.
Seems nothing to do with listeners
->4. Could somebody tell me about this
 
Ashik Uzzaman
Ranch Hand
Posts: 2373
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andy, nice job done...congrats
 
Andy Ng
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tony
for 2. How about I give an example of useBean scope:
<% { %>
<jsp:useBean id=test ..../>
....
<% } %>
....
will the test bean outside the { } scope.
for 3. I don't think the session.invalide() will call when we shut down the web-app, instead HttpSessionActivationListener.willPassivate() will call.
for 4. can we do something like this:
<jsp:useBean id= .... value='<eg:egtag attr="test"/>'/>
Andy
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congrats.
- satya
 
tony lee
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Andy,
You gave a few interesting examples. Thanks.

for 2. How about I give an example of useBean scope:
<% { %>
<jsp:useBean id=test ..../>
....
<% } %>
....
will the test bean outside the { } scope.

In the case I think the test bean is only available to the local {}, no mater what scope has been declared, right?
for 3. I don't think the session.invalide() will call when we shut down the web-app, instead HttpSessionActivationListener.willPassivate() will call.

Shall we need to impliment HttpSessionActivationListener manually, or container automatically does that for us?
for 4. can we do something like this:
<jsp:useBean id= .... value='<eg:egtag attr="test"/>'/>

I know we can use a request time attribute value like "<%= scriptlet_expr %>" or '<%= scriptlet_expr %>'. Could we use custom tag expression
Whenever we use sigle quotes or double quotes, I think the principle is making no intersections of the quotes, right?
In this way, '..".."..' is equivalent to "..'..'.."
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic