This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

question from the mock exam..

 
Ranch Hand
Posts: 644
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the mandatory elements of the web-resource-collection element?
1. web-resource-name
2. url-pattern
3. http-method
4. auth-constrint
I think 1,2,2is correct.
The correct answer is 1,2
need expailnaton..
thanks in advance
trupti
===============================================
I think the correct answer is 1,2 and 3..
thanks
Trupti
[ October 16, 2002: Message edited by: trupti nigam ]
 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<!ELEMENT web-resource-collection(web-resource-name,description?,url-pattern*, http-method*)>
see the dtd
 
Ugly Redneck
Posts: 1006
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As per the More Servlets book, the http-method tag is optional. So only 1,2 are the correct choices.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doesn't the asterisk (*) mean that the tag can exist zero or more times? If that's the case, then only the <web-resource-name> tag is required. Though it doesn't make sense to declare a name without a corresponding url-pattern or http-method, I tried it and it worked.
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u are right.only web-resource-name is mandatory.
I normally use the trick of "find text" to find the occurence of tag in dtd.
Regards
Ajay Rana
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The DTD link given in one of previous posts is for Servlet 2.2 spec.
SCWCD exam tests on Servlet 2.3 version.
Here is the 2.3 DTD link.
http://java.sun.com/dtd/web-app_2_3.dtd
Regards
Maha Anna
    Bookmark Topic Watch Topic
  • New Topic