After creating RestFul Web service
(let's say helloworld
) using Intellij Idea
, When I run the server, it runs correctly(it says Server is running
). But when I try to access it using my web browser, it says "the web page you are requested is not available".
What is wrong with my web service.? I just created a basic project.
output -
com.sun.jersey.api.core.ScanningResourceConfig logClasses INFO: Root resource classes found: class example.HelloWorld Dec 26, 2013 3:16:09 PM com.sun.jersey.api.core.ScanningResourceConfig init INFO: No provider classes found. Dec 26, 2013 3:16:09 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate INFO: Initiating Jersey application, version 'Jersey: 1.3 06/17/2010 05:04 PM' Server running Visit: http ://localhost:9998/helloworld Hit return to stop...
In your helloworld class,there may be a line like following
HttpServer server = HttpServerFactory.create("http://localhost:9998/");
change the port number to 8080 and try to run again