Announcement Announcement Module
Collapse
No announcement yet.
Simple XML Question Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Simple XML Question

    Hi all,

    I'm new to Spring, and for now I just have to manage remote and local sessions according to a VM parameter. That's fine, no problem, but at remote side I have to use a specific security-servlet.xml that I've made, because I'm publishing the business object using HttpInvoker (I hate EJB).

    So, the issue is I have to use the same XML that I use locally at remote side, and I don't want to manually copy & paste bean definitions to security-servlet.xml.

    How can I "import" those XML into security-servlet.xml? Is this related to DOCTYPE?

    Thanks in advance.

  • #2
    Re: Simple XML Question

    Originally posted by tiago182
    Hi all,

    How can I "import" those XML into security-servlet.xml? Is this related to DOCTYPE?

    Thanks in advance.
    Not sure if that will do it. Doesn't that just grab the whole external file into the current file?

    In one app I have this in the includer file:
    <!DOCTYPE project [<!ENTITY classpath SYSTEM "library.inc">]>

    and it is used as:
    &classpath;

    Spring also supports the <import> element.
    See: http://static.springframework.org/sp...context-import

    Comment


    • #3
      It worked!

      Thanks jbetancourt, the <import resource=""/> worked fine.

      But the better solution was adding

      <context-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>/WEB-INF/classes/config/spring/application-context.cfg.xml /WEB-INF/classes/config/spring/resource-layer.cfg.xml</param-value>
      </context-param>

      <listener>
      <listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
      </listener>

      into my /WEB-INF/web.xml

      I found out in the link you sent me.

      My best regards,

      Comment

      Working...
      X