Isn't it closed with the /> in the end?

<s:param name="inputPath" value="/images/bg_pattern.gif" />

I just copied the examples in the tutorials and url examples:
http://struts.apache.org/2.x/docs/url.html


nuwan chandrasoma-2 wrote:
> 
> Hi,
> 
> Is it a typo, I dont see a </s:param> tag in ur code?
> 
> Thanks,
> 
> Nuwan
> 
> Grish wrote:
>> I studied the struts showcase sample of file downloading. I wanted to do
>> something similar but instead of setting the inputPath paremeter in
>> struts.xml I wanted to pass it in the url. I was thinking of using the
>> same
>> action for several downloads and I would just pass the inputPath. But
>> when I
>> tried using the following:
>>
>> <s:url id="downloadUrl" action="download" namespace="/filedownload">
>>          <s:param name="inputPath" value="/images/bg_pattern.gif"/>
>> <s:a href="%{downloadUrl}">download file</s:a>
>>
>> and I took out the inputPath param in the struts.xml:
>>
>> <action name="download" class="fileDownloadAction" >
>>   <result name="success" type="stream">
>>     image/gif
>>     inputStream
>>     filename="test.gif"
>>     4096
>>   </result>
>> </action>
>>
>> I noticed that my inputPath would be null and I would get the following
>> error:
>>
>> java.lang.IllegalArgumentException: Can not find a java.io.InputStream
>> with
>> the name [inputStream] in the invocation stack
>>
>> Is there another way i should be setting my inputPath parameter for my
>> File
>> or do I just have to make a lot of actions for each of my download?
>>
>>
>>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2--Parameterized-File-Downloading-tf4191759.html#a11938302
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to