I am struts beginner, and everything was working ok until I hit the following.
I’m passing the xml string from jsp to the action servlet:
<display:column property="orderSourceId" sortable="true" title="Source Id" href="/DroppedOrderReporter/export.do?method=exportSourceOrder" paramId="id" paramProperty="detailXml" sortable="true" align="center" headerClass="sortable"/>
This is working ok, unless the string (detailXml) is bigger then 4028 characters and that is the case pretty often.
I tried to pass by name:
<display:column property="orderSourceId" sortable="true" title="Source Id" href="/DroppedOrderReporter/export.do?method=exportSourceOrder" paramId="id" paramName=”Order” paramProperty="detailXml" sortable="true" align="center" headerClass="sortable"/>
And this one is not working.
The following is my action class
public ActionForward exportSourceOrder(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
try {
String xmlDoc = request.getParameter("id");
if (xmlDoc == null) {
webLogger.debug("ExportAction xmlDoc is null.");
}
webLogger.debug("xmlDoc: " + xmlDoc);
return writeData(xmlDoc, response);
} catch (Exception e) {
throw new ServletException(e);
}
}
Do I have to change my action class when I’m passing by name, or something else?
Or, if you have any other idea how to pass xml from jsp to action class, please let me know.
I’m passing the xml string from jsp to the action servlet:
<display:column property="orderSourceId" sortable="true" title="Source Id" href="/DroppedOrderReporter/export.do?method=exportSourceOrder" paramId="id" paramProperty="detailXml" sortable="true" align="center" headerClass="sortable"/>
This is working ok, unless the string (detailXml) is bigger then 4028 characters and that is the case pretty often.
I tried to pass by name:
<display:column property="orderSourceId" sortable="true" title="Source Id" href="/DroppedOrderReporter/export.do?method=exportSourceOrder" paramId="id" paramName=”Order” paramProperty="detailXml" sortable="true" align="center" headerClass="sortable"/>
And this one is not working.
The following is my action class
public ActionForward exportSourceOrder(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
try {
String xmlDoc = request.getParameter("id");
if (xmlDoc == null) {
webLogger.debug("ExportAction xmlDoc is null.");
}
webLogger.debug("xmlDoc: " + xmlDoc);
return writeData(xmlDoc, response);
} catch (Exception e) {
throw new ServletException(e);
}
}
Do I have to change my action class when I’m passing by name, or something else?
Or, if you have any other idea how to pass xml from jsp to action class, please let me know.