#1 Restful Web Services Tutorial | Creating a Jersey Project in Eclipse
Вставка
- Опубліковано 5 лют 2025
- Support Us Through Donations : goo.gl/5PB5RN
RESTful Web Services are basically REST Architecture based Web Services.
A REST API defines a set of functions to process requests and responses via HTTP protocol.
Rest is just a concept to implement that we need an implementation.
To create an appliaction for REST you can use Maven Project with Jersey implementation.
In this video we will see Jersey implentation of REST.
We will also discuss :
Different Tools used for REST
IDE Options : Eclipse, IntelliJ, Netbeans
We also need a Server for REST. For that we will need Java EE developer version in our IDE
We will see :
How to add Server to IDE
Create Maven project
Jersey implementation in Maven Project
Maven Playlist : goo.gl/sSFpv8
Check out our courses:
Java Full Stack and Spring AI - go.telusko.com...
Coupon: TELUSKO10 (10% Discount)
DevOps with AWS: From Basics to Mastery : go.telusko.com...
Coupon: TELUSKO10 (10% Discount)
Master Java Spring Development : go.telusko.com...
Coupon: TELUSKO20 (20% Discount)
Udemy Courses:
Spring: go.telusko.com...
Java:- go.telusko.com...
Java Spring:- go.telusko.com...
Java For Programmers:- go.telusko.com...
Python : go.telusko.com...
Git : go.telusko.com...
Docker : go.telusko.com...
For More Queries WhatsApp or Call on : +919008963671
website : courses.telusk...
Follow Navin Reddy on Instagram: / navinreddy20
Subscribe to our other channel:
Navin Reddy : / @navinreddy
Telusko Hindi :
/ @teluskohindi
Subscribe to the channel and learn Programming in easy way.
Java Tutorial : goo.gl/p10QfB
Kotlin Tutorial : goo.gl/JedEzX
Scala Tutorials for Java Developers : goo.gl/8H1aE5
C Tutorial Playlist : goo.gl/8v92pu
Android Tutorial : goo.gl/MzlIUJ
XML Tutorial : goo.gl/Eo79do
Design Patterns in Java : goo.gl/Kd2MWE
Socket Programming in Java : goo.gl/jlMEbg
Spring MVC Tutorial : goo.gl/9ubbG2
OpenShift Tutorial for Beginners : goo.gl/s58BQH
Spring Framework with Maven : goo.gl/MaEluO
Sql Tutorial for Beginners : goo.gl/x3PrTg
String Handling in Java : goo.gl/zUdPwa
Array in Java : goo.gl/uXTaUy
Java Servlet : goo.gl/R5nHp8
Exception Handling in Java : goo.gl/N4NbAW
I am so happy that you start getting Ads in UA-cam
Your hard is paying off 😀👍
Yes he deserved it. Best guy
Hi beginners,
Do not try to do this with Intellij Idea (Community Edition), because it does not support it.
However Intellij Idea (Ultimate Edition) supports it.
Pro trick: you can watch movies at KaldroStream. Been using them for watching lots of of movies lately.
@Lennox Baylor Definitely, been using kaldrostream for months myself =)
i have seen many Software Engineers, But you are Awesome...
If you have error like "out of memory error" you have to do:
1.Go to your Eclipse setup folder
2. Open eclipse.ini file
3. Change below parameters
-Xms512m
-Xmx3000m
4. Add below parameters
-XX:PermSize=256m
-XX:MaxPermSize=512m
Awesome Job Naveen.
Thank you for the wonderful explanation ! It was the most clear way to teach somebody and really effective !!!
wonderful explanation!! Looking forward for more videos like this on different latest technologies, that covers both theory and hands on in such a detailed way. Can we expect a session on SCIM api from you?
Thank you so much for this tutorial...
Hi Sir,
I am new to REST API and learning it myself. After watching your video I tried to implement the same on my machine. But getting below error, could you please let me know where I am wrong and how to resolve this error.
21/06/18, 9:07:08 AM IST: [WARN] The POM for com.sun.jersey:jersey-servlet:jar:1.20-SNAPSHOT is missing, no dependency information available
21/06/18, 9:07:08 AM IST: [WARN] The POM for com.sun.jersey:jersey-json:jar:1.20-SNAPSHOT is missing, no dependency information available
21/06/18, 9:07:08 AM IST: [WARN] The POM for com.sun.jersey:jersey-client:jar:1.20-SNAPSHOT is missing, no dependency information available
21/06/18, 9:07:08 AM IST: [INFO] Imported and configured 1 project(s) in 2 sec
21/06/18, 9:07:08 AM IST: [WARN] The POM for com.sun.jersey:jersey-servlet:jar:1.20-SNAPSHOT is missing, no dependency information available
21/06/18, 9:07:08 AM IST: [WARN] The POM for com.sun.jersey:jersey-json:jar:1.20-SNAPSHOT is missing, no dependency information available
21/06/18, 9:07:08 AM IST: [WARN] The POM for com.sun.jersey:jersey-client:jar:1.20-SNAPSHOT is missing, no dependency information available
have you solved the problem?
if yes pls tell me how
Most probably this might be due to the jersey version you have configured is not available. Update the property for Jersey version in the pom.xml as below or your desired version:
1.19.1
Awesome start music really increases attention to the content
wonderful explanation navin sir,keep post
jersey is still not coming after changing the preference. Downloaded the jersey as well
Really nice videos.short and useful information.
Nice tutorial
sir, can u arrange the following topics in order to learn first to last.... jsp, hibernate, rest api, spring, maven...
have to explain little bit in detail for beginners, about how to get jersey jars in maven.thanks
keep rocking sir!!
sir i got error while creating a maven project in that restapi1 lecture ..error occur in srcfile index.jsp sir.
sir can you send me pdf of this lecture so that i will revised and do practical later on my self
Can we use gradle instead if maven?
sir in my case, it is showing an error in pom.xml for jersey version cannot be downloaded what to do sir?
Not able to fine the jersey Project. Followed the same process as described in this.
Please provide the below details:
Archetype Group ID
Archetype Artifact ID
Archetype Version
Repository URL
If I select those 4 checkbox then updating indices never stops.
What I actually do to add jersey archetype is by doing this:-
Go to Preferences -> Maven -> Archetypes ->Add Remote Catalog and add these parameters:
Catalog File: repo1.maven.org/maven2/archetype-catalog.xml
Description: maven catalog
@Telusko
Could you please help me ? Why is there are no jersey in archetype in intellij ?
Make sure you choose jersey-quickstart-webapp with org.glassfish.jersey.archetypes Group Id and not with com.sun.jersey.archtypes Group Id. I was inattentive and got some errors.
Hi Navin, I am trying to create a jersey project for REST.I followed the same steps as mentioned in the vedio.
1. Downloaded eclipse neon JAVA-EE version
2. Checked the 4 boxes in preferences-->Maven
Still i am not able to see jersey archetypes while creating maven project. Is there anything missing or any mistake i am doing?
Go to Windows -> Preferences -> Maven.
Click on "Archetypes".
Add Remote Catalog.
Give URL : repo1.maven.org/maven2/archetype-catalog.xml
Description : *something*
Click 'OK".
Now Eclipse will retrieve the jersey archetypes.Wait for it.
Now you should be able to create a project of 'jersey' archetype.
After creating project if you get any errors in pom.xml change the jersey version to an older one.
the same issue I was facing and I tried to do add remote catalog as per ur steps. But in eclipse right bottom page it shows retrieving archtypes and finally says Out of memory error has occurred. Please suggest.
Thansk Saravana i was trying from long days ago and it's working now:)
how to add new jersey version in eclipse
still i didn't get jersey....how to solve
sir help..!!
i m unable to find jersey web architect under maven project setup,i checked all the 4 items as u said still esclipse (oxygen) unable to list jersey..wht to do now?
same here bro
Yeah,i got same problem.
How to get Jersey in eclipse ,pls help me
Hello Navin Reddy.
Thanks a lot for making such helpful video. But can't find jersey-quickstart-webapp Artifact Id from the list of "New Maven project" window.
I tried using "Add Archetype..." button.
Wrote "org.glassfish.jersey.archetypes" to the "Group Id:" field.
"jersey-quickstart-webapp" to the "Artifact Id:" field,
"2.26-b06" to the "Archetype Version:" field.
But then Eclipse is saying: "Can't resolve Archetype org.glassfish.jersey.archetypes:jersey-quickstart-webapp:2.26-b06
org.eclipse.core.runtime.CoreException: Could not resolve artifact ". Could you please help me to fix this problem?
Thanks in advance.
You can try by adding an archetype using the button "Add Archetype" in Create Maven project popup. Mention the following:
Group id: org.glassfish.jersey.archetypes
Artifact id: jersey-quickstart-webapp
Version: 2.19
This worked for me.
Sir, please can you show us step by step how to install eclipse, that is what jdk, etc, cause for some reason Im not able to make it work
Why updating index is taking such a long time during Repositories download on Eclipse and Maven
i marked options you said in preferences, but found no item on filtering "jersey".
i could not able to load the jersey artifact even after ticking the four check boxes
nothing is populated when I tick those 4 check marks and search jersey
hello warm greetings!I have a question navin :) . Will this code work the same for android studio? I mean are there few changes i have to consider? in both jersey and spring? Hope you will answer as soon as possible. :)
sir i have a error could not calculate build plan:plugin
Hello Navin,
Whenever we try making maven project, the jar versions that are downloaded by maven may not work. For example, I am using eclipse Oxygen which is the download they had. And I started a maven project, but I had to add a remote catalog to see the jersey quickstart archetype, whereas you did not have to, maybe cause its a different version of eclipse. Then when I tried to run the rest api project as is, tomcat would not start and the error I got on the pom.xml file was "missing-artifact-com-sun-jerseyjersey-servlet-jar". I did a google search and found out on stackoverflow that I had to replace the jersey version of 1-20.SNAPSHOT with 1.19.1. How would we know what version to use, I mean without having to google it, how did the people at stackoverflow know?
same problem with me
have you solve it?
Abdulwahid Mohammed I just followed the cells from Google and stack Overflow to find out what I needed to add to make it work. Beyond that I don't know what else to do but I think this is working
shashgo thank you so much sir.
I will try to do that.
Hello sir i have a basic question, i am an alien to this technology and i just want to know that what kind of server/application i should buy to run restapi at public domain, i have my domain and web hosting( linux based), And now i m confused that all .war file are deployed in webapps folder in the tomcat server, where should i deploy my .war file in public html..?? i bought the domaiin from godaddy.
Hello Sir! This video was not included in your Rest playlist
Sir your tutorial is outdated now. As Tomcat 8.0 is now depreciated now only 7, 8.5 and 9 are available. where your current tutorial does not work. Please help us
Plz help..getting this..."Setup Maven plugin connectors" popup..
in that 2 errors..
1.maven-compiler -plugin: 2.5.1:compile
2.maven -compiler -plugin :2.5.1:testCompile
Actions:
1.Install Groovy-Eclipse m2e configurator
2.Install Maven Integration for Eclipse JDT Annotation Processor Toolkit. m2e-apt must be enabled in Window > Preferences > Maven > Annotation Processing.
3.Install M2E connector for the Eclipse JDT Compiler
4.Resolve Later
5.Do Not Execute (add to pom)
6.Do Not Execute (add to parent)
7.Do Not Execute (add to workspace)
which one i have to choose??
Can anyone pls explain difference between the Jersey and Resteasy implementation of RestAPI
I didn't get jercy?
in filter jersey archetype is not coming even i clicking the four download archetype in maven.whats the problem.....
You can try by adding an archetype using the button "Add Archetype" in Create Maven project popup. Mention the following:
Group id: org.glassfish.jersey.archetypes
Artifact id: jersey-quickstart-webapp
Version: 2.19
This worked for me.
Hey Navin,
I made a small app with jersey following your tutorials but i am trying to find something to program that will look impresive in an interview.
any ideas? i programmed and login/signup for now (including web of course and the server is written in java).
thank you!
Can we make Jersey project in STS??
thanks for your sharing, but I'm foreigner. Can u open the subtitles function. I'm very interested in your videos.
while importing in pom.xml am getting an error - Missing artifact com.sun.jersey:jersey-servlet:jar:1.20-SNAPSHOT.
Am not getting ,did i miss any jar files??
Eclipse Oxyzen: Error-"Could not create Java virtual machine, A fatal exception occurred" please help, its not running, my Java JDK n jre path are all correct but still not running?
I solved this problem by downloading java JDk 8 and adding it to the server path, but keep java 10.0 in the eclipse path to keep running current eclipse projects.
I have followed your video but still I couldn't find jursey library...so what shoul I do now
You can do it manually
1)In the maven project option click "Add archetypes"
2)And from the video copy the Group-id, Artifact-id, and version
3)Enter in the necessary fields and click Ok
Group I'd we can give anything??
got error how can i solve
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
delete all files under this location
C:\Users\"you username"\.m2
epository.
then after create new project, it take too much time to time redownload all this deleted file but got get 0 error!!
Life Infinity not working though. Please help me
Jersey not loading in my machine
If you did not find jersey.heroku-webapp:
Open Wİndow > Preferences
Open Mevan > Archetypes > Add Remote Catalog
Catalog File: repo1.maven.org/maven2/archetype-catalog.xml
Description: maven catalog
Restart eclipse
Create new Mevan Project
Choose maven catalog
Pick up jersey.heroku-webapp
It is work.
Nice
please sir ... write maven dependencies here .
Hi Navin, can't we do with ANT?
aliens???
Hey sir I'm using bluej...how to add tomcat and other things
hi sir can you pls tell me the microservices
do you learn from chad darby?
Hi Sir,
I am trying to create a jersey project for REST. But I am getting below error, could you please help me?
JAX-RS (REST Web Services) 2.1 can not be installed : One or more constraints have not been satisfied.
JAX-RS (REST Web Services) 2.1 requires Java 1.8 or newer.
xxxx
I am sorry to say but your accent is unbearable - I can not understand what you are saying
This course is fake!
seems like your account is fake.
i have some doughts while opening jersey web apps not create folder to me
sir i am getting this error:message Servlet.init() for servlet Jersey Web Application threw exception