Hi All,
I am trying to Override existing jsp page in new module i followed steps from the link.
moduleApplicationContext.xml
<bean id="myModuleMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="order"><value>10</value></property>
<property name="mappings">
<props>
<prop key="admin/patients/newPatient.form">myNewPatientFormController</prop>
</props>
</property>
</bean>
<bean id="myNewPatientFormController" class="org.openmrs.module.basicexample.web.controller.MyNewPatientFormController" />
<context:component-scan base-package="org.openmrs.module.basicexample.web.controller" />
Controller
@Controller
public class MyNewPatientFormController
{
@RequestMapping( method = RequestMethod.GET )
public void showThePage()
{
System.out.println();
}
@RequestMapping( method = RequestMethod.POST )
public String savePatient( @ModelAttribute( "patient" ) Patient newPatient )
{
System.out.println( newPatient );
return newPatient.getGivenName();
}
}
when i tried to access http://localhost:8080/openmrs/admin/patients/newPatient.form end point HTTP Status 404 - /openmrs/WEB-INF/view/admin/patients/newPatient.jsp error i have placed newPatient.jsp file under /webapp/newPatient.jsp & /webapp/admin/patients/newPatient.jsp and tried.