Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SCWCD explanation requests

 
Lukasz Bajzel
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marcus thanks a lot for a mock (www.examulator.com)
Thanking for this mock I've got some potential issues/questions:

Filters are called in the order they appear in the deployment descriptor Correct . In my opinion it does not have to be true because filters are put in a chain but first by matching URL and than by matching servlet-name. So there is a way to create such a DD that filters won't be called in the order they appear in the DD.



Explanation request:

1. "The beanName attribute of useBean is only used with serialized beans"

Could you or anyone please give me some explanation why ?

2. Tag Files must be kept in the WEB-INF\tags or a sub directory of that directory - Correct

And what about tag files inside jar files ? They can be kept inside a META-INF/tags or it's subdirectory

Thanks in advance,
I'm preparing to SCWCD so that's why I'm very interested on the answers.

Lukasz
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Why ? Because it's the way it is ! It's the way it has been specified. If you look at the JSP Specification "JSP.5.1 <jsp:useBean>", it tells you what the beanName represents :


The attribute beanName specifies the name of a Bean, as specified in the JavaBeans specification. It is used as an argument to the instantiate method in the java.beans.Beans class. It must be of the form a.b.c, which may be either a class, or the name of a resource of the form a/b/c.ser that will be resolved in the current ClassLoader. If this is not true, a request-time exception, as indicated in the semantics of the instantiate method will be raised. The value of this attribute can be a request-time attribute expression.


2. You're right about jarred Tag Files.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic