Java API | Developing Restful APIs | Rest API In Java | Java Tutorial | Java Training | Edureka

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

Комментарии • 131

  • @edurekaIN
    @edurekaIN  6 лет назад +5

    Got a question on the topic? Please share it in the comment section below and our experts will answer it for you. For Java Training Curriculum, Visit our Website: bit.ly/32Ymvde

  • @sivakanagaraj8894
    @sivakanagaraj8894 6 лет назад +4

    Dude you are awesome. I am in this IT industry for last 20 yrs. you are one of a good teacher I have seen.

    • @edurekaIN
      @edurekaIN  6 лет назад

      Hey Siva, we are glad you feel this way. Do subscribe to the channel and hit the bell icon to never miss an update from us in the future. Cheers!

  • @chilukotipranathi4791
    @chilukotipranathi4791 4 года назад +17

    The best Indian tutorial RUclips channel ever . I can understand every single thing very clearly that you teach👍🏻

  • @fabricioandrescastilloalva5173
    @fabricioandrescastilloalva5173 4 года назад +12

    Thanks a lot man! We were having a mental breakdown, but your video saved us! You are our hero!!

  • @FirstLast-hm8oz
    @FirstLast-hm8oz 4 года назад +4

    Very informative. Thank you very much ! The installation part is a bit too long and should be more concentrated on new and specific issues regarding ReST.

    • @edurekaIN
      @edurekaIN  4 года назад +1

      Hi, thank you for your valuable feedback, we have considered it . Do subscribe to our channel for more content, cheers :)

  • @pavansrinivasvedantham9006
    @pavansrinivasvedantham9006 7 лет назад +3

    This is very nice and clear presentation.... thank you

  • @vladimirsuslov4134
    @vladimirsuslov4134 7 лет назад +5

    Thank you. Very educational

  • @Randhir-GlobalTraveller
    @Randhir-GlobalTraveller 2 года назад +1

    Super useful, Thanks !!!

    • @edurekaIN
      @edurekaIN  2 года назад

      You're welcome 😊 Glad it was helpful!!!

  • @diliplj
    @diliplj 7 лет назад +4

    IT IS GOOD VIDEO TO LEARN API

  • @sebuhi10
    @sebuhi10 7 лет назад +5

    Hi, explanation is great Thanks But why you don't use example with JSON. I believe it is more common.

    • @edurekaIN
      @edurekaIN  7 лет назад +3

      Hey Sabuhi, thanks for checking out our tutorial.
      This is one of the implementation done through Rest API. There are several methods in Java to implement REST API and JSON is one of those. Since this is a beginner level tutorial, this is the simplest to start off with and that's why we have used it. Cheers!

  • @eunjinko3388
    @eunjinko3388 7 лет назад +4

    This video is a excellent tutorial

    • @edurekaIN
      @edurekaIN  6 лет назад

      Thank you for watching our videos. Do subscribe to our youtube channel and stay updated with our content. Cheers :)

  • @muthu8663
    @muthu8663 7 лет назад +10

    really eudreka you guys are very informative and useful videos...

    • @edurekaIN
      @edurekaIN  7 лет назад +1

      Hey Vijay, thanks for the wonderful feedback! We're glad you found our tutorials useful.
      Here's another video that we thought you might like: ruclips.net/video/aqHhpahguVY/видео.html.
      Do subscribe to our channel to stay posted on upcoming tutorials. Cheers!

  • @arsalanshaikh3763
    @arsalanshaikh3763 7 лет назад +6

    u r great edureka thank u for all of ur tutorials

    • @edurekaIN
      @edurekaIN  7 лет назад

      Hey Arsalan, thanks for the wonderful feedback! We're glad we could help.
      Do subscribe to our channel to stay posted on upcoming tutorials.
      You can also check out our complete training here: www.edureka.co/java-j2ee-soa-training. Cheers!

  • @prashant09090
    @prashant09090 7 лет назад +3

    Very well explained..Great tutorial

  • @oocanto
    @oocanto 2 года назад +4

    Muy bueno, aunque estaría bueno un ejemplo de CRUD.

  • @js97989
    @js97989 2 года назад +1

    should we need this xml configurations when we use spring boot ? and create an maven prjct or anyother prjct .

  • @arjunarjun27
    @arjunarjun27 7 лет назад +4

    i started learning from edureka from java tutorials.Thank you very much

    • @edurekaIN
      @edurekaIN  7 лет назад +1

      Hey Arjun, thanks for checking out our tutorial!
      We're glad you found it useful. Here's another video that we thought you might like: ruclips.net/video/aqHhpahguVY/видео.html.
      Do subscribe to our channel to stay posted on upcoming tutorials. Cheers!

  • @amankaur7438
    @amankaur7438 7 лет назад +2

    it is realy very helpful thanks

  • @manishjangra4332
    @manishjangra4332 6 лет назад +7

    Iol, i don't know what is the issue but after watching this video twice and follow exactly i am still getting 404 in the end.....video is good maybe version problem is the issue

    • @edurekaIN
      @edurekaIN  6 лет назад +1

      Hey Manish, yes version compatibility can be an issue. Try using the same version as used in this tutorial, you will not face this issue. Cheers :)

  • @zael7848
    @zael7848 6 лет назад +2

    Thank you very much!!!

  • @kumaraneesh1420
    @kumaraneesh1420 2 года назад +1

    How to communicate & fetch details from different applications using REST API with url ..Kindly share video asap.

    • @edurekaIN
      @edurekaIN  2 года назад

      Thanks for showing interest in edureka kindly visit the channel for more videos our content creators are eagerly waiting for your suggestion to make new videos on your interest :) DO subscribe for the video update

  • @sridharsahu08
    @sridharsahu08 7 лет назад +6

    Very Informative Video.
    Towards the end I am still getting 404 error even after following what was said to append /rest/hello at end of url..
    Could you please assist

    • @edurekaIN
      @edurekaIN  7 лет назад

      Hey Sridhar, thanks for the wonderful feedback! We're glad you liked our tutorial.
      There could be two main reasons for this, first could be because of some mistake made in code written in the web.xml file. Second could be because the tomcat server isn't running or is being used by another application. You can also try to access your application from your web browser by going to the path localhost:8080/RestTest/hello
      Hope this helps. Cheers!

    • @edurekaIN
      @edurekaIN  7 лет назад

      Hey Amlan, thanks for checking out our tutorial!
      There could be two reasons for this. First could be because of some mistake made in code written in the web.xml file. Second could be because the tomcat server isn't running or is being used by another application. You can also try to access your application from your web browser by going to the path localhost:8080/RestTest/hello
      Hope this helps. Cheers!

    • @ravaldhiren
      @ravaldhiren 7 лет назад

      Hi I did run on browser and did web.xml as per the tutorial but getting same error .
      HTTP Status 404 - Not Found
      Type Status Report
      Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
      Apache Tomcat/8.5.16

    • @raymondhilario8501
      @raymondhilario8501 7 лет назад +1

      Had the same experience, try this:
      Unable to run the application, had to change some config in the Web.xml on this servlet-class param:
      >>> org.glassfish.jersey.servlet.ServletContainer
      without the ".class" extension and now able to run.
      Hope this helps.

    • @sneharajit41
      @sneharajit41 6 лет назад

      Use org.glassfish.jersey.servlet.ServletContainer instead org.glassfish.jersey.servlet.ServletContainer.class
      Hope this will fix your issue.

  • @aidahailu2320
    @aidahailu2320 7 лет назад +2

    Great tutorial and easy to understand.

  • @godservantpk
    @godservantpk 6 лет назад +2

    Super very good explanation crystal clear

    • @edurekaIN
      @edurekaIN  6 лет назад

      Thank you for watching our video. Do subscribe, like and share to stay connected with us. Cheers :)

  • @GopalRoy-nn6ft
    @GopalRoy-nn6ft 6 лет назад +2

    i liked yours teaching style

    • @edurekaIN
      @edurekaIN  6 лет назад

      Hey Gopal, thank you for appreciating oour work. Subscribe and stay tuned for updates in the future. :)

  • @kimkumarrajan
    @kimkumarrajan 5 лет назад +1

    Nice video for beginners :) and very well explained .

    • @edurekaIN
      @edurekaIN  5 лет назад

      Hey Kim, we are glad you loved the video. Do subscribe to the channel and hit the bell icon to never miss an update from us in the future. Cheers!

  • @krunal921007
    @krunal921007 3 года назад

    Thank you bro. Very nicely explained rest api

    • @edurekaIN
      @edurekaIN  3 года назад

      We are super happy that Edureka is helping you learn better. Your support means a lot to us and it motivated us to create even better learning content and courses experience for you . Do subscribe the channel for more updates : ) Hit the bell icon to never miss an update from our channel : )

  • @Kumuthapoorvi
    @Kumuthapoorvi 5 лет назад +1

    thank you for nice class

  • @harikamisetty
    @harikamisetty 6 лет назад +1

    Nice explanation with in 13 min

    • @edurekaIN
      @edurekaIN  6 лет назад +1

      Hey Hari, we try to make out tutorials short and informative. We are glad that you liked our content. Subscribe to us and stay connected. Cheers :)

  • @varundade
    @varundade 6 лет назад +5

    Thanks Edureka! this video was so helpful hoping more amazing videos from you guys in future...all the best!

    • @edurekaIN
      @edurekaIN  6 лет назад

      Hey Varun, glad you loved the video. Do subscribe and hit the bell icon to never miss an update from us in the future. Cheers!

  • @santoshturamari
    @santoshturamari 7 лет назад +12

    Followed the tutorial fully, but getting the error java.lang.ClassNotFoundException: org.glassfish.jersey.servlet.ServletContainer.class in console, and 404 in browser.

    • @santoshturamari
      @santoshturamari 7 лет назад +14

      I could resolve this issue by adding "org.glassfish.jersey.servlet.ServletContainer" instead of "org.glassfish.jersey.servlet.ServletContainer.class" as sevlet-class in web.xml

    • @edurekaIN
      @edurekaIN  7 лет назад +1

      Hey Santosh, Glad it worked out.
      Do subscribe to our channel to stay posted on upcoming tutorials. Cheers!

    • @KatRollo
      @KatRollo 7 лет назад

      This is the correct solution, thanks!

    • @Shubhamsharma-sg3jt
      @Shubhamsharma-sg3jt 7 лет назад

      thanks bro

    • @rbok78
      @rbok78 6 лет назад

      Thanks Santosh for sharing the solution. It might be useful to mention this at the top of the video description so everyone can easily fix the code before reporting the same issue repeatedly.

  • @arpitsaxena2906
    @arpitsaxena2906 5 лет назад +1

    thank you

  • @vaibhavkamble7076
    @vaibhavkamble7076 2 года назад +1

    Getting Status 404
    The origin server did not find a current representation for the target resource or is not willing to disclose that one exists
    After following all steps you have shown in video

  • @krishnaverma7744
    @krishnaverma7744 6 лет назад +1

    Thanks neel...you really explains thing very well with perfect example.

    • @edurekaIN
      @edurekaIN  6 лет назад

      Thank you for watching our video. Do subscribe, like and share to stay connected with us. Cheers :)

  • @shilpavpurushothaman
    @shilpavpurushothaman 19 дней назад

    Good explanation

  • @varundade
    @varundade 6 лет назад +1

    Will we would be able to develop plugins for wordpress?

    • @edurekaIN
      @edurekaIN  6 лет назад

      Hey Varun, WordPress has various built-in and freely available plugins, you can use any of them. If you wish to learn about how to exclusively create a plug-in for WordPress, we shall consider it.
      Hope this helps!

  • @Kumuthapoorvi
    @Kumuthapoorvi 5 лет назад +2

    pace so nice

  • @tiyatukes9433
    @tiyatukes9433 6 лет назад +2

    So I'm following along with your tutorial, btw, you are a great teacher. So I downloaded jersey and extracted it, but when I open up eclipse, I don't see dynamic web. Since I'm fairly new to this, where else would I look?

    • @edurekaIN
      @edurekaIN  6 лет назад

      Hey Tiya, For this you need to install eclipse for JavaEE Developers. Here is the link - www.eclipse.org/downloads/packages/release/indigo/sr2/eclipse-ide-java-ee-developers
      Hope this helps!

  • @mayurkulkarni5339
    @mayurkulkarni5339 7 лет назад +2

    hello sir,I have watched your tutorial and it was very helpful .I followed all the steps as shown in the tutorial but then also i m getting " java.lang.ClassNotFoundException: org.glassfish.jersey.servlet.ServletContainer.class " error ,why so?

    • @edurekaIN
      @edurekaIN  7 лет назад

      Hey Mayur, thanks for checking out our tutorial. We're glad you found it useful.
      With regard to the error, Try to copy your jersey jar files into WebContent -> WEB-INF -> lib.
      Hope this helps. Cheers!

    • @seenu0104
      @seenu0104 6 лет назад +1

      Use "org.glassfish.jersey.servlet.ServletContainer" instead of "org.glassfish.jersey.servlet.ServletContainer.class" in web.xml

    • @abhadra
      @abhadra 6 лет назад

      do not use a .class extension, just org.glassfish.jersey.servlet.ServletContainer

    • @malathikishore6555
      @malathikishore6555 6 лет назад

      remove ".class" from "org.glassfish.jersey.servlet.ServletContainer.class" in web.xml for servlet class & check all libraries are copied to lib or not.

    • @KapilDaJawabNahi
      @KapilDaJawabNahi 6 лет назад

      try setting org.glassfish.jersey.servlet.ServletContainer (without class) as ...
      org.glassfish.jersey.servlet.ServletContainer

  • @mihirvalame
    @mihirvalame 6 лет назад +4

    Hello i followed exact steps on latest version of jars and tomcat 9 server but i always get below error 404 with description as 'The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.'

    • @edurekaIN
      @edurekaIN  6 лет назад

      Hey Mihir, Did you try running it as admin? That usually solves any firewall block issue. Try it out and let us know.

  • @abbasjameel7025
    @abbasjameel7025 6 лет назад

    While launching the application in the browser is it always necessary for the user to give the hard coded value of package name and class name in URL or there is some way we can configure them ?

    • @edurekaIN
      @edurekaIN  6 лет назад

      Hey Abbas, yes you need to use the hardcoded value. Hope this helps!

  • @danielmoreira204
    @danielmoreira204 2 года назад

    kinda useful

  • @stsandeep7447
    @stsandeep7447 6 лет назад +1

    Hi ,
    I have put jersey servlet jars in web-inf/lib and library also but still my tomcat not getting up and application is not running, pls help me

    • @edurekaIN
      @edurekaIN  6 лет назад

      Hey Sandeep, For this, you just have to check whether your tomcat is being set properly, if not re configure all the servers again and make sure servlet.api is present.
      Hope this helps!

  • @SahilMalik-ss6qi
    @SahilMalik-ss6qi 5 лет назад +3

    I am not getting a restart server option after finish , so getting 404 error even after adding rest/hello
    What can I do to solve it?

    • @edurekaIN
      @edurekaIN  5 лет назад

      Hey Sahil, Check if you have done proper configuration changes for Rest service in web.xml and if you are still getting the error post the exact code that you have used.

    • @rockeeenagra
      @rockeeenagra 5 лет назад +1

      Remove ".class" from servletContainer.class in tag servlet-class in web.xml, if already done then check for errors in console while server startup

    • @nishalohani
      @nishalohani 5 лет назад

      @@edurekaIN Thanks for the video. Even I am getting 404 error even after adding rest/hello, refer web.xml content
      JavaAPI


      Java API
      org.glassfish.jersey.servlet.ServletContainer.class

      jersey.config.server.provider.packages
      test

      1


      Java API
      /rest/*

  • @mukulmohal7492
    @mukulmohal7492 6 лет назад +1

    I am not able to view xml response, it is always giving error as whitespace is not allowed at this location.

    • @edurekaIN
      @edurekaIN  6 лет назад

      Hey Mukul, "Put the string in a block as below:

  • @sabbukarki8575
    @sabbukarki8575 7 лет назад +3

    hello sir. i try to download Jersey but unable to download it. whats an alternative

    • @edurekaIN
      @edurekaIN  7 лет назад

      +Tha buli, thanks for checking out our tutorial!
      You can download Jersey files from the following link: goo.gl/Qie7ZN. You will need to extract the file and copy it inside /WebContent/WEB-INF/lib folder of your dynamic web project. Hope this helps. Cheers!

  • @sow223
    @sow223 6 лет назад +1

    how to consume the web services either soap or restful

    • @edurekaIN
      @edurekaIN  6 лет назад

      Hey Sowbhagya, "searchmicroservices.techtarget.com/tip/REST-vs-SOAP-Choosing-the-best-web-service
      Refer this blog. It might be of some help to you."

  • @MovingDirection
    @MovingDirection 6 лет назад +5

    I am facing an issue. Trying 2 many times still getting an error 404. I have done exactly the same thing which u are doing in ur video. Assist me asap

    • @edurekaIN
      @edurekaIN  6 лет назад

      Hey Musicat, can you tell us the exact error that you faced along with screenshot. We will definitely try helping you out. Cheers :)

    • @narayanasrikarbonda4634
      @narayanasrikarbonda4634 6 лет назад +10

      I could resolve this issue by adding "org.glassfish.jersey.servlet.ServletContainer" instead of "org.glassfish.jersey.servlet.ServletContainer.class" as sevlet-class in web.xml..credits goes to @santosh BT

    • @leokamikkaze20
      @leokamikkaze20 6 лет назад +2

      I was having the same issue and removing the ".class" worked, thanks

    • @narasimhayTECHHRC
      @narasimhayTECHHRC 5 лет назад

      Worked Great thanks Bro.

    • @Az-dk8jd
      @Az-dk8jd 5 лет назад

      thaks @narayana srikar
      it works by removing this .class

  • @UnboxingFunn
    @UnboxingFunn 2 года назад +1

    It is showing error as error is showing in console org.apache.concurrent.excecutionexception
    Then the error coming in dialogue box as
    starting tomcat v9.0 server at localhost has encountered a problem.
    Server tomcat v9.0 server at localhost failed to start

  • @ravindranathreddy4796
    @ravindranathreddy4796 7 лет назад +2

    Hi Sir, its is really help full... could you please help me Usage of POST method use and how to insert with out useing queryParam ?

    • @edurekaIN
      @edurekaIN  6 лет назад +1

      Usage of POST in webswervice: if server is responsible for creating the ID's of the new resources then use POST, for example
      POST /users/
      Now, POST will carry a key and value which client uses to send username=john and ID will be automatically generated by Server.
      Withour @queryParams(): You can get the query parameters grammatically, via “@Context UriInfo“ for example: import java.util.List;
      import javax.ws.rs.GET;
      import javax.ws.rs.Path;
      import javax.ws.rs.core.Context;
      import javax.ws.rs.core.Response;
      import javax.ws.rs.core.UriInfo;
      @Path("/users")
      public class UserService {
      @GET
      @Path("/query")
      public Response getUsers(@Context UriInfo info) {
      String from = info.getQueryParameters().getFirst("from");
      String to = info.getQueryParameters().getFirst("to");
      List orderBy = info.getQueryParameters().get("orderBy");
      return Response
      .status(200)
      .entity("getUsers is called, from : " + from + ", to : " + to
      + ", orderBy" + orderBy.toString()).build();
      }
      }
      Hope this helps :)

  • @TM-lf6os
    @TM-lf6os 6 лет назад +1

    Had a port issue when trying to start the server, said 'Several ports (8005, 8080, 8009) required by Tomcat v8.5 Server at localhost are already in use.'
    Double-clicked the server down below in bottom window on Eclipse, changed server Port numbers from 8005, 8080, 8009, to 8008 (respectively), and that seemed to fix the issue.

  • @SubelalPal
    @SubelalPal 6 лет назад +1

    404 error is coming->localhost:7080/JavaAPI/rest/hello please help me about this type issue

    • @edurekaIN
      @edurekaIN  6 лет назад

      Hey Subelay, "You can try changing your port to 8080 instead of 7080. If the issue persists, you can reach back to us, we would be glad to help."

  • @dileepkumar-oh1be
    @dileepkumar-oh1be 6 лет назад

    great explaination

    • @edurekaIN
      @edurekaIN  6 лет назад

      Hey Dileep, we are glad you loved the video. Do subscribe and hit the bell icon to never miss an update from us in the future. Cheers!

  • @TM-lf6os
    @TM-lf6os 6 лет назад +1

    Strange issue: my code is identical to yours, but if I included the ApplicationPath and core.Application packages, it returns a blank page when running server. If I do include them, it returns the "Hello from HTML" line, even though it is the third method listed....why is this?

    • @edurekaIN
      @edurekaIN  6 лет назад

      Hey Edward, Can you please elaborate? have you tried stopping and restarting the service? That usually solves this issue.

  • @pranavipalavarapu9431
    @pranavipalavarapu9431 5 лет назад

    how to create api key

    • @edurekaIN
      @edurekaIN  5 лет назад

      Hi Pranavi, Go to the API Console.
      From the projects list, select a project or create a new one.
      If the APIs & services page isn't already open, open the left side menu and select APIs & services.
      On the left, choose Credentials.
      Click Create credentials and then select API key.

  • @satindergill9735
    @satindergill9735 5 лет назад

    All the people who are getting 404 error, try to run the app in postman or in browser once the server is started. You will be good. Good luck.

  • @habtamusium8646
    @habtamusium8646 Год назад +1

    many thanks !

    • @edurekaIN
      @edurekaIN  Год назад

      You're welcome 😊 Glad you liked it!!

  • @sergiyrudenko905
    @sergiyrudenko905 6 лет назад

    Thank you very much!

  • @gopalkannan4934
    @gopalkannan4934 2 года назад +1

    Thank you so much!!!