...
Redeploy the web application. If you point to your tomcat server with the appropriate URL (http://localhost:8080/ApacheDS/RootDse), you'll see the content of the Root DSE as depicted below:
Generate Maven Project
To get the sample code you can either generate a maven project using the apacheds-webapp archetype or
Download the source code
StartStopListener.java (Step 1)
RootDseServlet.java (Step 2)
web.xml
ApacheDSWebApp.zip all sources including a build script for Apache Ant (build.xml)