Anybody can implement the J2EE specification, although I wouldn't recommend you try to do it yourself. You're right, this is generally implemented by application servers so that you can run your application on a J2EE compliant container. There are also open source libraries, which when combined and added to Tomcat will implement the specification (see tomee for example).
When you write your application you are utilising the benefits of the J2EE environment which will allow you to write complex applications and focus on the needs of your specific requirements.