Results 1 to 3 of 3

Thread: dispatecher-servlet.xml

  1. #1
    Join Date
    Oct 2008
    Posts
    25

    Default 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. #2
    Join Date
    May 2008
    Location
    Berlin, Germany
    Posts
    36

  3. #3
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    155

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •