I have the following doubt. I have a TomCat server instance and I need to expose some JPG images on Internet. In the past I always accomplished this type of task installing an Apache server and then putting my images into an htdocs subfolder. With Tomcat server it seems to be more complicated.
I found this post here on SO: How to config Tomcat to serve images from an external folder outside webapps?
But I am not sure about what I have to do so I want to ask you some question to clarify my doubts.
From what I know a JavaEE application is something like that, deployed, added functionality to the application server\servlet container (differently from Apache where a PHP application is only something that is runned).
So, reasoning on the example of the posted link it seems to me that:
- I have to create a brand new JavaEE application that will be deployed into my Tomcat server. 
- This application will contain no classes because there is no logic that have to be implemented. 
- This application have only to contain the web.xml configuration file that will configure a single servlet that map to the directory where my images are contained, this one: - images com.example.images.ImageServlet images /images/* 
My doubt is: is the previous example incomplete? Have I to write the ImageServlet class to do this work? What can I do?
 
     
     
    