我在導入位於JSP中的子包中的類時出錯。在JSP中導入類時出錯
的index.jsp的有效代碼:
<%@ page import="a.b.TestDetails" contentType="text/html"
pageEncoding="UTF-8" errorPage="Error/error-page.jsp"%>
的錯誤,我很recieving:
HTTP Status 404 - Not Found
type Status report
messageNot Found
descriptionThe requested resource is not available.
GlassFish Server Open Source Edition 4.0
當我正確地刪除import
頁面加載,但是當我用它來導入類,它給了我上面的錯誤。
只是一個猜測,是不是因爲它是一個測試類?所以沒有出現在你的戰爭的WEB-INF/classes – 2014-10-01 12:12:49
我不認爲類(不是servlet)需要寫在web.xml中? – 2014-10-01 12:14:33
顯示您的堆棧跟蹤或服務器。還有你的'jsp'代碼。 – 2014-10-01 14:29:19