سؤال

لدي علامة مخصصة ، تم تعبئتها في جرة مكتبة يتم تضمينها في ملف Web Apps War.

أحصل على الخطأ التالية:

An error occurred at line: 66 in the jsp file: /WEB-INF/jsp/portlet/portfolio/operations/operationsInfo.jsp
org.apache.jsp.tag.meta.form.WidgetFactory_tag cannot be resolved to a type
63:       <c:forEach var="fldCfg" items="${config.page.fields}" >
64:          <tr>
65:             <td><form:Label fld="${fldCfg}"/></td>
66:             <td><form:WidgetFactory fld="${fldCfg}" decodesMap="${decodesMap}" command="${operationsInfoBean}" dateFormat="${preferredDateFormat}"/></td>
67:          </tr>
68:       </c:forEach>
69:   </table>

ولكن لا يبدو أنه يشكو من التسمية التي هي في نفس taglib. لقد أكدت أن الجرة في الحرب وأن ملف العلامة موجود في الجرة وأن TLD (في meta-inf) يحدد صراحة "عنصر واجهة المستخدم"

لماذا أحصل على هذا الخطأ؟

TLD Snippit:

<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>Form</short-name>
<uri>http://web.foo.com/tags/form</uri>
<description>Tags that encapsulate the Aladdin form elements, both basic and widgets</description>

<tag-file>
    <description>Factory to select the correct widget type</description>
    <name>WidgetFactory</name>
    <path>/META-INF/tags/form/WidgetFactory.tag</path>
</tag-file>

...

هل كانت مفيدة؟

المحلول

تبين أنني قد حذفت استيراد مكتبة علامة أخرى تستخدمها العلامة الخاصة بي ، لذلك لن يتم تجميعها.

نصائح أخرى

تأكد من أن اسم الفصل الذي حصلت عليه في ملف .tld الخاص بك صحيح. من المحتمل أن يكون هناك خطأ مطبعي في اسم الحزمة في مكان ما ، أو ربما يكون للفصل سيئًا package رأس.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top