嗨,我创建了简单的 RESTful Web 服务并使用 JSON 进行响应和存储信息。当我在 tomcat 7.0 中运行该服务时,我在浏览器中遇到 404 错误
PLS 帮我修复错误
服务等级
package com.login.service;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;
//Path Reference to access this interface
@Path("/Sample")
public class OrdersService {
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp
11Processor.java:1009)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoin
t.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Returning the Response