redirect out of ofbiz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

redirect out of ofbiz

joelfradkin@gmail.com
I have a EDI process where the supplier sends me the URL to go to.
I am having trouble as it always wants to stay inside ofbiz.
I pass "www.yahoo.com" into my redirect page (ftl).
And
<script language="JavaScript" type="text/javascript"> window.location = "${resultUrl}"; </script>results in:
<a href="http://172.16.6.59:8080/fia/control/http&#58;&#47;&#47;www.yahoo.com">http://172.16.6.59:8080/fia/control/http://www.yahoo.com
Any help is appreciated.
I tried doing the redirect in my java service that talks to the supplier using
response.sendRedirect(resultUrl);
but it did not seem to redirect at all?
I am getting the response HttpServletResponse response = (HttpServletResponse) context.get("response");
as this java is a service.
Joel Fradkin
Reply | Threaded
Open this post in threaded view
|

Re: redirect out of ofbiz

Jacques Le Roux
Administrator
Use something like

     <request-map uri="yahoo">
         <response name="success" type="url" value="http://www.yahoo.com"/>
     </request-map>

Jacques

Le 12/11/2014 22:58, [hidden email] a écrit :

> I have a EDI process where the supplier sends me the URL to go to.
> I am having trouble as it always wants to stay inside ofbiz.
> I pass "www.yahoo.com" into my redirect page (ftl).
> And
>
> results in:
> <a href="http://172.16.6.59:8080/fia/control/http&#58;&#47;&#47;www.yahoo.com">http://172.16.6.59:8080/fia/control/http&#58;&#47;&#47;www.yahoo.com
> Any help is appreciated.
> I tried doing the redirect in my java service that talks to the supplier
> using
> response.sendRedirect(resultUrl);
> but it did not seem to redirect at all?
> I am getting the response HttpServletResponse response =
> (HttpServletResponse) context.get("response");
> as this java is a service.
>
>
>
> -----
> Joel Fradkin
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/redirect-out-of-ofbiz-tp4658132.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: redirect out of ofbiz

joelfradkin@gmail.com
Thank you. Unfortunately the supplier supplies the URL and it is dynamic.
I get it in a java service at the moment.
I am suposed to send the user to the entire URL. Their example looked like.
 http://www.xyz.com/servlet/xyz?handler=punchthrough;ptid=LIRTVWYQSPN134I
it will be custom based on their ability to fill the P.O. allowing the user to alter the order on their web site.
Joel Fradkin
Reply | Threaded
Open this post in threaded view
|

Re: redirect out of ofbiz

joelfradkin@gmail.com
In reply to this post by Jacques Le Roux
Sorry I had asked the same question two ways.
The answer was to use a java event and use response.sendRedirect(resultUrl);
This only worked if it was a parameter to the java, when I had context and did a
HttpServletResponse response = (HttpServletResponse) context.get("response");
It did not work.
Thank  you for the idea, good to see how to do a fixed url using control.
Joel Fradkin