I do not see how you are deploying the service.
try changing (camel case unusual for service)
String uri = "http://localhost:8080/Proctorest/resources/helloWorld";
lower case "helloworld"
String uri = "http://localhost:8080/Proctorest/resources/helloWorld";
or try
String uri = "http://localhost:8080/helloworld";
HOW TO GET THE ROUTE
U: ... \ HelloWorld1 \ HelloWorld1 \ Web \ WEB-INF \ BC-web.xml
<sun-web-app error-url="">
<context-root>/HW</context-root>
<class-loader delegate="true"/>
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class' java code.</description>
</property>
</jsp-config>
</sun-web-app>
a) // localhost: 8080 / HW from<context-root>/HW</context-root>
U: ... \ HelloWorld1 \ HelloWorld1 \ Web \ WEB-INF \ web.xml
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<servlet>
<servlet-name>ServletAdaptor</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>ServletAdaptor</servlet-name>
<url-pattern>/hw/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
b) // localhost: 8080 / HW / hw from<url-pattern>/hw/*</url-pattern>
U: .... \ HelloWorld1 \ HelloWorld1 \ SRC \ Java \ HelloWorld \ HelloWorldResource.java
.....
@Stateless
@Path("/helloworld")
public class HelloWorldResource {
....
c)//localhost: 8080/HW/hw/ helloworld @Path("/helloworld")
a) b) c) 3 .
: URL- URL- , /HW
...
Incrementally deploying HelloWorld1
Completed incremental distribution of HelloWorld1
run-deploy:
Browsing: http://localhost:8080/HW/resources/helloWorld
...
....
public static void demo() throws IOException {
String uri = "http://localhost:8080/HW/hw/helloworld";
HttpClient httpclient = new DefaultHttpClient();
HttpGet httpget = new HttpGet(uri);
HttpResponse response = httpclient.execute(httpget);
System.out.println(response.getStatusLine().toString());
HttpEntity entity = response.getEntity();
System.out.println();
System.out.println(EntityUtils.toString(entity));
}
....
debug:
HTTP/1.1 200 OK
<html><body><h1>Hello World!</h1></body></html>