HTTP Status 500 - /result.jsp (line: 2, column: 47) File "/DiceFunctions" not found
my tld is (which is in WEB-INF) :
my jsp is
thanks,
Stefan Evans
Bartender
Joined: Jul 06, 2005
Posts: 1003
posted
0
This is the example from Head First Servlets and JSP 2nd edition pg-393?
Your JSP has an incorrect invocation of the function:
ie using a colon rather than a period between "mine" and "rollIt()"
Double check the tld file is in the WEB-INF directory
Double check that the uri in the tld matches the uri specified in your JSP.
restart your servlet container to see if that might fix it.
@Stefan Evans, I did the change by putting colon but it still does not work and everything is ok regarding the check you asked for (Double check the tld file is in the WEB-INF directory, ...)
@Ulf Dittmer, I do not think what you are saying is correct, the function name in tld does not necessary need to have the same name as the real method
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35232
7
posted
0
You're right, I overlooked that the <name> tag was indeed for rollIt.
A. Aka
Ranch Hand
Joined: Sep 08, 2012
Posts: 39
posted
0
I found the the problem, in jsp the uri should be "/WEB-INF/myFunction.tld"
A. Aka wrote:I found the the problem, in jsp the uri should be "/WEB-INF/myFunction.tld"
auto-discovery mechanism introduced in jsp1.2. container search for tld in WEB-INF hierarchy and lib/jar's META-INF heirarchy by default.
I am not sure why this mechanism is not working in your case.
Stefan Evans
Bartender
Joined: Jul 06, 2005
Posts: 1003
posted
0
I think there is an issue with the xmlns entries in your <taglib> tag.
You have:
The one that works for me is
The difference being is that the onte that works locates the web-jsptaglibrary_2_0.xsd via its full url, rather than just by name.
Unless you have web-jsptaglibrary_2_0.xsd available locally, this will probably muck things up a bit.
A. Aka
Ranch Hand
Joined: Sep 08, 2012
Posts: 39
posted
0
@Stefan Evans, you are right that was the issue and many thanks