Hi,
First of all let's review this "petclinic-servlet.xml" file again:
The elementCode:<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="viewResolver" class="org.springframework.web.servlet.view.ResourceBundleViewResolver"> <property name="basename"><value>views</value></property> </bean> <bean id="exceptionResolver" class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver"> <property name="exceptionMappings"> <props> <prop key="org.springframework.dao.DataAccessException">dataAccessFailure</prop> <prop key="org.springframework.transaction.TransactionException">dataAccessFailure</prop> </props> </property> </bean> <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <props> <prop key="/welcome.htm">clinicController</prop> <prop key="/vets.htm">clinicController</prop> <prop key="/owner.htm">clinicController</prop> <prop key="/findOwners.htm">findOwnersForm</prop> <prop key="/editOwner.htm">editOwnerForm</prop> <prop key="/addOwner.htm">addOwnerForm</prop> <prop key="/addVisit.htm">addVisitForm</prop> <prop key="/addPet.htm">addPetForm</prop> <prop key="/editPet.htm">editPetForm</prop> </props> </property> </bean> <bean id="clinicController" class="org.springframework.samples.petclinic.web.ClinicController"> <property name="methodNameResolver"><ref local="clinicControllerResolver"/></property> <property name="clinic"><ref bean="clinic"/></property> </bean> <bean id="clinicControllerResolver" class="org.springframework.web.servlet.mvc.multiaction.PropertiesMethodNameResolver"> <property name="mappings"> <props> <prop key="/welcome.htm">welcomeHandler</prop> <prop key="/vets.htm">vetsHandler</prop> <prop key="/owner.htm">ownerHandler</prop> </props> </property> </bean> <bean id="findOwnersForm" class="org.springframework.samples.petclinic.web.FindOwnersForm"> <property name="formView"><value>findOwnersForm</value></property> <property name="selectView"><value>selectOwnerView</value></property> <property name="successView"><value>ownerRedirect</value></property> <property name="clinic"><ref bean="clinic"/></property> </bean> <bean id="addOwnerForm" class="org.springframework.samples.petclinic.web.AddOwnerForm"> <property name="formView"><value>ownerForm</value></property> <property name="successView"><value>ownerRedirect</value></property> <property name="validator"><ref local="ownerValidator"/></property> <property name="clinic"><ref bean="clinic"/></property> </bean> <bean id="editOwnerForm" class="org.springframework.samples.petclinic.web.EditOwnerForm"> <property name="formView"><value>ownerForm</value></property> <property name="successView"><value>ownerRedirect</value></property> <property name="validator"><ref local="ownerValidator"/></property> <property name="clinic"><ref bean="clinic"/></property> </bean> <bean id="ownerValidator" class="org.springframework.samples.petclinic.validation.OwnerValidator"/> <bean id="addPetForm" class="org.springframework.samples.petclinic.web.AddPetForm"> <property name="formView"><value>petForm</value></property> <property name="successView"><value>ownerRedirect</value></property> <property name="validator"><ref local="petValidator"/></property> <property name="clinic"><ref bean="clinic"/></property> </bean> <bean id="editPetForm" class="org.springframework.samples.petclinic.web.EditPetForm"> <property name="formView"><value>petForm</value></property> <property name="successView"><value>ownerRedirect</value></property> <property name="validator"><ref local="petValidator"/></property> <property name="clinic"><ref bean="clinic"/></property> </bean> <bean id="petValidator" class="org.springframework.samples.petclinic.validation.PetValidator"/> <bean id="addVisitForm" class="org.springframework.samples.petclinic.web.AddVisitForm"> <property name="formView"><value>visitForm</value></property> <property name="successView"><value>ownerRedirect</value></property> <property name="validator"><ref local="visitValidator"/></property> <property name="clinic"><ref bean="clinic"/></property> </bean> <bean id="visitValidator" class="org.springframework.samples.petclinic.validation.VisitValidator"/> </beans>was never been defined!Code:<property name="clinic"><ref bean="clinic"/></property>
How it works?
I'm a beginer on Spring.
Any help would be appreciated!
BillyW
Thu Aug 26 10:42:29 2004 from China[/code]


Reply With Quote