Announcement Announcement Module
Collapse
No announcement yet.
dispatecher-servlet.xml Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • dispatecher-servlet.xml

    Whats wrong with this xml file?

    I don't know how to solve the error message;

    org.springframework.beans.factory.xml.XmlBeanDefin itionStoreException: Line 16 in XML document from ServletContext resource [/WEB-INF/agioplanering-servlet.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'name' is not allowed to appear in element 'ref'.

    Line 16 is <ref name="projectServiceImpl">


    This is an extract from my dispatcher-servlet.xml;


    <bean name="/createProject.htm" class="businessLayer.controller.CreateProjectContr oller">
    <property name="formView">
    <value>createProject</value>
    </property>
    <property name="projectService">
    <ref name="projectServiceImpl">
    </property>
    <property name="successView">
    <value>readProject</value>
    </property>
    </bean>

    <bean id="projectServiceImpl" class="businessLayer.service.ProjectService">
    <property name="ProjectDao" ref="ProjectDao">
    </property>
    </bean>

    <bean id="ProjectDao" class="integrationLayer.model.ProjectDao">
    </bean>

  • #2
    http://static.springframework.org/sp...rties-detailed

    Comment


    • #3
      Correct:

      Code:
      <property name="projectService">
         <ref bean="projectServiceImpl"/>
      </property>
      If you use an IDE, try to enable validation. Eclipse Spring IDE, for example, will point out the error and supply you with auto-completion of context files.

      Cheers

      G

      Comment

      Working...
      X