• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Q: HFSJ Book TLD elements

 
Prasad Kumbhare
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was trying to create custom tag for practice using SimpleTagSupport. I created TLD with elements as mentioned on page 513/514 in HFSJ. Tried to run it but got exception, saying ,



I looked into JSP Specifcations 2.0. It doesn'y mention , jsp-version as optional element. (Page:426)

I am confused here. Offcourse it is needed. But how it is not mentioned inn HFSJ? Am I missinng something.
Please help.

Thanks,
Prasad
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're looking at the wrong page. This is the DTD for JSP1.2. You should be looking at page 399, JSP.C.1XML Schema for TLD, JSP 2.0.
There's no more jsp-version tag in JSP 2.0. Can you show us how your web.xml looks ? It should be like the one described here (Servlets 2.4/JSP2.0).
 
Prasad Kumbhare
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chris,

I referred page 399 from HFSJ, but is is not showing any TLD there. I am referrig to second edition of this book for SCWCD 1.5. Page 399 is about how EL handles null values. Also the link mentioned points to sample web.xml files not TLD.

I went back to specs and now I got that I was looking at wrong page which was showing TLD elements for JSP 1.2.
But then, if Tomcat 5.5 implemets JSP 2.0, why should I get the error I menioned below. Why Tomacat it forcing me to mention JSP version ?

Thanks!
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should be looking at page 399

I meant, page 399 of the specification.


Asking again : Can you show us how your web.xml looks ?
 
Prasad Kumbhare
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chris,

Here is my web.xml

 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. No problem here. So now can you also paste your TLD file ? Maybe you're not using version 2.0.
It should look something like :
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic