Message Boards
Create a resourceURL with parameters from a HTML input form?
Create a resourceURL with parameters from a HTML input form?
Expert Posts: 490 Join Date: 6/9/08 Recent PostsI would like to provide parameters to a resourceURL through an HTML input form in my JSP page.
Background: the resourceAction will generate an output file, but the generation can be parameterized through values in the HTML input form.
Is a resourceURL the right choice for this? Or should I use an actionURL - but so far I only found examples for providing a download through resourceURLs not through actionURLs. However it seems I can't use an ActionResponse with PortletResponseUtil.sendFile()
Thanks
RE: Create a resourceURL with parameters from a HTML input form? (Answer)
Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent PostsIf you want the output file to be served to the client as a result of the form submission, resourceURL is your friend. A portlet action always results in a rendering of the full page, never in any arbitrary file being served. A resource activity always gives you full control over the result, its Mime type, etc.
RE: RE: Create a resourceURL with parameters from a HTML input form?
Expert Posts: 490 Join Date: 6/9/08 Recent PostsThanks.
After I realized that the resourceURL will still post the whole form content I was able to get this to work with a resourceURL.