簡體   English   中英

GlassFish Server HTTP 狀態 404 - 未找到

[英]GlassFish Server HTTP Status 404 - Not Found

產品版本 = NetBeans IDE 8.1 GlassFish Server 開源版 4.1 我有一個使用 Netbeans 7.0.1 創建的非常簡單的 Web 應用程序,它僅包含一個 RESTful Web 服務。 這是我的jsp文件

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
 <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>TEST !</h1>
    </body>
</html>

當我將項目部署到本地安裝的 Glassfish 並在瀏覽器中的 get http://http://localhost:8080/MyRest中運行名為 (MyRest) 的項目時,一切都按預期執行,這意味着我可以看到我的“TEST” !” 信息。

現在更改為 NetBeans,我在我的項目中打開節點“RESTful Web 服務”,右鍵單擊任何 HTTP 方法並從上下文菜單中選擇“測試資源 Uri”。 之后會出現一個警告對話框,並顯示以下消息:

Unable to open resource url:
http://localhost:8080/MyRest/webresources/service/getJsonWithParam
Make sure the project has been deployed successfully, and the server is
running.

我什至嘗試手動更改網址,然后我得到

HTTP Status 404 - Not Found
type Status report

messageNot Found

descriptionThe requested resource is not available.


GlassFish Server Open Source Edition 4.1

請問有什么幫助嗎?

好像你輸入了兩次 http://! 你也檢查過這個嗎?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM