jsp - How to fix "Can not find the tag library descriptor" in eclipse 4.3 for my custom EL function -
setup:
eclipse 4.3 tomcat7 (running on localhost port 8080) configured test server.
my el class (folder structure: http://i.imgur.com/ogosczm.jpg) created using new => java project in eclipse
package org.flinders.mycustomutilities; //import java.lang.stringbuilder; public class mycustomutilities { public static string hello(string name) { return "heya " + name; } }
the class exported jar file , imported maven repository. it imported spring mvc project using entry in pom.xml:
<dependency> <groupid>org.flinders.mycustomutilities</groupid> <artifactid>mycustomutilities</artifactid> <version>0.0.1</version> </dependency>
i'm not getting errors in eclipse's maven pom editor.
my tld file (stored in d:\work\eclipse\java.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\root\web-inf seems working folder tomcat)
<?xml version="1.0" encoding="utf-8" ?> <taglib xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd" version="2.1"> <tlib-version>1.0</tlib-version> <short-name>mytaglib</short-name> <uri>org.flinders.mycustomutilities</uri> <function> <name>hello</name> <function-class>org.flinders.mycustomutilities.mycustomutilities</function-class> <function-signature>java.util.string hello(java.util.string)</function-signature> </function> </taglib>
not sure put in uri tag setup.
this how i'm importing custom el function in jsp file
<%@ taglib uri="web-inf/mytaglib.tld" prefix="mine" %>
i've tried
<%@ taglib uri="/web-inf/mytaglib.tld" prefix="mine" %>
but eclipse can't see it. have started tomcat via eclipse in case required without positive outcome. still getting error mentioned above.
any ideas? i've been searching examples on net don't give complete/working examples.
thanks!
my problem placing tld file in wrong place. importing class/jar spring web mvc project. putting tld file in "root" web-inf. should've placed in web-inf web project. working looked @ it.
Comments
Post a Comment