struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grish <>
Subject Re: [S2] Parameterized File Downloading
Date Fri, 03 Aug 2007 03:02:26 GMT

Ok, I finally see the error of my ways:

I originally defined my parameter like this:
<s:param name="inputPath" value="/images/bg_pattern.gif" />

when it should be like this:

<s:param name="inputPath" value="%{'/images/bg_pattern.gif'}" />

now the proper string is passed.
Thanks so much for the help!

DNewfield wrote:
> Grish wrote:
>> <s:url id="downloadUrl" action="download" namespace="/filedownload">
>>   <s:param name="inputPath" value="/images/test.gif" />
>> </s:url>
>> <s:a href="%{downloadUrl}">Get image</s:a>
> So does this generate a link relative to your webapp of 
> filedownload/download.action?inputPath=/images/test.gif
> ?
> ( note, ".action" could be ".do", ".html" or whatever you have that 
> extension set to, apparently even "".  (I may have to try that in my 
> app...) )
> If so, then the problem is somewhere between the receipt of the request 
> and the handoff after the execute() method is run from the bean defined 
> as fileDownloadAction.  I leave it to you to trace through the process.
> Is the setter being called?  In the execute method is there a value?  Is 
> it using the class you think it's using?  You can specify a method 
> (other than the default execute) if you'd like to put your checks there.
> -Dale
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message