Tuesday, March 23, 2010

Re: [Java] Spring/MVC/JBoss XML files

 

Dear David,

of course you can include many .xml files within context file by adding this
line below:

<import resource="engine.xml"/>
<import resource="mq.xml"/>
<import resource="mapper.xml"/>
<import resource="dao.xml"/>

Thank you,

Ahmed Nabil Hosny

On Fri, Mar 19, 2010 at 5:16 AM, David Kramer <david@thekramers.net> wrote:

>
>
> 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.
>
>

--
Ahmed Nabil Hosny

Senior Application Developer
Ejada

[Non-text portions of this message have been removed]

__._,_.___
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