GeeCON Prague 2014*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Mock Exam Doubts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Mock Exam Doubts" Watch "Mock Exam Doubts" New topic
Author

Mock Exam Doubts

sravanthi pulukuri
Ranch Hand

Joined: Mar 15, 2007
Posts: 125
Hi,

There was a Question about the location of TLD.
options are
A./WEB-INF
B./META-INF
C./WEB-INF/tlds
D./META-INF/tlds
E./WEB-INF/resources
F./META-INF/resources.

Answer was given as A,C,E. i dont know how it was E??Please help

2.
Which two listners are needed to declared in DD?
1. HttpSessionBindingListner
2. HttpSessionTimedoutListner
3.HttpSessionAttributeListner
4.HttpSessionActivationListner
5.HttpSessionPassivatedListner
6.HttpSessionListner


I think answer should be 1 and 4.but was given as 1,3,5

Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

About 1: JSP.7.3.1 Identifying Tag Library Descriptors

When deployed directly into a web application, the tag library descriptor files must always be in the WEB-INF directory, or some subdirectory of it. TLD files should not be placed in /WEB-INF/classes or /WEB-INF/lib.

About 2 : check this FAQ.


[My Blog]
All roads lead to JavaRanch
Sonali Sabnis
Greenhorn

Joined: Aug 25, 2008
Posts: 20
By looking at this : http://faq.javaranch.com/java/DeclaringListeners

we don't need to declare both HttpSessionBindingListener and HttpSessionActivationListener in DD.

So the answer should be HttpSessionAttributeListner and HttpSessionListner.
correct me if I am wrong.
Poonam Agarwal
Ranch Hand

Joined: May 12, 2008
Posts: 323
sonali sabnis wrote:By looking at this : http://faq.javaranch.com/java/DeclaringListeners

we don't need to declare both HttpSessionBindingListener and HttpSessionActivationListener in DD.

So the answer should be HttpSessionAttributeListner and HttpSessionListner.
correct me if I am wrong.



HttpSessionBindingListener and HttpSessionActivationListener dose not require any declration in web.xml file.
rest are need to be declared through <listener> tag.


Thanks <br />Poonam Agarwal SCWCD 86%
Poonam Agarwal
Ranch Hand

Joined: May 12, 2008
Posts: 323
sravanthi pulukuri wrote:Hi,

There was a Question about the location of TLD.
options are
A./WEB-INF
B./META-INF
C./WEB-INF/tlds
D./META-INF/tlds
E./WEB-INF/resources
F./META-INF/resources.

Answer was given as A,C,E. i dont know how it was E??Please help

2.
Which two listners are needed to declared in DD?
1. HttpSessionBindingListner
2. HttpSessionTimedoutListner
3.HttpSessionAttributeListner
4.HttpSessionActivationListner
5.HttpSessionPassivatedListner
6.HttpSessionListner


I think answer should be 1 and 4.but was given as 1,3,5



please mention your source!!
Dhruva Mistry
Ranch Hand

Joined: Nov 21, 2008
Posts: 67

sravanthi pulukuri wrote:Hi,

There was a Question about the location of TLD.
options are
A./WEB-INF
B./META-INF
C./WEB-INF/tlds
D./META-INF/tlds
E./WEB-INF/resources
F./META-INF/resources.

Answer was given as A,C,E. i dont know how it was E??Please help

2.
Which two listners are needed to declared in DD?
1. HttpSessionBindingListner
2. HttpSessionTimedoutListner
3.HttpSessionAttributeListner
4.HttpSessionActivationListner
5.HttpSessionPassivatedListner
6.HttpSessionListner


I think answer should be 1 and 4.but was given as 1,3,5




for your 1st Query: for E option, in practical world, "resources" will be referred as "name of a folder" where you will put your tld files eg in my project, there ia a folder named "jstl" where other few tld are residing
in short, in \WEB-INF tld get stored

sorry for your 2nd Query for i am just new to web developments

hoping explanation for 1st Q of your will help you out


Dhruva
Abhijit Das
Ranch Hand

Joined: Sep 25, 2007
Posts: 156
hi,
generally resources folder are used for jsp, html .... which are placed outside the /WEB-INF. According the convention, the question should not be like this.

Otherwise, tld must be placed inside /WEB-INF.

I am not sure whether it can be placed inside

/WEB-INF/lib or /WEB-INf/classes.

am i correct?


Abhijit Das
SCJP 5.0 | SCWCD 1.5
Dhruva Mistry
Ranch Hand

Joined: Nov 21, 2008
Posts: 67

Abhijit Das wrote:hi,
generally resources folder are used for jsp, html .... which are placed outside the /WEB-INF. According the convention, the question should not be like this.

Otherwise, tld must be placed inside /WEB-INF.

I am not sure whether it can be placed inside

/WEB-INF/lib or /WEB-INf/classes.

am i correct?


in \WEB-INF\lib ----resides --> .jar files
in \WEB-INF\class ----resides---> .class files
sridhar row
Ranch Hand

Joined: Jan 16, 2008
Posts: 162
sravanthi pulukuri wrote:Hi,

There was a Question about the location of TLD.
options are
A./WEB-INF
B./META-INF
C./WEB-INF/tlds
D./META-INF/tlds
E./WEB-INF/resources
F./META-INF/resources.

Answer was given as A,C,E. i dont know how it was E??Please help



D is also correct. TLDs can be in META-INF or a subdirectory of META-INF if deployed in a JAR.
Gupta Singh
Greenhorn

Joined: Feb 25, 2009
Posts: 5
sridhar row wrote:
D is also correct. TLDs can be in META-INF or a subdirectory of META-INF if deployed in a JAR.


Not in this case. Option D refers to the top-level META-INF, the sibling to WEB-INF as noted by the '/'. The META-INF you are refering to is the lower-level META-INF directory found inside .jar files.

sridhar row
Ranch Hand

Joined: Jan 16, 2008
Posts: 162
Gupta Singh wrote:
sridhar row wrote:
D is also correct. TLDs can be in META-INF or a subdirectory of META-INF if deployed in a JAR.


Not in this case. Option D refers to the top-level META-INF, the sibling to WEB-INF as noted by the '/'. The META-INF you are refering to is the lower-level META-INF directory found inside .jar files.



You are right..thanks for the correction.
 
GeeCON Prague 2014
 
subject: Mock Exam Doubts