Hi,
It will run, but if there is anything which tries to print anything to the
client, then it will fail. In earlier Jaggery versions, we didn't have a
way to stop the flow, but later we introduced exit(); method which suddenly
break and returns the flow.
In case, you don't have it, you can always wrap your code in an anonymous
function and return after redirect. i.e.
If you have a return at code 1, only A will be send to the client. If the
return was at 2, both A and B will be sent to the client.
/Ruchira
<% (function() { %>
A
....
<%
//jaggery code 1
%>
B
....
<%
//jaggery code 2
%>
C
....
<% }()); %>
On Thu, Jun 11, 2015 at 1:28 PM, Danushka Fernando <[email protected]>
wrote:
> Hi
> Say we write some code after response.sendRedirect call. Then how would
> it behave?
> Will that code be run after the redirection or will redirection happen in
> the end?
> Found some code like that in AF. Not sure how would it behave. First I
> thought it will never run. But found that it's running but not sure when.
>
> Thanks & Regards
> Danushka Fernando
> Senior Software Engineer
> WSO2 inc. http://wso2.com/
> Mobile : +94716332729
>
--
*Ruchira Wageesha**Technical Lead*
*WSO2 Inc. - lean . enterprise . middleware | wso2.com <http://wso2.com>*
*email: [email protected] <[email protected]>, blog:
ruchirawageesha.blogspot.com <http://ruchirawageesha.blogspot.com>,
mobile: +94 77 5493444*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev