Though your question suggests that Spring and Java EE are two different things, in reality they are not. You can use many Java EE components like
- servlets and JSP for Spring MVC,
- JPA for Spring DAO.
- JTA for Spring security
The only major thing Spring replaces in the Java EE stack is the EJB. Unless you insist on using EJBs, Spring should be the way to go. Also Spring provides inbuilt support for webservices and other things as well.
Also checkout the Groovy and Grails that use Spring as the base.
Finally I would say, functionality wise both does the same. It's code (Java EE) vs configuration (Spring), a matter of preference really.