In my springapplet-servlet.xml file I have the following url mappings,
<bean id="loginController" class="ui.action.Login"/>
<bean id="listPortfoliosController" class="ui.action.ListPortfolios"/>
<bean id="urlMapping" class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="/start.do">loginController</prop>
<prop key="/listportfolios.do">listPortfoliosController</prop>
</props>
</property>
</bean>
and in my web.xml I have:
<servlet>
<servlet-name>springapp</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springapp</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
These work fine for getting my appliaction going.
Now within the listportfolio.jsp which provides the view for the listportfoliocontroller and hence listportfolios.do I have a form and also some hrefs. Originally these were referring to /listportfolio.do which seemed to work but thinking about it didnt make much sense to me as I am already on the listportfolio.do page so I changed them to call /listPortfolioController but this doesnt work.
Which is the correct method, and if it is the second method how do I configure my xml files to get it to work.
Also can I just check the AbstractFormController class is only meant to be used when users are using a form in an add/edit screen rather than any page which uses the <form> tag to pass user entered parameters.


Reply With Quote