PDA

View Full Version : Redirect into command bean


Rbald544
Mar 17th, 2006, 07:54 AM
Does the DispatcherServlet handle incoming parameters from other applications? I can't get this to work...

The following code snippet is basically what I'm trying to do. I know that I could make this work outside of the Spring MVC, but I don't want to do that.

<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>

<c:redirect url="http://occluded-d:8080/CDOALP/cdoselect.cmd">
<c:param name="datasetabbv" value="10"/>
<c:param name="countryabbv" value=""/>
<c:param name="georegionabbv" value=""/>
</c:redirect>

cdoselect.cmd is a pattern in action-servlet.xml which creates a CdoSelectCommand bean.

web.xml==>

<servlet>
<servlet-name>action</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.cmd</url-pattern>
</servlet-mapping>


This bean should be able to access the parameter list w/ the typical

String datasetabbv = request.getParameter("datasetabbv"), but these are showing up as null.

Passing parameters from 1 command bean to another works fine, but I must be missing something trying to pass parameters from a regular jsp into a Spring command bean/jsp.

Rich