I have a requirement where I need to do a response.sendRedirect("to_some_url"). On running the cselement the page does not get redirected.
I cannot use either META="refresh" or window.location.
Please advice how can the page be redirected.
This is not supported as the response is already committed by time this code is reached.
You have 2 options:
- Add a J2EE servlet filter that performs response redirect
- Add an XML code element that calls a Java Wrapper as the first executed code in the calling stack and set the response redirect here.
I'm pretty sure the second option will work, however this will needs to be tested.
Regards,
Declan
it will be very helpful if you can post a sample code snippet
"Add an XML code element that calls a Java Wrapper" : - Do you mean creating a CSElement of XML type to call a Java class ? Or you referring to the web configuration xml file ?
It looks like you're new here. If you want to get involved, click one of these buttons!