views:

219

answers:

3

Spring JavaConfig makes possible to create spring applications without xml cotext configuration. And servlet 3.0 specification makes possible to create web applications without web.xml.

So, is it possible to create spring web application not using any xml configuration? Is there any already implemented solution?

PS At now I do not see in servlet 3.0 any simple method to use Spring's DispatcherServlet and listener.

A: 

So, is it possible to create spring web application not using any xml configuration?

Look like so, yes, when leaving under each the context.xml and several appserver-specific xml files outside consideration.

Is there any already implemented solution?

Why are you asking this? Did you bother to download the necessary software and play with it yourself? What problems exactly did you have with it? Java EE 6 isn't officially out yet (still in beta), so I wouldn't expect any real world live implementations.

Edit: as per your edit:

PS At now I do not see in servlet 3.0 any simple method to use Spring's DispatcherServlet and listener.

Sun don't care about Spring. Spring isn't part of Sun Java EE, Spring is just built on top of that. Spring is responsible for their own products themselves. So all you can do is to wait for them to release an upgraded product targeted on Java EE 6.

BalusC
Answer to your question has been added in PS
Andrew Dashin
Actually, JavaEE 6 and GlassFish v3 are now officially out (since yesterday :) http://java.sun.com/javaee/
Pascal Thivent
@Andrew: Spring is not part of Java EE. Spring is just built on top of Java EE. @Pascal: hey, finally! Thanks for notifying that!
BalusC
+1  A: 

Well, don't expect too much support of Spring from JEE 6 (which is officially out since yesterday) as this won't happen soon in my opinion :) In other words, you'll need to wait for Spring to support Servlet 3.0 to benefit from all facilities. Quoting the Spring Framework 3.0 RC1 released blog post:

* Last but not least, early support for Java EE 6: Spring 3.0 already supports the use of JSF 2.0 and JPA 2.0 in a Spring environment, in addition to JSR-303 and JSR-330 support. Further Java EE 6 related specifications such as Servlet 3.0 will be fully supported as they become available in concrete products; this is scheduled for the Spring 3.1/3.2 timeframe.

So you'll still need XML for now and this should answer your question.

Pascal Thivent
A: 

Have you used Grails.Its a web framework that favors convention over configuration (similar to ruby on rails and hence no issue of config files) and i think at the backend generates code compliant with Spring framework.

Rajat
I don't see how this relates to the subject :) But anyway, I made one project using grails. The only thing I liked is a convension over configuration. The rest at that moment was too raw and lame.
Andrew Dashin