5

Windows 7 64ビットでTomcat 7でEclipse Keplerを使用しています。

プロジェクトをクリーンアップしてサーバーを再起動すると、すべてうまくいきます。しかし、私が数分間作業すると... jspの編集のように... Tomcatは次のようにbarfsします...

欠落していると不平を言うタグは、ページレイアウトのタグです。いくつかの jspf インクルードを実行し、コンテンツ ページが他のタグも呼び出すこと以外に、エキサイティングなことは何もありません。しかし、再び、エキサイティングなことは何もありません...

最初はコンパイルして正常に実行されるため、これをどのように引き起こしているのかわかりません。しかし、Tomcat はタグ クラスを見失っているようです。

プロジェクトをきれいにすると、しばらくは元に戻ります...

何か案は?ありがとう

HTTP Status 500 - Unable to compile class for JSP:

type Exception report

message Unable to compile class for JSP:

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 33 in the jsp file: /folder/page.jsp
org.apache.jsp.tag.weblayout_002dmain_tag cannot be resolved to a type
30: 
31: 
32: 
33: <tags:layout-main>
34:     <jsp:attribute name="title">page</jsp:attribute>
35:     <jsp:attribute name="section">user</jsp:attribute>
36:     <jsp:attribute name="handle">page</jsp:attribute>


An error occurred at line: 33 in the jsp file: /folder/page.jsp
org.apache.jsp.tag.weblayout_002dmain_tag cannot be resolved to a type
30: 
31: 
32: 
33: <tags:layout-main>
34:     <jsp:attribute name="title">page</jsp:attribute>
35:     <jsp:attribute name="section">user</jsp:attribute>
36:     <jsp:attribute name="handle">page</jsp:attribute>


An error occurred at line: 106 in the jsp file: /folder/page.jsp
org.apache.jsp.tag.webrating_tag cannot be resolved to a type
103:            <div class="page clearfix">
104:                <div class="title">
105:                    <h3>${page.name}</h3>
106:                    <br><tags:rating value="${3}"/>                         
107:                    <br>${page.type}
108:                </div>
109:                <div class="hours">
4

1 に答える 1

0

次のいずれかを試してください。動作するはずです

  1. ディレクトリにjarをコピーしてからWEB-INF/lib/、Webコンテナを再起動します

  2. 試す

    <%@ page language="java" import="Pkgname.className.*" %>
    

例えば

    <%@ page language="java" import="org.apache.jsp.tag.webrating" %>
  1. プロジェクトを消去してサーバーを再起動する
于 2014-04-14T11:33:30.733 に答える