This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Please help me about JSP rollDice (HFSJ) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Please help me about JSP rollDice (HFSJ)" Watch "Please help me about JSP rollDice (HFSJ)" New topic

Please help me about JSP rollDice (HFSJ)

Anna Wang
Ranch Hand

Joined: May 26, 2006
Posts: 30
Hello everyone,

I try to deply the application with static functions. In HFSJ P389, there is an example about rollDice. I did all the things the book told me(copy the tld file, jsp file from the book).
Say, I named my application as " myApp " then I put
myFunction.tld file in myApp/WEB-INF/,
DiceRoller.class in myApp/WEB-INF/classes/foo/
tld.jsp file in myApp/

(I did not write web.xml and I feel very strange that if I put web.xml in the myApp/WEB-INF/ then when I try http://localhost:8080/myApp/tld.jsp, I got an error "/myApp/tld.jsp" is not available" )

If I don't have web.xml, and I called the jsp file using http://localhost:8080/myApp/tld.jsp
then it always return me an exception:

type Exception report


description The server encountered an internal error () that prevented it from fulfilling this request.


org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: XML parsing error on file /WEB-INF/myFunctions.tld: (line 14, col 3)

Can anybody explain something to me. And how to let that example work.Please help me, I am so frustrated with that example and can't read more.

Thank you very much.

Marc Peabody
pie sneak

Joined: Feb 05, 2003
Posts: 4727

Looks like your tld file has an error. Double-check that it was typed correctly.

A good workman is known by his tools.
I agree. Here's the link:
subject: Please help me about JSP rollDice (HFSJ)
It's not a secret anymore!