You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Greg Lindholm <gl...@yahoo.com> on 2008/08/21 17:04:45 UTC
[S2] Result Stream can't find InputStream
Using Struts 2.0.11.1.
I get this exception:
2008-08-21 10:50:17,859 ERROR org.apache.struts2.dispatcher.StreamResult:188 - Can not find a java.io.InputStream with the name [inputStream] in the invocation stack. Check the <param name="inputName"> tag specified for this action.
2008-08-21 10:50:18,640 ERROR org.apache.struts2.dispatcher.StreamResult:188 - Can not find a java.io.InputStream with the name [inputStream] in the invocation stack. Check the <param name="inputName"> tag specified for this action.
2008-08-21 10:50:19,250 ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/nxm].[default]:253 - Servlet.service() for servlet default threw exception
java.lang.IllegalArgumentException: Can not find a java.io.InputStream with the name [inputStream] in the invocation stack. Check the <param name="inputName"> tag specified for this action.
at org.apache.struts2.dispatcher.StreamResult.doExecute(StreamResult.java:189)
at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178)
at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
I searched nabble and found several reports like this but couldn't find a resolution.
>From struts.xml:
<action name="LogEntryExportCsv"
class="com.nexmobile.server.struts.LogEntryExportAction" method="doCsv">
<result name="success" type="stream">
<param name="contentType">text/csv</param>
<param name="inputName">inputStream</param>
<param name="contentDisposition">filename="${csvFilename}"</param>
<param name="bufferSize">1024</param>
</result>
</action>
>From the action:
public InputStream getInputStream() throws Exception
{ ...}
I saw one suggestion in my nabble search to remove the "throws Exception", I tried this but made no difference, so I put it back to match the showcase example.
Please cc me directly on the reply, as I only get the daily digest of the list.
Thanks for any help.
Greg
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2] Result Stream can't find InputStream
Posted by Greg Lindholm <gl...@yahoo.com>.
Never mind.... getInputStream() was throwing an exception that I wasn't
seeing.
Works great now.
Greg Lindholm wrote:
>
> Using Struts 2.0.11.1.
>
> I get this exception:
> 2008-08-21 10:50:17,859 ERROR
> org.apache.struts2.dispatcher.StreamResult:188 - Can not find a
> java.io.InputStream with the name [inputStream] in the invocation stack.
> Check the tag specified for this action.
> 2008-08-21 10:50:18,640 ERROR
> org.apache.struts2.dispatcher.StreamResult:188 - Can not find a
> java.io.InputStream with the name [inputStream] in the invocation stack.
> Check the tag specified for this action.
> 2008-08-21 10:50:19,250 ERROR
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/nxm].[default]:253
> - Servlet.service() for servlet default threw exception
> java.lang.IllegalArgumentException: Can not find a java.io.InputStream
> with the name [inputStream] in the invocation stack. Check the tag
> specified for this action.
> at
> org.apache.struts2.dispatcher.StreamResult.doExecute(StreamResult.java:189)
> at
> org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178)
> at
> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
> at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
>
> I searched nabble and found several reports like this but couldn't find a
> resolution.
>
> From struts.xml:
> <action name="LogEntryExportCsv"
> class="com.nexmobile.server.struts.LogEntryExportAction"
> method="doCsv">
> <result name="success" type="stream">
> text/csv
> inputStream
> filename="${csvFilename}"
> 1024
> </result>
> </action>
>
> From the action:
> public InputStream getInputStream() throws Exception
> { ...}
>
> I saw one suggestion in my nabble search to remove the "throws Exception",
> I tried this but made no difference, so I put it back to match the
> showcase example.
>
> Please cc me directly on the reply, as I only get the daily digest of the
> list.
>
> Thanks for any help.
> Greg
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/-S2--Result-Stream-can%27t-find-InputStream-tp19090722p19093987.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org