You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Giulio Fitini <g....@telecgt.it> on 2015/03/12 10:45:58 UTC

<@ofbizUrl> org.ofbiz.webapp.ftl.OfbizUrlTransform BUG

 

Hi to everyone!

 

I'm developing an application with   apache-ofbiz-12.04.01. 

 

My client have the necessity to put the system in production using a reverse
proxy.

 

So, in local when i test the application, i've an URL of this type :
https://127.0.0.1:8443/customsubmodule/control/main  and everything goes
well,

 

While, my client have an URL of this type :
<https://client.custom.domain/customProxy/customsubmodule/control/main>
https://client.custom.domain/customProxy/customsubmodule/control/main

 

So, as you can see....in client URL there is    "/customProxy" before my
submodule.

 

In my application, i have used always the tag
<@o...@ofbizUrl>.

 

There are some problems during the generation or redirect of the Link. I've
seen that many links are generated well, for example  :

 

      <li><a href=" <@o...@ofbizUrl>"><h4
style="font-size=125%;">${uiLabelMap.CommonLogout}</h4></a></li>

 

Generate well :
https://client.custom.domain/customProxy/customsubmodule/control/
<https://client.custom.domain/customProxy/customsubmodule/control/logout%20>
logout 

 

And in the same way the most of other links. 

 

