Writing your first Java web application
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.
Creating a Maven project from Archetype
- Open the NetBeans IDE and from the menu bar, click on
File|New Project. TheNew Projectwizard will appear. - In
Choose Project(step 1), selectMavenunderCategoriesandProject from ArchetypeunderProjects,as shown in Figure 6-4. - Then, click the
Nextbutton to proceed:

Figure 6-4: Choose project
- In
Maven Archetype(step 2), selectmaven-archetype-webappunderKnown Archetypes, as shown in Figure 6-5.
- Then, click the
Nextbutton to proceed:

Figure 6-5: Maven Archetype
- In
Name and Location(step 3), typeiotforProject Name,com.packt.B05688forGroup Id, andcom.packt.B05688.chapter6forPackage, as shown in Figure 6-6.
- Then...