質問

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>

しかし、同じタグリブにあるラベルについて不平を言うことはないようです。私は、瓶が戦争中であり、タグファイルがjarにあり、TLD(メタ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