While there are some other links like :

 

   jQuery("#tree").jstree({

        "plugins" : [ "themes", "json_data","ui" ,"cookies", "types"],

            "json_data" : {

                "data" : rawdata,

                          "ajax" : { "url" :
"<@o...@ofbizUrl>", "type" : "POST",

 

 

That try to call  :    https://client.custom.domain/customsubmodule/control/
<https://client.custom.domain/customsubmodule/control/getChild%20> getChild
without the proxy :   "/customProxy". before submodule 

So these kinds of submodules are not solved well.because try to call the URL
without the proxy.

 

I've seen in freemarker.properties   that the class used to transform the
tag <@ofbizUrl> is : org.ofbiz.webapp.ftl.OfbizUrlTransform , but seems that
there arent difference during the generation of the link from the first case
and the second case.. I've solved the second case putting a prefix like :

                          "ajax" : { "url" :
"/customProxy<@o...@ofbizUrl>", "type" : "POST",

 

but i want to solved generally this bug.

Any Idea??? 
Thanks in advance

 

 


R: I: <@ofbizUrl> org.ofbiz.webapp.ftl.OfbizUrlTransform BUG

Posted by Giulio Fitini <g....@telecgt.it>.
Sorry…..this is with link to image…

 

Hi Pierre,

actually in local     i've a 3 tier structure, with an apache Web Server, Ofbiz , and Database

 

 

http://imageshack.com/a/img910/2792/Q1UDZJ.png

 

And everything goes well.

 

While my customer  have a different architecture , with a “web-portal” that use a reverse proxy…to forward request to my application.  Like that…

 

http://imageshack.com/a/img661/6619/He24Bn.png

 

 

So what happen…..sometimes… OfBiz know how to create the right  ‘request’, and put in the URL /customProxy/ before the /customsubmodule/    (so can solve the requested control servlet) . 

While other times (and i think just when the <@ofbizUrl> is used in javascript or ajax link) don’t put the /customProxy/ before the URL, and don’t find the requested control servlet.

 

 

There is a way to tell to ofbiz that the base URL path have to include the /customProxy/  and then the requested servlet  ‘customsubmodule/control/main’ , like that :

 ‘  <https://client.custom.domain/customProxy/> https://client.custom.domain/customProxy/customsubmodule/control/main’  

 

‘ https://client.custom.domain/customProxy/ <https://client.custom.domain/customProxy/customsubmodule/control/addUser> customsubmodule/control/addUser’

 

…..

 

….  

 

Any Idea??  How can i solve generally this problem?

 

Thanks.

 

 

 

 

Da: Giulio Fitini [mailto:g.fitini@telecgt.it] 
Inviato: mercoledì 18 marzo 2015 11.51
A: user@ofbiz.apache.org
Oggetto: R: I: <@ofbizUrl> org.ofbiz.webapp.ftl.OfbizUrlTransform BUG

 

Hi Pierre,

actually in local     i've a 3 tier structure, with an apache Web Server, Ofbiz , and Database

 



And everything goes well.

 

While my customer  have a different architecture , with a “web-portal” that use a reverse proxy…to forward request to my application.  Like that…

 



 

So what happen…..sometimes… OfBiz know how to create the right  ‘request’, and put in the URL /customProxy/ before the /customsubmodule/    (so can solve the requested control servlet) . 

While other times (and i think just when the <@ofbizUrl> is used in javascript or ajax link) don’t put the /customProxy/ before the URL, and don’t find the requested control servlet.

 

 

There is a way to tell to ofbiz that the base URL path have to include the /customProxy/  and then the requested servlet  ‘customsubmodule/control/main’ , like that :

 ‘  <https://client.custom.domain/customProxy/> https://client.custom.domain/customProxy/customsubmodule/control/main’  

 

‘ https://client.custom.domain/customProxy/ <https://client.custom.domain/customProxy/customsubmodule/control/addUser> customsubmodule/control/addUser’

 

…..

 

….  

 

Any Idea??  How can i solve generally this problem?

 

Thanks.

 

 

-----Messaggio originale-----
Da: Pierre Smits [mailto:pierre.smits@gmail.com] 
Inviato: mercoledì 18 marzo 2015 10.17
A: user@ofbiz.apache.org <ma...@ofbiz.apache.org> 
Oggetto: Re: I: <@ofbizUrl> org.ofbiz.webapp.ftl.OfbizUrlTransform BUG

 

Hi Guilio,

 

Welcome!

 

Wouldn't it be easier to put a proxy server like Apache HTTP in front of OFBiz?

 

Best regards,

 

Pierre Smits

 

*ORRTIZ.COM < <http://www.orrtiz.com> http://www.orrtiz.com>*

Services & Solutions for Cloud-

Based Manufacturing, Professional

Services and Retail & Trade

 <http://www.orrtiz.com> http://www.orrtiz.com

 

On Wed, Mar 18, 2015 at 10:11 AM, Giulio Fitini < <ma...@telecgt.it> g.fitini@telecgt.it> wrote:

 

> REPOST!!

> 

> -----Messaggio originale-----

> Da: Giulio Fitini [ <ma...@telecgt.it> mailto:g.fitini@telecgt.it]

> Inviato: giovedì 12 marzo 2015 10.46

> A:  <ma...@ofbiz.apache.org> user@ofbiz.apache.org

> Oggetto: <@ofbizUrl> org.ofbiz.webapp.ftl.OfbizUrlTransform BUG

> 

> 

> 

> Hi to everyone!

> 

> 

> 

> I'm developing an application with   apache-ofbiz-12.04.01.

> 

> 

> 

> My client have the necessity to put the system in production using a 

> reverse proxy.

> 

> 

> 

> So, in local when i test the application, i've an URL of this type :

>  <https://127.0.0.1:8443/customsubmodule/control/main> https://127.0.0.1:8443/customsubmodule/control/main  and everything 

> goes well,

> 

> 

> 

> While, my client have an URL of this type :

> <https://client.custom.domain/customProxy/customsubmodule/control/main

> > 

>  <https://client.custom.domain/customProxy/customsubmodule/control/main> https://client.custom.domain/customProxy/customsubmodule/control/main

> 

> 

> 

> So, as you can see....in client URL there is    "/customProxy" before my

> submodule.

> 

> 

> 

> In my application, i have used always the tag 

> <@o...@ofbizUrl>.

> 

> 

> 

> There are some problems during the generation or redirect of the Link. 

> I've seen that many links are generated well, for example  :

> 

> 

> 

>       <li><a href=" <@o...@ofbizUrl>"><h4

> style="font-size=125%;">${uiLabelMap.CommonLogout}</h4></a></li>

> 

> 

> 

> Generate well :

>  <https://client.custom.domain/customProxy/customsubmodule/control/> https://client.custom.domain/customProxy/customsubmodule/control/

> <

>  <https://client.custom.domain/customProxy/customsubmodule/control/logou> https://client.custom.domain/customProxy/customsubmodule/control/logou

> t%20

> >

> logout

> 

> 

> 

> And in the same way the most of other links.

> 

> 

> 

> While there are some other links like :

> 

> 

> 

>    jQuery("#tree").jstree({

> 

>         "plugins" : [ "themes", "json_data","ui" ,"cookies", "types"],

> 

>             "json_data" : {

> 

>                 "data" : rawdata,

> 

>                           "ajax" : { "url" :

> "<@o...@ofbizUrl>", "type" : "POST",

> 

> 

> 

> 

> 

> That try to call  :

>  <https://client.custom.domain/customsubmodule/control/> https://client.custom.domain/customsubmodule/control/

> < <https://client.custom.domain/customsubmodule/control/getChild%20> https://client.custom.domain/customsubmodule/control/getChild%20>

> getChild

> without the proxy :   "/customProxy". before submodule

> 

> So these kinds of submodules are not solved well.because try to call 

> the URL without the proxy.

> 

> 

> 

> I've seen in freemarker.properties   that the class used to transform the

> tag <@ofbizUrl> is : org.ofbiz.webapp.ftl.OfbizUrlTransform , but 

> seems that there arent difference during the generation of the link 

> from the first case and the second case.. I've solved the second case 

> putting a prefix like :

> 

>                           "ajax" : { "url" :

> "/customProxy<@o...@ofbizUrl>", "type" : "POST",

> 

> 

> 

> but i want to solved generally this bug.

> 

> Any Idea???

> Thanks in advance

> 

> 

> 

> 

> 

> 

> 


R: I: <@ofbizUrl> org.ofbiz.webapp.ftl.OfbizUrlTransform BUG

Posted by Giulio Fitini <g....@telecgt.it>.
Hi Pierre,

actually in local     i've a 3 tier structure, with an apache Web Server, Ofbiz , and Database

 



And everything goes well.

 

While my customer  have a different architecture , with a “web-portal” that use a reverse proxy…to forward request to my application.  Like that…

 



 

So what happen…..sometimes… OfBiz know how to create the right  ‘request’, and put in the URL /customProxy/ before the /customsubmodule/    (so can solve the requested control servlet) . 

While other times (and i think just when the <@ofbizUrl> is used in javascript or ajax link) don’t put the /customProxy/ before the URL, and don’t find the requested control servlet.

 

 

There is a way to tell to ofbiz that the base URL path have to include the /customProxy/  and then the requested servlet  ‘customsubmodule/control/main’ , like that :

 ‘  <https://client.custom.domain/customProxy/> https://client.custom.domain/customProxy/customsubmodule/control/main’  

 

‘ https://client.custom.domain/customProxy/ <https://client.custom.domain/customProxy/customsubmodule/control/addUser> customsubmodule/control/addUser’

 

…..

 

….  

 

Any Idea??  How can i solve generally this problem?

 

Thanks.

 

 

-----Messaggio originale-----
Da: Pierre Smits [mailto:pierre.smits@gmail.com] 
Inviato: mercoledì 18 marzo 2015 10.17
A: user@ofbiz.apache.org
Oggetto: Re: I: <@ofbizUrl> org.ofbiz.webapp.ftl.OfbizUrlTransform BUG

 

Hi Guilio,

 

Welcome!

 

Wouldn't it be easier to put a proxy server like Apache HTTP in front of OFBiz?

 

Best regards,

 

Pierre Smits

 

*ORRTIZ.COM < <http://www.orrtiz.com> http://www.orrtiz.com>*

Services & Solutions for Cloud-

Based Manufacturing, Professional

Services and Retail & Trade

 <http://www.orrtiz.com> http://www.orrtiz.com

 

On Wed, Mar 18, 2015 at 10:11 AM, Giulio Fitini < <ma...@telecgt.it> g.fitini@telecgt.it> wrote:

 

> REPOST!!

> 

> -----Messaggio originale-----

> Da: Giulio Fitini [ <ma...@telecgt.it> mailto:g.fitini@telecgt.it]

> Inviato: giovedì 12 marzo 2015 10.46

> A:  <ma...@ofbiz.apache.org> user@ofbiz.apache.org

> Oggetto: <@ofbizUrl> org.ofbiz.webapp.ftl.OfbizUrlTransform BUG

> 

> 

> 

> Hi to everyone!

> 

> 

> 

> I'm developing an application with   apache-ofbiz-12.04.01.

> 

> 

> 

> My client have the necessity to put the system in production using a 

> reverse proxy.

> 

> 

> 

> So, in local when i test the application, i've an URL of this type :

>  <https://127.0.0.1:8443/customsubmodule/control/main> https://127.0.0.1:8443/customsubmodule/control/main  and everything 

> goes well,

> 

> 

> 

> While, my client have an URL of this type :

> <https://client.custom.domain/customProxy/customsubmodule/control/main

> > 

>  <https://client.custom.domain/customProxy/customsubmodule/control/main> https://client.custom.domain/customProxy/customsubmodule/control/main

> 

> 

> 

> So, as you can see....in client URL there is    "/customProxy" before my

> submodule.

> 

> 

> 

> In my application, i have used always the tag 

> <@o...@ofbizUrl>.

> 

> 

> 

> There are some problems during the generation or redirect of the Link. 

> I've seen that many links are generated well, for example  :

> 

> 

> 

>       <li><a href=" <@o...@ofbizUrl>"><h4

> style="font-size=125%;">${uiLabelMap.CommonLogout}</h4></a></li>

> 

> 

> 

> Generate well :

>  <https://client.custom.domain/customProxy/customsubmodule/control/> https://client.custom.domain/customProxy/customsubmodule/control/

> <

>  <https://client.custom.domain/customProxy/customsubmodule/control/logou> https://client.custom.domain/customProxy/customsubmodule/control/logou

> t%20

> >

> logout

> 

> 

> 

> And in the same way the most of other links.

> 

> 

> 

> While there are some other links like :

> 

> 

> 

>    jQuery("#tree").jstree({

> 

>         "plugins" : [ "themes", "json_data","ui" ,"cookies", "types"],

> 

>             "json_data" : {

> 

>                 "data" : rawdata,

> 

>                           "ajax" : { "url" :

> "<@o...@ofbizUrl>", "type" : "POST",

> 

> 

> 

> 

> 

> That try to call  :

>  <https://client.custom.domain/customsubmodule/control/> https://client.custom.domain/customsubmodule/control/

> < <https://client.custom.domain/customsubmodule/control/getChild%20> https://client.custom.domain/customsubmodule/control/getChild%20>

> getChild

> without the proxy :   "/customProxy". before submodule

> 

> So these kinds of submodules are not solved well.because try to call 

> the URL without the proxy.

> 

> 

> 

> I've seen in freemarker.properties   that the class used to transform the

> tag <@ofbizUrl> is : org.ofbiz.webapp.ftl.OfbizUrlTransform , but 

> seems that there arent difference during the generation of the link 

> from the first case and the second case.. I've solved the second case 

> putting a prefix like :

> 

>                           "ajax" : { "url" :

> "/customProxy<@o...@ofbizUrl>", "type" : "POST",

> 

> 

> 

> but i want to solved generally this bug.

> 

> Any Idea???

> Thanks in advance

> 

> 

> 

> 

> 

> 

> 


Re: I: <@ofbizUrl> org.ofbiz.webapp.ftl.OfbizUrlTransform BUG

Posted by Pierre Smits <pi...@gmail.com>.
Hi Guilio,

Welcome!

Wouldn't it be easier to put a proxy server like Apache HTTP in front of
OFBiz?

Best regards,

Pierre Smits

*ORRTIZ.COM <http://www.orrtiz.com>*
Services & Solutions for Cloud-
Based Manufacturing, Professional
Services and Retail & Trade
http://www.orrtiz.com

On Wed, Mar 18, 2015 at 10:11 AM, Giulio Fitini <g....@telecgt.it> wrote:

> REPOST!!
>
> -----Messaggio originale-----
> Da: Giulio Fitini [mailto:g.fitini@telecgt.it]
> Inviato: giovedì 12 marzo 2015 10.46
> A: user@ofbiz.apache.org
> Oggetto: <@ofbizUrl> org.ofbiz.webapp.ftl.OfbizUrlTransform BUG
>
>
>
> Hi to everyone!
>
>
>
> I'm developing an application with   apache-ofbiz-12.04.01.
>
>
>
> My client have the necessity to put the system in production using a
> reverse
> proxy.
>
>
>
> So, in local when i test the application, i've an URL of this type :
> https://127.0.0.1:8443/customsubmodule/control/main  and everything goes
> well,
>
>
>
> While, my client have an URL of this type :
> <https://client.custom.domain/customProxy/customsubmodule/control/main>
> https://client.custom.domain/customProxy/customsubmodule/control/main
>
>
>
> So, as you can see....in client URL there is    "/customProxy" before my
> submodule.
>
>
>
> In my application, i have used always the tag
> <@o...@ofbizUrl>.
>
>
>
> There are some problems during the generation or redirect of the Link. I've
> seen that many links are generated well, for example  :
>
>
>
>       <li><a href=" <@o...@ofbizUrl>"><h4
> style="font-size=125%;">${uiLabelMap.CommonLogout}</h4></a></li>
>
>
>
> Generate well :
> https://client.custom.domain/customProxy/customsubmodule/control/
> <
> https://client.custom.domain/customProxy/customsubmodule/control/logout%20
> >
> logout
>
>
>
> And in the same way the most of other links.
>
>
>
> While there are some other links like :
>
>
>
>    jQuery("#tree").jstree({
>
>         "plugins" : [ "themes", "json_data","ui" ,"cookies", "types"],
>
>             "json_data" : {
>
>                 "data" : rawdata,
>
>                           "ajax" : { "url" :
> "<@o...@ofbizUrl>", "type" : "POST",
>
>
>
>
>
> That try to call  :
> https://client.custom.domain/customsubmodule/control/
> <https://client.custom.domain/customsubmodule/control/getChild%20>
> getChild
> without the proxy :   "/customProxy". before submodule
>
> So these kinds of submodules are not solved well.because try to call the
> URL
> without the proxy.
>
>
>
> I've seen in freemarker.properties   that the class used to transform the
> tag <@ofbizUrl> is : org.ofbiz.webapp.ftl.OfbizUrlTransform , but seems
> that
> there arent difference during the generation of the link from the first
> case
> and the second case.. I've solved the second case putting a prefix like :
>
>                           "ajax" : { "url" :
> "/customProxy<@o...@ofbizUrl>", "type" : "POST",
>
>
>
> but i want to solved generally this bug.
>
> Any Idea???
> Thanks in advance
>
>
>
>
>
>
>

I: <@ofbizUrl> org.ofbiz.webapp.ftl.OfbizUrlTransform BUG

Posted by Giulio Fitini <g....@telecgt.it>.
REPOST!!

-----Messaggio originale-----
Da: Giulio Fitini [mailto:g.fitini@telecgt.it] 
Inviato: giovedì 12 marzo 2015 10.46
A: user@ofbiz.apache.org
Oggetto: <@ofbizUrl> org.ofbiz.webapp.ftl.OfbizUrlTransform BUG

 

Hi to everyone!

 

I'm developing an application with   apache-ofbiz-12.04.01. 

 

My client have the necessity to put the system in production using a reverse
proxy.

 

So, in local when i test the application, i've an URL of this type :
https://127.0.0.1:8443/customsubmodule/control/main  and everything goes
well,

 

While, my client have an URL of this type :
<https://client.custom.domain/customProxy/customsubmodule/control/main>
https://client.custom.domain/customProxy/customsubmodule/control/main

 

So, as you can see....in client URL there is    "/customProxy" before my
submodule.

 

In my application, i have used always the tag
<@o...@ofbizUrl>.

 

There are some problems during the generation or redirect of the Link. I've
seen that many links are generated well, for example  :

 

      <li><a href=" <@o...@ofbizUrl>"><h4
style="font-size=125%;">${uiLabelMap.CommonLogout}</h4></a></li>

 

Generate well :
https://client.custom.domain/customProxy/customsubmodule/control/
<https://client.custom.domain/customProxy/customsubmodule/control/logout%20>
logout 

 

And in the same way the most of other links. 

 

While there are some other links like :

 

   jQuery("#tree").jstree({

        "plugins" : [ "themes", "json_data","ui" ,"cookies", "types"],

            "json_data" : {

                "data" : rawdata,

                          "ajax" : { "url" :
"<@o...@ofbizUrl>", "type" : "POST",

 

 

That try to call  :    https://client.custom.domain/customsubmodule/control/
<https://client.custom.domain/customsubmodule/control/getChild%20> getChild
without the proxy :   "/customProxy". before submodule 

So these kinds of submodules are not solved well.because try to call the URL
without the proxy.

 

I've seen in freemarker.properties   that the class used to transform the
tag <@ofbizUrl> is : org.ofbiz.webapp.ftl.OfbizUrlTransform , but seems that
there arent difference during the generation of the link from the first case
and the second case.. I've solved the second case putting a prefix like :

                          "ajax" : { "url" :
"/customProxy<@o...@ofbizUrl>", "type" : "POST",

 

but i want to solved generally this bug.

Any Idea??? 
Thanks in advance