Run the Jetty server simply by hitting the green play button in Netbeans. Find the Actions tab and then the Run Project action. ![]() Now right click on your project and click properties. Src/test/resources/jetty-maven-plugin-webdefault.xml ![]() Open your pom.xml and add this between your plugins tags: I use Jetty as a server because its simple to use, it recompiles/restarts on save, and its also easy to set up. Now run this on your server and head to /api/hello/SpinSpire to see this: ServletContainerīe sure to change the param-value to match your Java class package. ![]() In order for this to work, you must make an addition to your web.xml to map the Java class to the RESTful path. Import class Hello Response String message) This simple class will output a simple greeting when you visit the /hello/yourname path.
0 Comments
Leave a Reply. |