struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Lindholm <glindh...@yahoo.com>
Subject Re: [S2] Result Stream can't find InputStream
Date Thu, 21 Aug 2008 18:07:07 GMT

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


Mime
View raw message