Announcement Announcement Module
Collapse
No announcement yet.
DTD reference for Spring beans XML file Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • DTD reference for Spring beans XML file

    My Spring application context configuration file contains a reference to the DTD at "http://www.springframework.org/dtd/spring-beans.dtd". This means that my application system has runtime dependency on the reachability of the particular web site. In other words, my system fails to start if the dtd file/web site is not reachable.

    This dependency is fine for sample applications but not for my production system. What is the recommended way of working around this issue? Is there a way to turn off DTD validation as Spring framework reads them in?

    Thanks for help.
    /Jong

  • #2
    Use <!DOCTYPE beans SYSTEM "spring-beans.dtd">. If you get a parsing error check out http://forum.springframework.org/showthread.php?t=12022
    Last edited by robyn; May 14th, 2006, 11:57 AM.

    Comment


    • #3
      it works

      I didn't know that Spring uses its own entity resolver so that I could use system id for locating DTD file.

      Thanks
      /Jong

      Comment


      • #4
        This is very close to the problem I just reported (telling me 'abstract' needs to be declared for a bean), but the solution doesn't help with that either. That is, changing the DOCTYPE to SYSTEM with an absolute path of the latest DTD downloaded from www.springframework.org doesn't solve the problem, so could it be a cacheing issue?

        Comment


        • #5
          Originally posted by jonmor
          This is very close to the problem I just reported (telling me 'abstract' needs to be declared for a bean), but the solution doesn't help with that either. That is, changing the DOCTYPE to SYSTEM with an absolute path of the latest DTD downloaded from www.springframework.org doesn't solve the problem, so could it be a cacheing issue?
          You should never need to switch to ssytem from public for Spring itself, as it has the entity resolver and will always find the dtd from the classpath. Are you sure that in fact you are running 1.1.1 (note that 1.1.2 is out now), and not 1.1, which didn't have that attribute? Perhaps the older version is on your classpath somewhere...

          Comment


          • #6
            You are correct

            thanks.

            Comment

            Working...
            X