You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by kumar rohit <ku...@gmail.com> on 2015/09/07 20:31:58 UTC

Error "resource not available"

Hello I have created Protege ontology and imported in Jena. I want to put
logic in Rest Webservices. I have one file Hello.java below:
________________________________________________
package webserv;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
@Path("/hello")
public class Hello {
 // This method is called if HTML and XML is not requested
 @GET
 @Produces(MediaType.TEXT_PLAIN)
 public String sayPlainTextHello() {
   return "Hello Jersey Plain";
 }

}
_____________________________________________________-

Another class index.html which only contains
<a href="rest/hello">Click Here</a>
______________________________________________________

And of course web.xml where I have add <servlet> </servlet> code too. I
also copied all the jars inside lib folder but it gives me error

"Requested Resource is not available".

What can be the possible error?

Re: Error "resource not available"

Posted by kumar rohit <ku...@gmail.com>.
thanks

On Mon, Sep 7, 2015 at 7:38 PM, Martynas Jusevičius <ma...@graphity.org>
wrote:

> These are the wrong mailing lists for your question.
>
> You should as on the list of the JAX-RS framework you use, or
> StackOverflow.
>
> Here are the mailing list info for Jersey:
> https://jersey.java.net/mailing.html
>
> On Mon, Sep 7, 2015 at 8:31 PM, kumar rohit <ku...@gmail.com> wrote:
> > Hello I have created Protege ontology and imported in Jena. I want to put
> > logic in Rest Webservices. I have one file Hello.java below:
> > ________________________________________________
> > package webserv;
> >
> > import javax.ws.rs.GET;
> > import javax.ws.rs.Path;
> > import javax.ws.rs.Produces;
> > import javax.ws.rs.core.MediaType;
> > @Path("/hello")
> > public class Hello {
> >  // This method is called if HTML and XML is not requested
> >  @GET
> >  @Produces(MediaType.TEXT_PLAIN)
> >  public String sayPlainTextHello() {
> >    return "Hello Jersey Plain";
> >  }
> >
> > }
> > _____________________________________________________-
> >
> > Another class index.html which only contains
> > <a href="rest/hello">Click Here</a>
> > ______________________________________________________
> >
> > And of course web.xml where I have add <servlet> </servlet> code too. I
> > also copied all the jars inside lib folder but it gives me error
> >
> > "Requested Resource is not available".
> >
> > What can be the possible error?
>

Re: Error "resource not available"

Posted by Martynas Jusevičius <ma...@graphity.org>.
These are the wrong mailing lists for your question.

You should as on the list of the JAX-RS framework you use, or StackOverflow.

Here are the mailing list info for Jersey: https://jersey.java.net/mailing.html

On Mon, Sep 7, 2015 at 8:31 PM, kumar rohit <ku...@gmail.com> wrote:
> Hello I have created Protege ontology and imported in Jena. I want to put
> logic in Rest Webservices. I have one file Hello.java below:
> ________________________________________________
> package webserv;
>
> import javax.ws.rs.GET;
> import javax.ws.rs.Path;
> import javax.ws.rs.Produces;
> import javax.ws.rs.core.MediaType;
> @Path("/hello")
> public class Hello {
>  // This method is called if HTML and XML is not requested
>  @GET
>  @Produces(MediaType.TEXT_PLAIN)
>  public String sayPlainTextHello() {
>    return "Hello Jersey Plain";
>  }
>
> }
> _____________________________________________________-
>
> Another class index.html which only contains
> <a href="rest/hello">Click Here</a>
> ______________________________________________________
>
> And of course web.xml where I have add <servlet> </servlet> code too. I
> also copied all the jars inside lib folder but it gives me error
>
> "Requested Resource is not available".
>
> What can be the possible error?