Clear tutorials for code developers.

Java EE

Automatic on demand generator of a sitemap.xml in a Java EE servlet

Solution for having an up-to-date sitemap in a web application written in Java

Java EEwebJava

Create a servlet in your java source package. I named the class

In my structure the servlet is located in com.algorytmika.servlets.

Write into the class the similar code:

Next add your servlet to your web.xml descriptor

Now calling your page like you can see your sitemap. Check my sitemap.xml here