FAQ

[Struts-user] [S2] Result Stream can't find InputStream

Greg Lindholm
Aug 21, 2008 at 3:05 pm
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
reply

Search Discussions

1 response

  • Greg Lindholm at Aug 21, 2008 at 6:07 pm
    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

Related Discussions

Discussion Navigation
viewthread | post

1 user in discussion

Greg Lindholm: 2 posts