File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes EL syntax error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "EL syntax error" Watch "EL syntax error" New topic
Author

EL syntax error

anarkali perera
Ranch Hand

Joined: Sep 10, 2009
Posts: 237
this is my tag file .i put it WEB-INF/tag directory


this is the java class which is in foo package


this is jsp file

there are two errors in this file.
1) cannot find the tag library descripter for DiceFunctions ("uri="DiceFunctions"")
2)EL syntax error ("${mine:rollIt()}")
wher is the error?


Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61218
    
  66

anarkali perera wrote:this is my tag file .i put it WEB-INF/tag directory

That's not a tag file -- it's a TLD, and it should be in WEB-INF. Why is it not indented?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
avi sinha
Ranch Hand

Joined: Mar 15, 2009
Posts: 452

i think everything here is correct .can you please provide us some more informations.

avi sinha




SCJP 5.0 SCWCD 5.0
anarkali perera
Ranch Hand

Joined: Sep 10, 2009
Posts: 237
anyway should i insert something to web.xml?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61218
    
  66

anarkali perera wrote:anyway should i insert something to web.xml?

No.
Chinmaya Chowdary
Ranch Hand

Joined: Apr 21, 2008
Posts: 432
Hi, Anarkali.

In tld file there is a space between '<' and 'taglib'. I think this causes the problem. Remove that and redeploy.
anarkali perera
Ranch Hand

Joined: Sep 10, 2009
Posts: 237
no.I change it .still problem is there
Chinmaya Chowdary
Ranch Hand

Joined: Apr 21, 2008
Posts: 432
Hi, Anarkali.
Can you please post, exact error message?
Simon Huggins
Greenhorn

Joined: Dec 23, 2009
Posts: 1
As this a taglib rather than a tag, you'll need to specify it in web.xml - something like:-



... just substitute in the filename your stored your taglib under for 'tagfile.tld'

or alternatively, put the tld into WEB-INF/lib directory as a JAR.

Remember that the URI is just an identifier, not a physical location, so you need to provide the mapping between the URI and physical location in some way, otherwise the compiler won't know what to do!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61218
    
  66

Simon Huggins wrote:As this a taglib rather than a tag, you'll need to specify it in web.xml ...

No, you don't. Modern containers will automatically find the TLD files under WEB-INF without the need for declarations in the deployment descriptor.

Remember that the URI is just an identifier, not a physical location, so you need to provide the mapping between the URI and physical location in some way, otherwise the compiler won't know what to do!

The container will automatically create the mapping from the information in the <uri> element of the TLD.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: EL syntax error