Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please clarify

 
Jyothi Pathuri
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,

I got the following question in a mock exam.
1) Which are mandatory elements of taglib descriptor file
a)tlib-version
b)jsp-version
c)short-name
d)tag

Answer : all are mandatory.

What is jsp-version? Please clarify

2) This is from j2eecertificate.com
Given the following extract from a deployment descriptor, which of the following statements regarding authentication are true? [Check all correct answers]

<web-app> ....
<login-config>
<auth-method>DIGEST</auth-method>
</login-config>
...</web-app>

1 All data between the client and the server is encrypted.
2 This authentication method is supported by all the commonly used browsers.
3 An MD5 digest of the password is sent from the client to the server.
4 A web application using this method of authentication is not guaranteed to work on all application servers.

Answer: 3,4
but according to HFSJ pag 645, DIGEST authentication transmits the login information in a more secure way,but because the encryption mechanism isn't widely used , J2EE containers aren't required to support it.
Please clarify whether DIGEST authentication supports encryption or not.

Thanks ,
Jyothi
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I think 'tag' is not mandatary element in the tld file. jsp-version is used in old tld files. As per the JSP 2.0 there is no jsp-version element, but there is mandatary attribute to taglib entry named 'version'.

The DIGEST is not exactly encryption/decryption, but it is one-way encryption/hashing. It is also known as Checksum algorithm. The popular example of DIGEST is MD5.


Thanks
[ May 26, 2006: Message edited by: Narendra Dhande ]
 
Jyothi Pathuri
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank u Narendra for ur immediate reply. Tld files are mainly used for mapping between jsp and tag class. So is it that tag is mandatory in tld file. please clarify.
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Tld files are mainly used for mapping between jsp and tag class. So is it that tag is mandatory in tld file. please clarify.


In addition to tag element, there are other elements in the tld files. You can define mapping of tag files ( not required, if not in jar files) or EL functions. So the tag element is not mandatary in TLDs.


Thanks
 
Vivek Kinra
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Narendra and Jyothi,

I read in book by "Hanumant Deshmukh" it says

subelements´┐Ż<tlib-version>, <jspversion>,
and <short-name>´┐Żare mandatory and appear exactly once. There must be at least one <tag> subelement


So I think tag is also a mandatory sub element of taglib

Thanks...
 
Ed Ward
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Regarding the first question, I looked at the JSP2.0 spec and the XML schema for TLD, JSP 2.0 shows that the only required element in a TLD file is <tag-lib> which is the document root.
The only required elements within <tag-lib> are <tlib-version> and <short-name>.
Ofcourse, it probably doesn't make sense to define the TLD file in the first place if you're not going to put in a <uri>, <tag>, <function> or something else.

Am I reading this wrong?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic