facebook

Cannot find the declaration of element taglib …

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #225413 Reply

    Hi

    I’m getting the above error on a tld file but am unsure what library I have missing. Can anyone advise.

    Thanks
    David

    #225439 Reply

    Riyad Kalla
    Member

    Can you please post all the information we request in the [URL=http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-393.html]Posting Guidelines[/URL] thread at the top of this forum? That will give us some context so that we can determine if this is an installation issue, a configuration problem, or a bug. Thanks.

    Also what does your @taglib entry look like, what do your web.xml <taglib> entries look like? Where is this TLD located in your project? What kind of project is it?

    You need to give us SOME information so we can help 😉

    #225514 Reply

    Apologies.
    I have been running through the Bank tutorial (which apparently is a common J2EE tutorial) using Jboss as the web server. I have managed to get this working fine outside of Eclipse.
    I’ve loaded the BankWeb project into Eclipse but have found that there is a compilation error on the inital taglib declaration in the tutorial-template.tld. The error is ‘Cannot find the declaration of element taglib’ so I assumed that I must have a library reference missing?

    The tlb file is as follows:

    <taglib xmlns=”http://java.sun.com/xml/ns/j2ee&#8221;
    xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221;
    xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd”
    version=”2.0″>
    <description>A tag library exercising SimpleTag handlers.</description>
    <tlib-version>1.0</tlib-version>
    <short-name>SimpleTagLibrary</short-name>
    <uri>/SimpleTagLibrary</uri>
    <tag>
    <name>definition</name>
    <tag-class>com.sun.ebank.web.template.DefinitionTag</tag-class>
    <body-content>scriptless</body-content>
    <attribute>
    <name>name</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>screen</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <name>screen</name>
    <tag-class>com.sun.ebank.web.template.ScreenTag</tag-class>
    <body-content>scriptless</body-content>
    <attribute>
    <name>screenId</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <name>parameter</name>
    <tag-class>com.sun.ebank.web.template.ParameterTag</tag-class>
    <body-content>scriptless</body-content>
    <attribute>
    <name>name</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>value</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>direct</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>
    <tag>
    <name>insert</name>
    <tag-class>com.sun.ebank.web.template.InsertTag</tag-class>
    <body-content>scriptless</body-content>
    <attribute>
    <name>definition</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
    <name>parameter</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>
    </taglib>

    The web.xml is

    <?xml version=”1.0″ encoding=”UTF-8″?>

    <web-app xmlns=”http://java.sun.com/xml/ns/j2ee&#8221; version=”2.4″
    xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221;
    xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”&gt;
    <display-name>JBoss DukesBankWAR</display-name>
    <context-param>
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
    <param-value>WebMessages</param-value>
    </context-param>
    <servlet>
    <display-name>Dispatcher</display-name>
    <servlet-name>Dispatcher</servlet-name>
    <servlet-class>com.sun.ebank.web.Dispatcher</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Dispatcher</servlet-name>
    <url-pattern>/accountHist</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>Dispatcher</servlet-name>
    <url-pattern>/accountList</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>Dispatcher</servlet-name>
    <url-pattern>/atm</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>Dispatcher</servlet-name>
    <url-pattern>/atmAck</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>Dispatcher</servlet-name>
    <url-pattern>/main</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>Dispatcher</servlet-name>
    <url-pattern>/transferAck</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>Dispatcher</servlet-name>
    <url-pattern>/transferFunds</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>Dispatcher</servlet-name>
    <url-pattern>/logoff</url-pattern>
    </servlet-mapping>
    <jsp-config>
    <jsp-property-group>
    <display-name>bank</display-name>
    <url-pattern>*.jsp</url-pattern>
    <el-ignored>false</el-ignored>
    <scripting-invalid>false</scripting-invalid>
    <is-xml>false</is-xml>
    <include-prelude>/template/prelude.jspf</include-prelude>
    </jsp-property-group>
    </jsp-config>

    <security-constraint>
    <display-name>SecurityConstraint</display-name>
    <web-resource-collection>
    <web-resource-name>WRCollection</web-resource-name>
    <url-pattern>/transferAck</url-pattern>
    <url-pattern>/main</url-pattern>
    <url-pattern>/atmAck</url-pattern>
    <url-pattern>/accountList</url-pattern>
    <url-pattern>/accountHist</url-pattern>
    <url-pattern>/transferFunds</url-pattern>
    <url-pattern>/atm</url-pattern>
    <http-method>POST</http-method>
    <http-method>GET</http-method>
    </web-resource-collection>
    <auth-constraint>
    <role-name>bankCustomer</role-name>
    </auth-constraint>
    <user-data-constraint>
    <transport-guarantee>NONE</transport-guarantee>
    </user-data-constraint>
    </security-constraint>

    <login-config>
    <auth-method>FORM</auth-method>
    <realm-name>file</realm-name>
    <form-login-config>
    <form-login-page>/logon.jsp</form-login-page>
    <form-error-page>/logonError.jsp</form-error-page>
    </form-login-config>
    </login-config>
    <security-role>
    <role-name>bankCustomer</role-name>
    </security-role>
    <ejb-ref>
    <ejb-ref-name>ejb/accountController</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.sun.ebank.ejb.account.AccountControllerHome</home>
    <remote>com.sun.ebank.ejb.account.AccountController</remote>
    </ejb-ref>
    <ejb-ref>
    <ejb-ref-name>ejb/customerController</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.sun.ebank.ejb.customer.CustomerControllerHome</home>
    <remote>com.sun.ebank.ejb.customer.CustomerController</remote>
    </ejb-ref>
    <ejb-ref>
    <ejb-ref-name>ejb/txController</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.sun.ebank.ejb.tx.TxControllerHome</home>
    <remote>com.sun.ebank.ejb.tx.TxController</remote>
    </ejb-ref>
    </web-app>

    Any assistance on this would be great.
    Thanks
    David

    #225525 Reply

    Riyad Kalla
    Member

    David,
    You have no <Taglib> entries in your web.xml file defining your TLD, why?

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Cannot find the declaration of element taglib …

You must be logged in to post in the forum log in