产品版本=NetBeansIDE8.1 GlassFish服务器开放源码版本4.1我有一个用NetBeans7.0.1创建的非常简单的NetBeans应用程序,其中只包含一个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)的项目时,一切都会按预期执行,这意味着我可以看到我的“测试!”消息。
现在更改为HTTP服务,在我的项目中打开节点“HTTP”,右键单击任何RESTful方法,然后从上下文菜单中选择"Test Resource 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.我甚至尝试手动更改url,然后我得到
HTTP Status 404 - Not Found
type Status report
messageNot Found
descriptionThe requested resource is not available.
GlassFish Server Open Source Edition 4.1有什么需要帮忙的吗?
发布于 2019-03-26 18:48:57
您似乎已经键入http://两次了!你也检查过这个了吗?
https://stackoverflow.com/questions/34357732
复制相似问题