Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

REST resource not found  RSS feed

 
Daniel Gurianov
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All.

I hit quite popular situation among REST newbies.
I have simpliest example written in eclipse and i`m getting 404 instead of String in browser.



1. I canot make it run withour Application . i saw that in internet some guys are able to do so.
2. I cannot make it run , despite i have the absolutely same code running in other project next to mine(!!!).
Maven dependancues are met. I use Tomcat and maven inside eclipse to run and deploy.

Any help is greatly welcome!
THank you.


Url i`m tying to fetch :

http://localhost:8080/Alfa/root/res
Alfa is project name. Default index.jsp works perfect from there.

Here is the resource




Here is the application that has to hook in the resource above

 
Nick Verhaert
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, try to annotate your hello method with @Path("/test") and go to path http://localhost:8080/Alfa/root/res/test
 
Daniel Gurianov
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Nick.

I found issue. My maven pom.xml was screwed up with <scope> tag on jersey-core package. I did not know that such thing can affect web service such way.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!