Web Services (Road to J2EE) - 02

Let's start hands on,

I prefer working on IDEA and I'll create a maven project as this Series hands-on example. For all who don't know about MAVEN, it's a Java Project Management tool or i can tell is it's a kind of package manager like npm. Manages dependencies of your projects and gives archetype which is the structure of the project.
search for the archetype of the jersey web app so we can get an initial web app structure for our project. if you don't see any jersey dependancy then click on add archetype and gives the following values. for the mandatory fields.       

<!-- https://mvnrepository.com/artifact/org.glassfish.jersey.archetypes/jersey-quickstart-webapp -->
<dependency>
    <groupId>org.glassfish.jersey.archetypes</groupId>
    <artifactId>jersey-quickstart-webapp</artifactId>
    <version>2.28</version>
</dependency>

or go to the maven repository and find the latest version. I'll put the link below for your reference.
https://mvnrepository.com/artifact/org.glassfish.jersey.archetypes/jersey-quickstart-webapp

proceed with the given archetype, give group id artifact id and version for your project and finally you'll get sample project created in your IDEA ide. Now need to deploy and run the newly created project on the tomcat server.  First, go to plugins and make sure tomcat integration is ticked and go to run configuration

https://www.mkyong.com/intellij/intellij-idea-run-debug-web-application-on-tomcat/ This will give you a better understading on how to add tomcat server added on IDEA.
                                                                                                                                 



Comments

Popular Posts