ismy controller does not work and I don't understand why here is it:
class FormmakerController {
def fileManipulatorService
def index = { }
def idProcessor = {
String idToProcess = params.urlEncParam
//Params lookalike urlEncParam:301-303-304-305
if(idToProcess != null){
String globalForm = ''
idToProcess.split('-').each {item->
globalForm += fileManipulatorService.fileProvider(item).getText()
}
//render(text: globalForm, contentType: "text/xml", encoding: "ISO-8859-1")
//response.sendError(200)
redirect(controller: 'tools', action: 'index', params: [globalForm: String])
}}}
Note : the controller is called from an ajax request and my redirect instruction need to call an action in a different controller with Text params. Thanks for your help.
The params on your redirect looks incorrect. Try:
redirect(controller: 'tools', action: 'index', params: [globalForm: globalForm])