It is not *only* a webserver.
If you strict definition of a web-server is some process that serves up HTML, then Tomcat is more than just a web-server and properly should be described as containing a web-server.
If your strict definition of app-server is "an
EJB container", then Tomcat does not make this requirement.
If however, you're a little less strict about how you define 'web' and 'app', then Tomcat can be thought of as either.