This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TLD file

 
Pawan Arora
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I've created a code just like on page 393 of Head first, but while accessing a page from JSP by using an expression: ${mine:rollIt()}, it's displaying as it is as a string literal in the output in JSP, instead of calling the real function which is stored in the function-signature tag in TLD file. Why is that so?

Here's the TLD file which is just like on Head first book page no. 393:


and here's the JSP code:






 
Chinmaya Chowdary
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Pawan. There is a typo. Your prefix="mine1" in taglib directory. Use
 
Pawan Arora
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a typo. Your prefix="mine1" in taglib directory


The following too is still displaying an EL expression as an string literal as an output in JSP:




produces:

${mine:rollIt()}
 
Chinmaya Chowdary
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your web.xml is there any entry to disable EL, ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure that your web.xml is declared correctly. See this FAQ.
 
Miroslaw Malicki
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to put missing tag in the TLD
<short-name> somename </short-name>
just after <tlib-version>

It may help.

 
Pawan Arora
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chinmaya Chowdary wrote:In your web.xml is there any entry to disable EL, ?


I've not declared any el-ignored tag in DD.

The request is going straight to JSP. Although, I checked with request going first to servlet then to JSP, but still getting that string literal as an output.



 
Chinmaya Chowdary
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which jsp version are you using?
 
Pawan Arora
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
2.0
 
Aarti Malhotra
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you placed the TLD in the correct location?
 
Narendhiran Nagarajan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the class
foo.DiceRoller
 
Shailesh Narkhede
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please put web.xml.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic