Thursday, March 18, 2010

[Java] Spring/MVC/JBoss XML files

 

Hi. I'm going through the APress book Spring Recipes. I'm up to the
Jave EE MVC part and need a little guidance with the XML files.

I understand the web.xml, now there's also the $APPNAME-servlet.xml.
The book says you should have separate xml files for each layer, like
$APPNAME-persistence.xml and $APPNAME-service.xml.

I see you get it to load the main one by adding the
ContextLoaderListener and contextConfigurationLocation sections to
web.xml, but it's not clear how you load other xml files. Can someone
explain how that works, and what's supposed to be in $APPNAME-servlet.xml?

Maybe I should ask the question by stating my theory. So
$APPNAME-servlet.xml will be loaded automatically by Spring, and I can
load one other using the context stuff in web.xml. Is there a way to
include one bean.xml file from another? So let's say my DAOs and domain
beans are already defined in beans.xml. Is there something I can put in
beans.xml to have it include $APPNAME-service.xml,
$APPNAME-persistence.xml, etc?

The book is actually quite inconsistent with its own examples in this
regards, so some guidance would be a big help.

Thanks.

__._,_.___
Recent Activity:
Visit http://aiaiai.com or http://jgame.org for more groups to join.
Java Official Group is created for the following topics: Java 2 Enterprise Edition - J2EE, Java 2 Standard Edition - J2SE, Java 2 Micro Edition - J2ME, XML, XSL, XSD, XPATH, Web Services, Jini, JXTA for all type of Java Geeks.
Whoever posts spam / ads / job related message will be BANNED IMMEDIATELY
.

__,_._,___

No comments:

Post a Comment