0
嘗試使用編譯的JSP從我的Web應用程序預編譯JSP,但我不知道如何確定合適的類名我web.xml
,我把_db.class
文件中WEB-INF/classes/_db.class
呼叫在WebSphere
每當我打電話我與/上下文根/ DBX應用程序我得到:
Error 404: javax.servlet.UnavailableException: SRVE0200E: Servlet [com/ibm/_jsp/_db]:
Could not find required class - class java.lang.ClassNotFoundException: com/ibm/_jsp/_db
我的web.xml中包含了基本的servlet映射
<servlet>
<servlet-name>dbx</servlet-name>
<servlet-class>com/ibm/_jsp/_db</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>dbx</servlet-name>
<url-pattern>/dbx/*</url-pattern>
</servlet-mapping>
如果我改變<servlet-class>
被_db,我得到:
錯誤500:java.lang.NoClassDefFoundError:_db(錯誤的名稱:COM/IBM/_jsp/_db)
運行的/ opt/IBM /的WebSphere /應用服務器/ JAVA /斌/ javap的_db給
Compiled from "_db.java"
public final class com.ibm._jsp._db extends com.ibm.ws.jsp.runtime.HttpJspBase implements com.ibm.ws.jsp.runtime.JspClassInformation{
static {};
public com.ibm._jsp._db();
public java.lang.String[] getDependants();
public java.lang.String getVersionInformation();
public boolean isDebugClassFile();
public void _jspInit();
public void _jspService(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
throws java.io.IOException, javax.servlet.ServletException;
}
如果我嘗試使用com.ibm._jsp._db服務器級獲得:
Error 404: javax.servlet.UnavailableException: SRVE0200E: Servlet [com.ibm._jsp._db]:
Could not find required class - class java.lang.ClassNotFoundException: com.ibm._jsp._db
我的實際jsp非常簡單,並且不包含類定義。
完美工作,謝謝! – 2013-03-09 23:21:29