• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Mock Exam Doubts

 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.

 
Poonam Agarwal
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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!!
 
Ranch Hand
Posts: 67
Mac Eclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Dhruva Mistry
Ranch Hand
Posts: 67
Mac Eclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
    Bookmark Topic Watch Topic
  • New Topic