This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes HFSJ page 481 question 1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "HFSJ page 481 question 1" Watch "HFSJ page 481 question 1" New topic
Author

HFSJ page 481 question 1

Renu Radhika
Ranch Hand

Joined: Oct 21, 2005
Posts: 243
Which is true about TLD files?
Ans is TLD files may be placed in any subdirectory of WEB-INF.But we are not supposed to place it under WEB-INF/classes.So is the answer right?Also Study kit say we can place it under any folder under the web application root.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

I'll answer if you take some time to thank people answering your questions (I'm thinking of yesterday's five posts)


[My Blog]
All roads lead to JavaRanch
Renu Radhika
Ranch Hand

Joined: Oct 21, 2005
Posts: 243
oh sorry ,Thought of replying but then I had to log out immedaitely
Renu Radhika
Ranch Hand

Joined: Oct 21, 2005
Posts: 243
You have been very prompt in answering my question thanks a lot
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

Hey Satou,

I thank you all the time. You have been of great help in this forum and in javaranch!


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Renu, thank you. I was sure you were not ignoring fellow ranchers
(Jothi, thanks. And congrats for winning a book )

From the spec :
The container searches for all files with a .tld extension under /WEB-INF or a subdirectory, and inside JAR files that are in /WEB-INF/lib.
When examining a JAR file, only resources under /META-INF or a subdirectory are considered.
The order in which these files are searched for is implementation-specific and should not be relied on by web applications.

Also Study kit say we can place it under any folder under the web application root.

No, that's not true. And you don't want anybody to access it. (if you7re referring to SCWCD Study Kit, good luck to fix all the errors !)
Renu Radhika
Ranch Hand

Joined: Oct 21, 2005
Posts: 243
But what if I dont mind others accessing it?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

The container will not find it anyway. It does not look for TLDs in the context root. It only scans the directories I have mentioned above.
Renu Radhika
Ranch Hand

Joined: Oct 21, 2005
Posts: 243
But this doesnt answer my question completely.If I can place it in a subdirectory of web-inf,I can as well place it in web-inf classes web-inf lib etc.But that is not permitted right?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Sounds like it is permitted. Whatever directory under WEB-INF will do.
Renu Radhika
Ranch Hand

Joined: Oct 21, 2005
Posts: 243
ok...Thanks :-)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HFSJ page 481 question 1
 
Similar Threads
TLD files placement in JSP
Taglib file outside WEB-INF
Exmulator mock exam question 36
Regarding TLD Location
JSTL problem