The servlet you will be writing to control the Raspberry Pi's GPIO pin through the internet or any local area network requires a series of configurations to build and test in the Windows environment. Then you will deploy the project to the Raspberry Pi manually and run it on the Jetty server.
Writing your first Java web application
Creating a Maven project from Archetype
- Open the NetBeans IDE and from the menu bar, click on File | New Project. The New Project wizard will appear.
- In Choose Project (step 1), select Maven under Categoriesand Project from Archetype under Projects,as shown in Figure 6-4.
- Then, click the Next button to proceed:
Figure 6-4: Choose project
- In Maven Archetype (step 2), select maven-archetype-webapp under Known Archetypes, as shown...