For smaller sized systems, both J2EE and any other web framework can pretty much accomplish most of the needs of a project. For instance pulling data from a database, making dynamic webpages based upon queries to display data, even using AJAX to query something like a REST service. But when the scale gets larger, or the needs of the system grow, in my opinion J2EE has features that put it into a more advantageous category. Think of features such as remote method invocation (call a method of an object on the server remotely), object transfer across a network (pass objects between two different JVM instances), timer services (run periodic services), multiple clients (eg webstart, webpage, etc...), messaging services (eg JMS), and thread management (long running tasks can be queue'd into a managed service to run the task).