You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Jacopo Cappellato <ti...@sastau.it> on 2007/08/09 09:53:29 UTC

How to render Chinese characters in OFBiz PDF reports?

Hi all,

I know this is not probably an OFBiz related issue but I know that we 
have several Chinese users and maybe this can be of interest for others...
I'm having issues displaying Chinese characters in the OFBiz PDF reports 
(invoice, order etc...) created with xsl-fo: they appear as '####'.

I did some research in the Internet and the problem seems related to the 
font family used that doesn't include the Chinese fonts.
I have tried to set a different font-family in the template's fo:root 
element, but unfortunately I couldn't find a font family that supports 
the Chinese characters (e.g. I've tried with Arial in an Ubuntu box).

I've also found some instructions on how to generate an ad-hoc xml file 
with the necessary font family description, to be embedded in the pdf 
reports by FOP... but the steps were not very clear to me (especially, 
how to map them to the OFBiz framework).

Any hints on how I can solve this issue?

Thanks!

Jacopo





Re: How to render Chinese characters in OFBiz PDF reports?

Posted by BJ Freeman <bj...@free-man.net>.
sounds like something in the pdf code is effecting what it put in the
output file.
I did a google on
pdf output not chinesses
there are hits that explain this bug


Jacopo Cappellato sent the following on 8/12/2007 10:52 AM:
> I can see the right characters in the html page, but not in the PDF page...
> 
> Jacopo
> 
> BJ Freeman wrote:
>> there can be many things that effect this.
>> first is if they pdf is creating the correct code-set for the character.
>> Second is if the Language is selected for the OS.
>> third is if the fonts sets that support that language are loaded.
>>
>>
>> Jacopo Cappellato sent the following on 8/9/2007 12:53 AM:
>>> Hi all,
>>>
>>> I know this is not probably an OFBiz related issue but I know that we
>>> have several Chinese users and maybe this can be of interest for
>>> others...
>>> I'm having issues displaying Chinese characters in the OFBiz PDF reports
>>> (invoice, order etc...) created with xsl-fo: they appear as '####'.
>>>
>>> I did some research in the Internet and the problem seems related to the
>>> font family used that doesn't include the Chinese fonts.
>>> I have tried to set a different font-family in the template's fo:root
>>> element, but unfortunately I couldn't find a font family that supports
>>> the Chinese characters (e.g. I've tried with Arial in an Ubuntu box).
>>>
>>> I've also found some instructions on how to generate an ad-hoc xml file
>>> with the necessary font family description, to be embedded in the pdf
>>> reports by FOP... but the steps were not very clear to me (especially,
>>> how to map them to the OFBiz framework).
>>>
>>> Any hints on how I can solve this issue?
>>>
>>> Thanks!
>>>
>>> Jacopo
>>>
>>>
>>>
>>>
>>>
>>>
>>>
> 
> 
> 
> 

Re: How to render Chinese characters in OFBiz PDF reports?

Posted by Jacopo Cappellato <ti...@sastau.it>.
I can see the right characters in the html page, but not in the PDF page...

Jacopo

BJ Freeman wrote:
> there can be many things that effect this.
> first is if they pdf is creating the correct code-set for the character.
> Second is if the Language is selected for the OS.
> third is if the fonts sets that support that language are loaded.
> 
> 
> Jacopo Cappellato sent the following on 8/9/2007 12:53 AM:
>> Hi all,
>>
>> I know this is not probably an OFBiz related issue but I know that we
>> have several Chinese users and maybe this can be of interest for others...
>> I'm having issues displaying Chinese characters in the OFBiz PDF reports
>> (invoice, order etc...) created with xsl-fo: they appear as '####'.
>>
>> I did some research in the Internet and the problem seems related to the
>> font family used that doesn't include the Chinese fonts.
>> I have tried to set a different font-family in the template's fo:root
>> element, but unfortunately I couldn't find a font family that supports
>> the Chinese characters (e.g. I've tried with Arial in an Ubuntu box).
>>
>> I've also found some instructions on how to generate an ad-hoc xml file
>> with the necessary font family description, to be embedded in the pdf
>> reports by FOP... but the steps were not very clear to me (especially,
>> how to map them to the OFBiz framework).
>>
>> Any hints on how I can solve this issue?
>>
>> Thanks!
>>
>> Jacopo
>>
>>
>>
>>
>>
>>
>>


Re: How to render Chinese characters in OFBiz PDF reports?

Posted by BJ Freeman <bj...@free-man.net>.
there can be many things that effect this.
first is if they pdf is creating the correct code-set for the character.
Second is if the Language is selected for the OS.
third is if the fonts sets that support that language are loaded.


Jacopo Cappellato sent the following on 8/9/2007 12:53 AM:
> Hi all,
> 
> I know this is not probably an OFBiz related issue but I know that we
> have several Chinese users and maybe this can be of interest for others...
> I'm having issues displaying Chinese characters in the OFBiz PDF reports
> (invoice, order etc...) created with xsl-fo: they appear as '####'.
> 
> I did some research in the Internet and the problem seems related to the
> font family used that doesn't include the Chinese fonts.
> I have tried to set a different font-family in the template's fo:root
> element, but unfortunately I couldn't find a font family that supports
> the Chinese characters (e.g. I've tried with Arial in an Ubuntu box).
> 
> I've also found some instructions on how to generate an ad-hoc xml file
> with the necessary font family description, to be embedded in the pdf
> reports by FOP... but the steps were not very clear to me (especially,
> how to map them to the OFBiz framework).
> 
> Any hints on how I can solve this issue?
> 
> Thanks!
> 
> Jacopo
> 
> 
> 
> 
> 
> 
> 

Re: How to render Chinese characters in OFBiz PDF reports?

Posted by Jacopo Cappellato <ti...@sastau.it>.
Oleg,

thanks for all the valuable information.
I've finally managed to make it work using the SimHei font; it doesn't 
work with the Arial font.
I really don't know why but for now it is perfectly fine for me to use 
the SimHei font.

Thanks!

Jacopo


Oleg Andreyev wrote:
> Jacopo,
> 
> Currently I have no own suggestions but let me attract your attention to 
> these quotations:
> 
> 6.2. Some characters are not displayed, or displayed incorrectly, or 
> displayed as “#”.
> This usually means the selected font doesn't have a glyph for the 
> character. The standard text fonts supplied with Acrobat Reader have 
> mostly glyphs for characters from the ISO Latin 1 character set. For a 
> variety of reasons, even those are not completely guaranteed to work, 
> for example you can't use the fi ligature from the standard serif font. 
> Check the overview for the default PDF fonts.
> 
> If you use your own fonts, the font must have a glyph for the desired 
> character. Furthermore the font must be available on the machine where 
> the PDF is viewed or it must have been embedded in the PDF file. See 
> embedding fonts.
> 
> For most symbols, it is better to select the symbol font explicitely, 
> for example in order to get the symbol for the mathematical empty set, 
> write:
> <fo:inline font-family="Symbol">&#x2205;</fo:inline>
> The "#" shows up if the selected font does not define a glyph for the 
> required character, for example if you try:
> <fo:inline font-family="Helvetica">&#x2205;</fo:inline>
> 
> and
> 
> 
> The "Symbol" and "ZapfDingbats" fonts, however, currently present a 
> problem because FOP cannot correctly determine the encoding of
> these two single-byte fonts through the PFM file. FOP now correctly 
> interprets the "encoding" value in the XML font metrics file, but the 
> PFMReader application writes "UnknownEncoding" to the generated XML 
> file. In order to embed "Symbol" and "ZapfDingbats" you have to
> manually change the XML font metrics file and specify "SymbolEncoding" 
> or "ZapfdingbatsEncoding" encoding respectively as the value for the 
> "encoding" element.
> Example:
> <?xml version="1.0" encoding="UTF-8"?>
> <font-metrics type="TYPE1">
> <font-name>Symbol</font-name>
> <embed/>
> <encoding>SymbolEncoding</encoding>
> <cap-height>673</cap-height>
> <x-height>766</x-height>
> 
> I will try reproduce this problem and work on it but I really don't know 
> when.
> 
> 
> 
> Jacopo Cappellato пишет:
>> Oleg,
>>
>> first of all, thanks for your notes.
>> I did what you have suggested (even if I just created the "normal" 
>> Arial font metrics, not the ones for bold and italics); now I can see 
>> in the PDF two small boxes instead of the ## characters... 
>> unfortunately I still can't see ideograms :-(
>>
>> Do you have any ideas about this issue?
>>
>> Jacopo
>>
>> Oleg Andreyev wrote:
>>> Jacopo Cappellato пишет:
>>>> Hi all,
>>>>
>>>> I know this is not probably an OFBiz related issue but I know that 
>>>> we have several Chinese users and maybe this can be of interest for 
>>>> others...
>>>> I'm having issues displaying Chinese characters in the OFBiz PDF 
>>>> reports (invoice, order etc...) created with xsl-fo: they appear as 
>>>> '####'.
>>> Of course. Currently Ofbiz printing subsystem doesn't work if 
>>> document uses any charsets out Latin-1. (May be work for localized 
>>> readers).
>>>> I did some research in the Internet and the problem seems related to 
>>>> the font family used that doesn't include the Chinese fonts.
>>>> I have tried to set a different font-family in the template's 
>>>> fo:root element, but unfortunately I couldn't find a font family 
>>>> that supports the Chinese characters (e.g. I've tried with Arial in 
>>>> an Ubuntu box).
>>>>
>>> I was searching in Google and seen many links to free Chinese fonts 
>>> but if you will try use font-family that have required characters the 
>>> result will be the same. You have to embed used fonts to pdf.
>>>> I've also found some instructions on how to generate an ad-hoc xml 
>>>> file with the necessary font family description, to be embedded in 
>>>> the pdf reports by FOP... but the steps were not very clear to me 
>>>> (especially, how to map them to the OFBiz framework).
>>>>
>>>> Any hints on how I can solve this issue?
>>> Steps below apply to cyrillic fonts, but I hope Chinese too.
>>> 1. Create FOP config file. Ready for use one attached to 
>>> https://issues.apache.org/jira/browse/OFBIZ-1110.
>>> 2. Create font metrics for given font. 
>>> (http://xmlgraphics.apache.org/fop/0.93/fonts.html)
>>> 3. Place fonts and metrics to framework/widget/config
>>> 4. Add to fop.xconf font triplets
>>> Example from my config
>>>
>>> <renderer mime="application/pdf">
>>> <fonts>
>>> <font metrics-url="arial.xml" kerning="yes" embed-url="arial.ttf">
>>> <font-triplet name="Arial" style="normal" weight="normal"/>
>>> <font-triplet name="ArialMT" style="normal" weight="normal"/>
>>> </font>
>>> <font metrics-url="arialbd.xml" kerning="yes" embed-url="arialbd.ttf">
>>> <font-triplet name="Arial" style="normal" weight="bold"/>
>>> <font-triplet name="ArialMT" style="normal" weight="bold"/>
>>> </font>
>>> <font metrics-url="ariali.xml" kerning="yes" embed-url="ariali.ttf">
>>> <font-triplet name="Arial" style="italic" weight="normal"/>
>>> <font-triplet name="ArialMT" style="italic" weight="normal"/>
>>> </font>
>>> <font metrics-url="arialbi.xml" kerning="yes" embed-url="arialbi.ttf">
>>> <font-triplet name="Arial" style="italic" weight="bold"/>
>>> <font-triplet name="ArialMT" style="italic" weight="bold"/>
>>> </font>
>>> </fonts>
>>> </renderer>
>>> 5. Modify fo.ftl to use font-family="Arial"
>>>
>>> Oleg
>>
>>
>>
> 



Re: How to render Chinese characters in OFBiz PDF reports?

Posted by Oleg Andreyev <td...@mail.ru>.
Jacopo,

Currently I have no own suggestions but let me attract your attention to 
these quotations:

6.2. Some characters are not displayed, or displayed incorrectly, or 
displayed as “#”.
This usually means the selected font doesn't have a glyph for the 
character. The standard text fonts supplied with Acrobat Reader have 
mostly glyphs for characters from the ISO Latin 1 character set. For a 
variety of reasons, even those are not completely guaranteed to work, 
for example you can't use the fi ligature from the standard serif font. 
Check the overview for the default PDF fonts.

If you use your own fonts, the font must have a glyph for the desired 
character. Furthermore the font must be available on the machine where 
the PDF is viewed or it must have been embedded in the PDF file. See 
embedding fonts.

For most symbols, it is better to select the symbol font explicitely, 
for example in order to get the symbol for the mathematical empty set, 
write:
<fo:inline font-family="Symbol">&#x2205;</fo:inline>
The "#" shows up if the selected font does not define a glyph for the 
required character, for example if you try:
<fo:inline font-family="Helvetica">&#x2205;</fo:inline>

and


The "Symbol" and "ZapfDingbats" fonts, however, currently present a 
problem because FOP cannot correctly determine the encoding of
these two single-byte fonts through the PFM file. FOP now correctly 
interprets the "encoding" value in the XML font metrics file, but the 
PFMReader application writes "UnknownEncoding" to the generated XML 
file. In order to embed "Symbol" and "ZapfDingbats" you have to
manually change the XML font metrics file and specify "SymbolEncoding" 
or "ZapfdingbatsEncoding" encoding respectively as the value for the 
"encoding" element.
Example:
<?xml version="1.0" encoding="UTF-8"?>
<font-metrics type="TYPE1">
<font-name>Symbol</font-name>
<embed/>
<encoding>SymbolEncoding</encoding>
<cap-height>673</cap-height>
<x-height>766</x-height>

I will try reproduce this problem and work on it but I really don't know 
when.



Jacopo Cappellato пишет:
> Oleg,
>
> first of all, thanks for your notes.
> I did what you have suggested (even if I just created the "normal" 
> Arial font metrics, not the ones for bold and italics); now I can see 
> in the PDF two small boxes instead of the ## characters... 
> unfortunately I still can't see ideograms :-(
>
> Do you have any ideas about this issue?
>
> Jacopo
>
> Oleg Andreyev wrote:
>> Jacopo Cappellato пишет:
>>> Hi all,
>>>
>>> I know this is not probably an OFBiz related issue but I know that 
>>> we have several Chinese users and maybe this can be of interest for 
>>> others...
>>> I'm having issues displaying Chinese characters in the OFBiz PDF 
>>> reports (invoice, order etc...) created with xsl-fo: they appear as 
>>> '####'.
>> Of course. Currently Ofbiz printing subsystem doesn't work if 
>> document uses any charsets out Latin-1. (May be work for localized 
>> readers).
>>> I did some research in the Internet and the problem seems related to 
>>> the font family used that doesn't include the Chinese fonts.
>>> I have tried to set a different font-family in the template's 
>>> fo:root element, but unfortunately I couldn't find a font family 
>>> that supports the Chinese characters (e.g. I've tried with Arial in 
>>> an Ubuntu box).
>>>
>> I was searching in Google and seen many links to free Chinese fonts 
>> but if you will try use font-family that have required characters the 
>> result will be the same. You have to embed used fonts to pdf.
>>> I've also found some instructions on how to generate an ad-hoc xml 
>>> file with the necessary font family description, to be embedded in 
>>> the pdf reports by FOP... but the steps were not very clear to me 
>>> (especially, how to map them to the OFBiz framework).
>>>
>>> Any hints on how I can solve this issue?
>> Steps below apply to cyrillic fonts, but I hope Chinese too.
>> 1. Create FOP config file. Ready for use one attached to 
>> https://issues.apache.org/jira/browse/OFBIZ-1110.
>> 2. Create font metrics for given font. 
>> (http://xmlgraphics.apache.org/fop/0.93/fonts.html)
>> 3. Place fonts and metrics to framework/widget/config
>> 4. Add to fop.xconf font triplets
>> Example from my config
>>
>> <renderer mime="application/pdf">
>> <fonts>
>> <font metrics-url="arial.xml" kerning="yes" embed-url="arial.ttf">
>> <font-triplet name="Arial" style="normal" weight="normal"/>
>> <font-triplet name="ArialMT" style="normal" weight="normal"/>
>> </font>
>> <font metrics-url="arialbd.xml" kerning="yes" embed-url="arialbd.ttf">
>> <font-triplet name="Arial" style="normal" weight="bold"/>
>> <font-triplet name="ArialMT" style="normal" weight="bold"/>
>> </font>
>> <font metrics-url="ariali.xml" kerning="yes" embed-url="ariali.ttf">
>> <font-triplet name="Arial" style="italic" weight="normal"/>
>> <font-triplet name="ArialMT" style="italic" weight="normal"/>
>> </font>
>> <font metrics-url="arialbi.xml" kerning="yes" embed-url="arialbi.ttf">
>> <font-triplet name="Arial" style="italic" weight="bold"/>
>> <font-triplet name="ArialMT" style="italic" weight="bold"/>
>> </font>
>> </fonts>
>> </renderer>
>> 5. Modify fo.ftl to use font-family="Arial"
>>
>> Oleg
>
>
>



Re: How to configure OFBiz with Apache Web Server or Application Server

Posted by David Goodenough <da...@linkchoose.co.uk>.
Well the virtual host bit of the config file read:-

  GNU nano 2.0.6                      
File: /etc/apache2/sites-enabled/haddenham.dga.co.uk

<VirtualHost *>
        LogLevel debug

        ProxyPreserveHost On
        <Location /ofbiz >
                ProxyPass ajp://10.0.1.2:8009/
                ProxyPassReverse http://haddenham.dga.co.uk/ofbiz
        </Location>

        Alias /nick/ /home/nick/www/
        Alias /nick-webdav/ /home/nick/www/

        <Location /nick-webdav/ >
                Dav On
                AuthType Digest
                AuthName "Nick WebDAV"
                AuthDigestDomain /nick-webdav/
                AuthDigestProvider file
                AuthUserFile /home/nick/htdigest
                Require valid-user
        </Location>
</VirtualHost>

There are some other <Location> tags, but they are not in a 
VirtualHost tag.  Perhaps they should be?

David

On Thursday 27 September 2007, Raj Saini wrote:
> It looks your virtual host is default virtual host and it is serving all
> the resources. Try posting relevant part of your config file.
>
> Raj
>
> David Goodenough wrote:
> > All the <Location> tags are inside a single <VirtualHost *> tag.
> >
> > David
> >
> > On Thursday 27 September 2007, Raj Saini wrote:
> >> It is strange. Are you using a main server or virtual host based setup?
> >>
> >> Thanks,
> >>
> >> Raj
> >>
> >> David Goodenough wrote:
> >>> Raj,
> >>>
> >>> Well actually I am trying to STOP it from serving the images locally,
> >>> but rather to pass the request on in the same way that it passes on all
> >>> the other requests.  My Ofbiz server is on another machine so I want
> >>> everything passed on to that machine.
> >>>
> >>> My <Location> tag for ofbiz is <Location /ofbiz/> and all the rest have
> >>> their own <Location> tags, and none of them mention ofbiz.  As it
> >>> happens all the rest are local apps (apt-cacher, trac etc).  There is
> >>> also not a directory called /var/www/ofbiz.
> >>>
> >>> David
> >>>
> >>> On Thursday 27 September 2007, Raj Saini wrote:
> >>>> David,
> >>>>
> >>>> Apache would get confused and it is how this works. If you want Apache
> >>>> not to confuse, and want your images to be served without going
> >>>> through AJP, change your DocumentRoot of virtual host accordingly. For
> >>>> example instead of using DocumentRoot as /var/www/, point it to the
> >>>> base of images web application i.e.
> >>>> ${ofbiz_installdir}/framework/images/webapp. Apache will server images
> >>>> from this folder.
> >>>>
> >>>> You can not have a ProxyPass mount point as well as a file or folder
> >>>> with same name in your document root.
> >>>>
> >>>> Thanks,
> >>>>
> >>>> Raj
> >>>>
> >>>> Only way you can get
> >>>>
> >>>> David Goodenough wrote:
> >>>>> Did you manage to put it in your FAQ, and is there a URL to that FAQ?
> >>>>>
> >>>>> I am having problem in that this Apache Web server is also serving a
> >>>>> number of other (non Java) things, and when I try to add this
> >>>>> ProxyPass it gets confused with the /image files, and tries to get
> >>>>> them from /var/www/images which of course does not work.  I tried
> >>>>> moving the ProxyPass stuff to the front of the VirtualHost, but that
> >>>>> made no difference.
> >>>>>
> >>>>> David
> >>>>>
> >>>>> On Sunday 12 August 2007, Jacques Le Roux wrote:
> >>>>>> Thanks a lot Raj,
> >>>>>>
> >>>>>> I think I will try it soon and hopefully put your tip in "my" FAQ on
> >>>>>> Confluence !  It's clearly far easier than mod_jk and moreover if
> >>>>>> it's faster then it should be the new way of doing that...
> >>>>>>
> >>>>>> Jacques
> >>>>>>
> >>>>>> De : "Raj Saini" <ra...@gmail.com>
> >>>>>>
> >>>>>>> Yes, I have configured our Ofbiz + Apache HTTP 2.2 with
> >>>>>>> mod_ajp_proxy. You will need to enable proxy for httpd and
> >>>>>>> mod_proxy_ajp within your virtual hosts. I am doing it Debian way.
> >>>>>>> For a standard httpd.conf following should work:
> >>>>>>>
> >>>>>>> 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
> >>>>>>>
> >>>>>>> 2. Somewhere in the global part of httpd.conf
> >>>>>>> --------------------------------------------------
> >>>>>>>     #turning ProxyRequests on and allowing proxying from all may
> >>>>>>> allow #spammers to use your proxy to send email.
> >>>>>>>
> >>>>>>>         ProxyRequests Off
> >>>>>>>
> >>>>>>>         <Proxy *>
> >>>>>>>                 AddDefaultCharset off
> >>>>>>>                 Order deny,allow
> >>>>>>>                 Allow from all
> >>>>>>>                 #Allow from .example.com
> >>>>>>>         </Proxy>
> >>>>>>>
> >>>>>>>         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
> >>>>>>>         # ("Full" adds the server version; "Block" removes all
> >>>>>>> outgoing Via: headers)
> >>>>>>>         # Set to one of: Off | On | Full | Block
> >>>>>>>
> >>>>>>>         ProxyVia On
> >>>>>>>
> >>>>>>> 3. Inside your virtual host config
> >>>>>>> -----------------------------------
> >>>>>>>     ProxyPreserveHost On
> >>>>>>>     proxyPass / ajp://localhost:8009/
> >>>>>>>     RewriteEngine On
> >>>>>>>     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
> >>>>>>>
> >>>>>>> That is it you need to make it work.
> >>>>>>>
> >>>>>>> Thanks,
> >>>>>>>
> >>>>>>> Raj
> >>>>>>>
> >>>>>>> Jacques Le Roux wrote:
> >>>>>>>> >From this blog I'm not sure it's the good solution yet. Do you
> >>>>>>>> > have
> >>>>>>>>>
> >>>>>>>>> valuable experience with it ?
> >>>>>>>>
> >>>>>>>> http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_m
> >>>>>>>>od _p r oxy_ajp.html
> >>>>>>>>
> >>>>>>>> Jacques
> >>>>>>>>
> >>>>>>>> PS : though this links seem good points :
> >>>>>>>> http://confluence.atlassian.com/display/DOC/Running+Confluence+beh
> >>>>>>>>in d+ A pache#comment-16121884
> >>>>>>>> http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
> >>>>>>>>
> >>>>>>>> De : "Raj Saini" <ra...@gmail.com>
> >>>>>>>>
> >>>>>>>>> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is
> >>>>>>>>> far simpler than mod_jk.
> >>>>>>>>>
> >>>>>>>>> Thanks,
> >>>>>>>>>
> >>>>>>>>> Raj
> >>>>>>>>>
> >>>>>>>>> Gautam Deb wrote:
> >>>>>>>>>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache
> >>>>>>>>>> plug-in that handles the communication between Tomcat and
> >>>>>>>>>> Apache. You can refer the link
> >>>>>>>>>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
> >>>>>>>>>>
> >>>>>>>>>> This way you can route request to the web container.
> >>>>>>>>>>
> >>>>>>>>>> Regards,
> >>>>>>>>>> Gautam Deb
> >>>>>>>>>>
> >>>>>>>>>> On 8/12/07, Mathius Allo <mg...@yahoo.com> wrote:
> >>>>>>>>>>> Hi All,
> >>>>>>>>>>>
> >>>>>>>>>>>   Is it possible to have a deployment configuration where
> >>>>>>>>>>> Apache web server being used to route request to the web
> >>>>>>>>>>> container?
> >>>>>>>>>>>
> >>>>>>>>>>>   How to deploy an OfBiz application within an Application
> >>>>>>>>>>> Server?
> >>>>>>>>>>>
> >>>>>>>>>>>   Thanks in advanced.
> >>>>>>>>>>>   Mathius
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> ---------------------------------
> >>>>>>>>>>> Pinpoint customers who are looking for what you sell.



Re: How to configure OFBiz with Apache Web Server or Application Server

Posted by Raj Saini <ra...@gmail.com>.
It looks your virtual host is default virtual host and it is serving all 
the resources. Try posting relevant part of your config file.

Raj

David Goodenough wrote:
> All the <Location> tags are inside a single <VirtualHost *> tag.  
>
> David
>
> On Thursday 27 September 2007, Raj Saini wrote:
>   
>> It is strange. Are you using a main server or virtual host based setup?
>>
>> Thanks,
>>
>> Raj
>>
>> David Goodenough wrote:
>>     
>>> Raj,
>>>
>>> Well actually I am trying to STOP it from serving the images locally, but
>>> rather to pass the request on in the same way that it passes on all the
>>> other requests.  My Ofbiz server is on another machine so I want
>>> everything passed on to that machine.
>>>
>>> My <Location> tag for ofbiz is <Location /ofbiz/> and all the rest have
>>> their own <Location> tags, and none of them mention ofbiz.  As it happens
>>> all the rest are local apps (apt-cacher, trac etc).  There is also not
>>> a directory called /var/www/ofbiz.
>>>
>>> David
>>>
>>> On Thursday 27 September 2007, Raj Saini wrote:
>>>       
>>>> David,
>>>>
>>>> Apache would get confused and it is how this works. If you want Apache
>>>> not to confuse, and want your images to be served without going through
>>>> AJP, change your DocumentRoot of virtual host accordingly. For example
>>>> instead of using DocumentRoot as /var/www/, point it to the base of
>>>> images web application i.e. ${ofbiz_installdir}/framework/images/webapp.
>>>> Apache will server images from this folder.
>>>>
>>>> You can not have a ProxyPass mount point as well as a file or folder
>>>> with same name in your document root.
>>>>
>>>> Thanks,
>>>>
>>>> Raj
>>>>
>>>> Only way you can get
>>>>
>>>> David Goodenough wrote:
>>>>         
>>>>> Did you manage to put it in your FAQ, and is there a URL to that FAQ?
>>>>>
>>>>> I am having problem in that this Apache Web server is also serving a
>>>>> number of other (non Java) things, and when I try to add this ProxyPass
>>>>> it gets confused with the /image files, and tries to get them from
>>>>> /var/www/images which of course does not work.  I tried moving the
>>>>> ProxyPass stuff to the front of the VirtualHost, but that made no
>>>>> difference.
>>>>>
>>>>> David
>>>>>
>>>>> On Sunday 12 August 2007, Jacques Le Roux wrote:
>>>>>           
>>>>>> Thanks a lot Raj,
>>>>>>
>>>>>> I think I will try it soon and hopefully put your tip in "my" FAQ on
>>>>>> Confluence !  It's clearly far easier than mod_jk and moreover if it's
>>>>>> faster then it should be the new way of doing that...
>>>>>>
>>>>>> Jacques
>>>>>>
>>>>>> De : "Raj Saini" <ra...@gmail.com>
>>>>>>
>>>>>>             
>>>>>>> Yes, I have configured our Ofbiz + Apache HTTP 2.2 with
>>>>>>> mod_ajp_proxy. You will need to enable proxy for httpd and 
>>>>>>> mod_proxy_ajp within your virtual hosts. I am doing it Debian way.
>>>>>>> For a standard httpd.conf following should work:
>>>>>>>
>>>>>>> 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
>>>>>>>
>>>>>>> 2. Somewhere in the global part of httpd.conf
>>>>>>> --------------------------------------------------
>>>>>>>     #turning ProxyRequests on and allowing proxying from all may
>>>>>>> allow #spammers to use your proxy to send email.
>>>>>>>
>>>>>>>         ProxyRequests Off
>>>>>>>
>>>>>>>         <Proxy *>
>>>>>>>                 AddDefaultCharset off
>>>>>>>                 Order deny,allow
>>>>>>>                 Allow from all
>>>>>>>                 #Allow from .example.com
>>>>>>>         </Proxy>
>>>>>>>
>>>>>>>         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
>>>>>>>         # ("Full" adds the server version; "Block" removes all
>>>>>>> outgoing Via: headers)
>>>>>>>         # Set to one of: Off | On | Full | Block
>>>>>>>
>>>>>>>         ProxyVia On
>>>>>>>
>>>>>>> 3. Inside your virtual host config
>>>>>>> -----------------------------------
>>>>>>>     ProxyPreserveHost On
>>>>>>>     proxyPass / ajp://localhost:8009/
>>>>>>>     RewriteEngine On
>>>>>>>     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
>>>>>>>
>>>>>>> That is it you need to make it work.
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Raj
>>>>>>>
>>>>>>> Jacques Le Roux wrote:
>>>>>>>               
>>>>>>>> >From this blog I'm not sure it's the good solution yet. Do you have
>>>>>>>>                 
>>>>>>>>> valuable experience with it ?
>>>>>>>>>                   
>>>>>>>> http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod
>>>>>>>> _p r oxy_ajp.html
>>>>>>>>
>>>>>>>> Jacques
>>>>>>>>
>>>>>>>> PS : though this links seem good points :
>>>>>>>> http://confluence.atlassian.com/display/DOC/Running+Confluence+behin
>>>>>>>> d+ A pache#comment-16121884
>>>>>>>> http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
>>>>>>>>
>>>>>>>> De : "Raj Saini" <ra...@gmail.com>
>>>>>>>>
>>>>>>>>                 
>>>>>>>>> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is
>>>>>>>>> far simpler than mod_jk.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>>
>>>>>>>>> Raj
>>>>>>>>>
>>>>>>>>> Gautam Deb wrote:
>>>>>>>>>                   
>>>>>>>>>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache
>>>>>>>>>> plug-in that handles the communication between Tomcat and Apache.
>>>>>>>>>> You can refer the link
>>>>>>>>>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
>>>>>>>>>>
>>>>>>>>>> This way you can route request to the web container.
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>> Gautam Deb
>>>>>>>>>>
>>>>>>>>>> On 8/12/07, Mathius Allo <mg...@yahoo.com> wrote:
>>>>>>>>>>                     
>>>>>>>>>>> Hi All,
>>>>>>>>>>>
>>>>>>>>>>>   Is it possible to have a deployment configuration where Apache
>>>>>>>>>>> web server being used to route request to the web container?
>>>>>>>>>>>
>>>>>>>>>>>   How to deploy an OfBiz application within an Application
>>>>>>>>>>> Server?
>>>>>>>>>>>
>>>>>>>>>>>   Thanks in advanced.
>>>>>>>>>>>   Mathius
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> ---------------------------------
>>>>>>>>>>> Pinpoint customers who are looking for what you sell.
>>>>>>>>>>>                       
>
>
>
>   


Re: How to configure OFBiz with Apache Web Server or Application Server

Posted by David Goodenough <da...@linkchoose.co.uk>.
All the <Location> tags are inside a single <VirtualHost *> tag.  

David

On Thursday 27 September 2007, Raj Saini wrote:
> It is strange. Are you using a main server or virtual host based setup?
>
> Thanks,
>
> Raj
>
> David Goodenough wrote:
> > Raj,
> >
> > Well actually I am trying to STOP it from serving the images locally, but
> > rather to pass the request on in the same way that it passes on all the
> > other requests.  My Ofbiz server is on another machine so I want
> > everything passed on to that machine.
> >
> > My <Location> tag for ofbiz is <Location /ofbiz/> and all the rest have
> > their own <Location> tags, and none of them mention ofbiz.  As it happens
> > all the rest are local apps (apt-cacher, trac etc).  There is also not
> > a directory called /var/www/ofbiz.
> >
> > David
> >
> > On Thursday 27 September 2007, Raj Saini wrote:
> >> David,
> >>
> >> Apache would get confused and it is how this works. If you want Apache
> >> not to confuse, and want your images to be served without going through
> >> AJP, change your DocumentRoot of virtual host accordingly. For example
> >> instead of using DocumentRoot as /var/www/, point it to the base of
> >> images web application i.e. ${ofbiz_installdir}/framework/images/webapp.
> >> Apache will server images from this folder.
> >>
> >> You can not have a ProxyPass mount point as well as a file or folder
> >> with same name in your document root.
> >>
> >> Thanks,
> >>
> >> Raj
> >>
> >> Only way you can get
> >>
> >> David Goodenough wrote:
> >>> Did you manage to put it in your FAQ, and is there a URL to that FAQ?
> >>>
> >>> I am having problem in that this Apache Web server is also serving a
> >>> number of other (non Java) things, and when I try to add this ProxyPass
> >>> it gets confused with the /image files, and tries to get them from
> >>> /var/www/images which of course does not work.  I tried moving the
> >>> ProxyPass stuff to the front of the VirtualHost, but that made no
> >>> difference.
> >>>
> >>> David
> >>>
> >>> On Sunday 12 August 2007, Jacques Le Roux wrote:
> >>>> Thanks a lot Raj,
> >>>>
> >>>> I think I will try it soon and hopefully put your tip in "my" FAQ on
> >>>> Confluence !  It's clearly far easier than mod_jk and moreover if it's
> >>>> faster then it should be the new way of doing that...
> >>>>
> >>>> Jacques
> >>>>
> >>>> De : "Raj Saini" <ra...@gmail.com>
> >>>>
> >>>>> Yes, I have configured our Ofbiz + Apache HTTP 2.2 with
> >>>>> mod_ajp_proxy. You will need to enable proxy for httpd and 
> >>>>> mod_proxy_ajp within your virtual hosts. I am doing it Debian way.
> >>>>> For a standard httpd.conf following should work:
> >>>>>
> >>>>> 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
> >>>>>
> >>>>> 2. Somewhere in the global part of httpd.conf
> >>>>> --------------------------------------------------
> >>>>>     #turning ProxyRequests on and allowing proxying from all may
> >>>>> allow #spammers to use your proxy to send email.
> >>>>>
> >>>>>         ProxyRequests Off
> >>>>>
> >>>>>         <Proxy *>
> >>>>>                 AddDefaultCharset off
> >>>>>                 Order deny,allow
> >>>>>                 Allow from all
> >>>>>                 #Allow from .example.com
> >>>>>         </Proxy>
> >>>>>
> >>>>>         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
> >>>>>         # ("Full" adds the server version; "Block" removes all
> >>>>> outgoing Via: headers)
> >>>>>         # Set to one of: Off | On | Full | Block
> >>>>>
> >>>>>         ProxyVia On
> >>>>>
> >>>>> 3. Inside your virtual host config
> >>>>> -----------------------------------
> >>>>>     ProxyPreserveHost On
> >>>>>     proxyPass / ajp://localhost:8009/
> >>>>>     RewriteEngine On
> >>>>>     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
> >>>>>
> >>>>> That is it you need to make it work.
> >>>>>
> >>>>> Thanks,
> >>>>>
> >>>>> Raj
> >>>>>
> >>>>> Jacques Le Roux wrote:
> >>>>>> >From this blog I'm not sure it's the good solution yet. Do you have
> >>>>>>>
> >>>>>>> valuable experience with it ?
> >>>>>>
> >>>>>> http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod
> >>>>>>_p r oxy_ajp.html
> >>>>>>
> >>>>>> Jacques
> >>>>>>
> >>>>>> PS : though this links seem good points :
> >>>>>> http://confluence.atlassian.com/display/DOC/Running+Confluence+behin
> >>>>>>d+ A pache#comment-16121884
> >>>>>> http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
> >>>>>>
> >>>>>> De : "Raj Saini" <ra...@gmail.com>
> >>>>>>
> >>>>>>> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is
> >>>>>>> far simpler than mod_jk.
> >>>>>>>
> >>>>>>> Thanks,
> >>>>>>>
> >>>>>>> Raj
> >>>>>>>
> >>>>>>> Gautam Deb wrote:
> >>>>>>>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache
> >>>>>>>> plug-in that handles the communication between Tomcat and Apache.
> >>>>>>>> You can refer the link
> >>>>>>>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
> >>>>>>>>
> >>>>>>>> This way you can route request to the web container.
> >>>>>>>>
> >>>>>>>> Regards,
> >>>>>>>> Gautam Deb
> >>>>>>>>
> >>>>>>>> On 8/12/07, Mathius Allo <mg...@yahoo.com> wrote:
> >>>>>>>>> Hi All,
> >>>>>>>>>
> >>>>>>>>>   Is it possible to have a deployment configuration where Apache
> >>>>>>>>> web server being used to route request to the web container?
> >>>>>>>>>
> >>>>>>>>>   How to deploy an OfBiz application within an Application
> >>>>>>>>> Server?
> >>>>>>>>>
> >>>>>>>>>   Thanks in advanced.
> >>>>>>>>>   Mathius
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> ---------------------------------
> >>>>>>>>> Pinpoint customers who are looking for what you sell.



Re: How to configure OFBiz with Apache Web Server or Application Server

Posted by Raj Saini <ra...@gmail.com>.
It is strange. Are you using a main server or virtual host based setup?

Thanks,

Raj
David Goodenough wrote:
> Raj,
>
> Well actually I am trying to STOP it from serving the images locally, but
> rather to pass the request on in the same way that it passes on all the
> other requests.  My Ofbiz server is on another machine so I want everything
> passed on to that machine.
>
> My <Location> tag for ofbiz is <Location /ofbiz/> and all the rest have
> their own <Location> tags, and none of them mention ofbiz.  As it happens
> all the rest are local apps (apt-cacher, trac etc).  There is also not
> a directory called /var/www/ofbiz.
>
> David
>
> On Thursday 27 September 2007, Raj Saini wrote:
>   
>> David,
>>
>> Apache would get confused and it is how this works. If you want Apache
>> not to confuse, and want your images to be served without going through
>> AJP, change your DocumentRoot of virtual host accordingly. For example
>> instead of using DocumentRoot as /var/www/, point it to the base of
>> images web application i.e. ${ofbiz_installdir}/framework/images/webapp.
>> Apache will server images from this folder.
>>
>> You can not have a ProxyPass mount point as well as a file or folder
>> with same name in your document root.
>>
>> Thanks,
>>
>> Raj
>>
>> Only way you can get
>>
>> David Goodenough wrote:
>>     
>>> Did you manage to put it in your FAQ, and is there a URL to that FAQ?
>>>
>>> I am having problem in that this Apache Web server is also serving a
>>> number of other (non Java) things, and when I try to add this ProxyPass
>>> it gets confused with the /image files, and tries to get them from
>>> /var/www/images which of course does not work.  I tried moving the
>>> ProxyPass stuff to the front of the VirtualHost, but that made no
>>> difference.
>>>
>>> David
>>>
>>> On Sunday 12 August 2007, Jacques Le Roux wrote:
>>>       
>>>> Thanks a lot Raj,
>>>>
>>>> I think I will try it soon and hopefully put your tip in "my" FAQ on
>>>> Confluence !  It's clearly far easier than mod_jk and moreover if it's
>>>> faster then it should be the new way of doing that...
>>>>
>>>> Jacques
>>>>
>>>> De : "Raj Saini" <ra...@gmail.com>
>>>>
>>>>         
>>>>> Yes, I have configured our Ofbiz + Apache HTTP 2.2 with mod_ajp_proxy.
>>>>> You will need to enable proxy for httpd and  mod_proxy_ajp within your
>>>>> virtual hosts. I am doing it Debian way. For a standard httpd.conf
>>>>> following should work:
>>>>>
>>>>> 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
>>>>>
>>>>> 2. Somewhere in the global part of httpd.conf
>>>>> --------------------------------------------------
>>>>>     #turning ProxyRequests on and allowing proxying from all may allow
>>>>>         #spammers to use your proxy to send email.
>>>>>
>>>>>         ProxyRequests Off
>>>>>
>>>>>         <Proxy *>
>>>>>                 AddDefaultCharset off
>>>>>                 Order deny,allow
>>>>>                 Allow from all
>>>>>                 #Allow from .example.com
>>>>>         </Proxy>
>>>>>
>>>>>         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
>>>>>         # ("Full" adds the server version; "Block" removes all outgoing
>>>>> Via: headers)
>>>>>         # Set to one of: Off | On | Full | Block
>>>>>
>>>>>         ProxyVia On
>>>>>
>>>>> 3. Inside your virtual host config
>>>>> -----------------------------------
>>>>>     ProxyPreserveHost On
>>>>>     proxyPass / ajp://localhost:8009/
>>>>>     RewriteEngine On
>>>>>     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
>>>>>
>>>>> That is it you need to make it work.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Raj
>>>>>
>>>>> Jacques Le Roux wrote:
>>>>>           
>>>>>> >From this blog I'm not sure it's the good solution yet. Do you have
>>>>>>             
>>>>>>> valuable experience with it ?
>>>>>>>               
>>>>>> http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod_p
>>>>>> r oxy_ajp.html
>>>>>>
>>>>>> Jacques
>>>>>>
>>>>>> PS : though this links seem good points :
>>>>>> http://confluence.atlassian.com/display/DOC/Running+Confluence+behind+
>>>>>> A pache#comment-16121884
>>>>>> http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
>>>>>>
>>>>>> De : "Raj Saini" <ra...@gmail.com>
>>>>>>
>>>>>>             
>>>>>>> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is far
>>>>>>> simpler than mod_jk.
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Raj
>>>>>>>
>>>>>>> Gautam Deb wrote:
>>>>>>>               
>>>>>>>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in
>>>>>>>> that handles the communication between Tomcat and Apache. You can
>>>>>>>> refer the link
>>>>>>>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
>>>>>>>>
>>>>>>>> This way you can route request to the web container.
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Gautam Deb
>>>>>>>>
>>>>>>>> On 8/12/07, Mathius Allo <mg...@yahoo.com> wrote:
>>>>>>>>                 
>>>>>>>>> Hi All,
>>>>>>>>>
>>>>>>>>>   Is it possible to have a deployment configuration where Apache
>>>>>>>>> web server being used to route request to the web container?
>>>>>>>>>
>>>>>>>>>   How to deploy an OfBiz application within an Application Server?
>>>>>>>>>
>>>>>>>>>   Thanks in advanced.
>>>>>>>>>   Mathius
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------
>>>>>>>>> Pinpoint customers who are looking for what you sell.
>>>>>>>>>                   
>
>
>
>   


Re: How to configure OFBiz with Apache Web Server or Application Server

Posted by David Goodenough <da...@linkchoose.co.uk>.
Raj,

Well actually I am trying to STOP it from serving the images locally, but
rather to pass the request on in the same way that it passes on all the
other requests.  My Ofbiz server is on another machine so I want everything
passed on to that machine.

My <Location> tag for ofbiz is <Location /ofbiz/> and all the rest have
their own <Location> tags, and none of them mention ofbiz.  As it happens
all the rest are local apps (apt-cacher, trac etc).  There is also not
a directory called /var/www/ofbiz.

David

On Thursday 27 September 2007, Raj Saini wrote:
> David,
>
> Apache would get confused and it is how this works. If you want Apache
> not to confuse, and want your images to be served without going through
> AJP, change your DocumentRoot of virtual host accordingly. For example
> instead of using DocumentRoot as /var/www/, point it to the base of
> images web application i.e. ${ofbiz_installdir}/framework/images/webapp.
> Apache will server images from this folder.
>
> You can not have a ProxyPass mount point as well as a file or folder
> with same name in your document root.
>
> Thanks,
>
> Raj
>
> Only way you can get
>
> David Goodenough wrote:
> > Did you manage to put it in your FAQ, and is there a URL to that FAQ?
> >
> > I am having problem in that this Apache Web server is also serving a
> > number of other (non Java) things, and when I try to add this ProxyPass
> > it gets confused with the /image files, and tries to get them from
> > /var/www/images which of course does not work.  I tried moving the
> > ProxyPass stuff to the front of the VirtualHost, but that made no
> > difference.
> >
> > David
> >
> > On Sunday 12 August 2007, Jacques Le Roux wrote:
> >> Thanks a lot Raj,
> >>
> >> I think I will try it soon and hopefully put your tip in "my" FAQ on
> >> Confluence !  It's clearly far easier than mod_jk and moreover if it's
> >> faster then it should be the new way of doing that...
> >>
> >> Jacques
> >>
> >> De : "Raj Saini" <ra...@gmail.com>
> >>
> >>> Yes, I have configured our Ofbiz + Apache HTTP 2.2 with mod_ajp_proxy.
> >>> You will need to enable proxy for httpd and  mod_proxy_ajp within your
> >>> virtual hosts. I am doing it Debian way. For a standard httpd.conf
> >>> following should work:
> >>>
> >>> 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
> >>>
> >>> 2. Somewhere in the global part of httpd.conf
> >>> --------------------------------------------------
> >>>     #turning ProxyRequests on and allowing proxying from all may allow
> >>>         #spammers to use your proxy to send email.
> >>>
> >>>         ProxyRequests Off
> >>>
> >>>         <Proxy *>
> >>>                 AddDefaultCharset off
> >>>                 Order deny,allow
> >>>                 Allow from all
> >>>                 #Allow from .example.com
> >>>         </Proxy>
> >>>
> >>>         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
> >>>         # ("Full" adds the server version; "Block" removes all outgoing
> >>> Via: headers)
> >>>         # Set to one of: Off | On | Full | Block
> >>>
> >>>         ProxyVia On
> >>>
> >>> 3. Inside your virtual host config
> >>> -----------------------------------
> >>>     ProxyPreserveHost On
> >>>     proxyPass / ajp://localhost:8009/
> >>>     RewriteEngine On
> >>>     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
> >>>
> >>> That is it you need to make it work.
> >>>
> >>> Thanks,
> >>>
> >>> Raj
> >>>
> >>> Jacques Le Roux wrote:
> >>>> >From this blog I'm not sure it's the good solution yet. Do you have
> >>>>>
> >>>>> valuable experience with it ?
> >>>>
> >>>> http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod_p
> >>>>r oxy_ajp.html
> >>>>
> >>>> Jacques
> >>>>
> >>>> PS : though this links seem good points :
> >>>> http://confluence.atlassian.com/display/DOC/Running+Confluence+behind+
> >>>>A pache#comment-16121884
> >>>> http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
> >>>>
> >>>> De : "Raj Saini" <ra...@gmail.com>
> >>>>
> >>>>> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is far
> >>>>> simpler than mod_jk.
> >>>>>
> >>>>> Thanks,
> >>>>>
> >>>>> Raj
> >>>>>
> >>>>> Gautam Deb wrote:
> >>>>>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in
> >>>>>> that handles the communication between Tomcat and Apache. You can
> >>>>>> refer the link
> >>>>>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
> >>>>>>
> >>>>>> This way you can route request to the web container.
> >>>>>>
> >>>>>> Regards,
> >>>>>> Gautam Deb
> >>>>>>
> >>>>>> On 8/12/07, Mathius Allo <mg...@yahoo.com> wrote:
> >>>>>>> Hi All,
> >>>>>>>
> >>>>>>>   Is it possible to have a deployment configuration where Apache
> >>>>>>> web server being used to route request to the web container?
> >>>>>>>
> >>>>>>>   How to deploy an OfBiz application within an Application Server?
> >>>>>>>
> >>>>>>>   Thanks in advanced.
> >>>>>>>   Mathius
> >>>>>>>
> >>>>>>>
> >>>>>>> ---------------------------------
> >>>>>>> Pinpoint customers who are looking for what you sell.



Re: How to configure OFBiz with Apache Web Server or Application Server

Posted by Raj Saini <ra...@gmail.com>.
David,

Apache would get confused and it is how this works. If you want Apache 
not to confuse, and want your images to be served without going through 
AJP, change your DocumentRoot of virtual host accordingly. For example 
instead of using DocumentRoot as /var/www/, point it to the base of 
images web application i.e. ${ofbiz_installdir}/framework/images/webapp. 
Apache will server images from this folder.

You can not have a ProxyPass mount point as well as a file or folder 
with same name in your document root.

Thanks,

Raj

Only way you can get
David Goodenough wrote:
> Did you manage to put it in your FAQ, and is there a URL to that FAQ?
>
> I am having problem in that this Apache Web server is also serving a number
> of other (non Java) things, and when I try to add this ProxyPass it gets
> confused with the /image files, and tries to get them from /var/www/images
> which of course does not work.  I tried moving the ProxyPass stuff to the
> front of the VirtualHost, but that made no difference.
>
> David
>
> On Sunday 12 August 2007, Jacques Le Roux wrote:
>   
>> Thanks a lot Raj,
>>
>> I think I will try it soon and hopefully put your tip in "my" FAQ on
>> Confluence !  It's clearly far easier than mod_jk and moreover if it's
>> faster then it should be the new way of doing that...
>>
>> Jacques
>>
>> De : "Raj Saini" <ra...@gmail.com>
>>
>>     
>>> Yes, I have configured our Ofbiz + Apache HTTP 2.2 with mod_ajp_proxy.
>>> You will need to enable proxy for httpd and  mod_proxy_ajp within your
>>> virtual hosts. I am doing it Debian way. For a standard httpd.conf
>>> following should work:
>>>
>>> 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
>>>
>>> 2. Somewhere in the global part of httpd.conf
>>> --------------------------------------------------
>>>     #turning ProxyRequests on and allowing proxying from all may allow
>>>         #spammers to use your proxy to send email.
>>>
>>>         ProxyRequests Off
>>>
>>>         <Proxy *>
>>>                 AddDefaultCharset off
>>>                 Order deny,allow
>>>                 Allow from all
>>>                 #Allow from .example.com
>>>         </Proxy>
>>>
>>>         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
>>>         # ("Full" adds the server version; "Block" removes all outgoing
>>> Via: headers)
>>>         # Set to one of: Off | On | Full | Block
>>>
>>>         ProxyVia On
>>>
>>> 3. Inside your virtual host config
>>> -----------------------------------
>>>     ProxyPreserveHost On
>>>     proxyPass / ajp://localhost:8009/
>>>     RewriteEngine On
>>>     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
>>>
>>> That is it you need to make it work.
>>>
>>> Thanks,
>>>
>>> Raj
>>>
>>> Jacques Le Roux wrote:
>>>       
>>>> >From this blog I'm not sure it's the good solution yet. Do you have
>>>>         
>>>>> valuable experience with it ?
>>>>>           
>>>> http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod_pr
>>>> oxy_ajp.html
>>>>
>>>> Jacques
>>>>
>>>> PS : though this links seem good points :
>>>> http://confluence.atlassian.com/display/DOC/Running+Confluence+behind+A
>>>> pache#comment-16121884
>>>> http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
>>>>
>>>> De : "Raj Saini" <ra...@gmail.com>
>>>>
>>>>         
>>>>> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is far
>>>>> simpler than mod_jk.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Raj
>>>>>
>>>>> Gautam Deb wrote:
>>>>>           
>>>>>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in
>>>>>> that handles the communication between Tomcat and Apache. You can
>>>>>> refer the link
>>>>>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
>>>>>>
>>>>>> This way you can route request to the web container.
>>>>>>
>>>>>> Regards,
>>>>>> Gautam Deb
>>>>>>
>>>>>> On 8/12/07, Mathius Allo <mg...@yahoo.com> wrote:
>>>>>>             
>>>>>>> Hi All,
>>>>>>>
>>>>>>>   Is it possible to have a deployment configuration where Apache web
>>>>>>> server being used to route request to the web container?
>>>>>>>
>>>>>>>   How to deploy an OfBiz application within an Application Server?
>>>>>>>
>>>>>>>   Thanks in advanced.
>>>>>>>   Mathius
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------
>>>>>>> Pinpoint customers who are looking for what you sell.
>>>>>>>               
>
>
>
>   


Re: How to configure OFBiz with Apache Web Server or Application Server

Posted by Jacques Le Roux <ja...@les7arts.com>.
For those interested, here is the tip
http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-HTTPD

Jacques

From: "Jacques Le Roux" <ja...@les7arts.com>
Sent: Thursday, September 27, 2007 7:20 PM

> Not yet, I want to test it before (on Windows and Linux) but there are always more important things to do...
> 
> The FAQ URL is http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Cookbook+-+How+to++%28work+in+progress%29
> 
> Did you try Raj's tip below ?
> 
> Jacques
> 
> 
>> Did you manage to put it in your FAQ, and is there a URL to that FAQ?
>> 
>> I am having problem in that this Apache Web server is also serving a number
>> of other (non Java) things, and when I try to add this ProxyPass it gets
>> confused with the /image files, and tries to get them from /var/www/images
>> which of course does not work.  I tried moving the ProxyPass stuff to the
>> front of the VirtualHost, but that made no difference.
>> 
>> David
>> 
>> On Sunday 12 August 2007, Jacques Le Roux wrote:
>> > Thanks a lot Raj,
>> >
>> > I think I will try it soon and hopefully put your tip in "my" FAQ on
>> > Confluence !  It's clearly far easier than mod_jk and moreover if it's
>> > faster then it should be the new way of doing that...
>> >
>> > Jacques
>> >
>> > De : "Raj Saini" <ra...@gmail.com>
>> >
>> > > Yes, I have configured our Ofbiz + Apache HTTP 2.2 with mod_ajp_proxy.
>> > > You will need to enable proxy for httpd and  mod_proxy_ajp within your
>> > > virtual hosts. I am doing it Debian way. For a standard httpd.conf
>> > > following should work:
>> > >
>> > > 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
>> > >
>> > > 2. Somewhere in the global part of httpd.conf
>> > > --------------------------------------------------
>> > >     #turning ProxyRequests on and allowing proxying from all may allow
>> > >         #spammers to use your proxy to send email.
>> > >
>> > >         ProxyRequests Off
>> > >
>> > >         <Proxy *>
>> > >                 AddDefaultCharset off
>> > >                 Order deny,allow
>> > >                 Allow from all
>> > >                 #Allow from .example.com
>> > >         </Proxy>
>> > >
>> > >         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
>> > >         # ("Full" adds the server version; "Block" removes all outgoing
>> > > Via: headers)
>> > >         # Set to one of: Off | On | Full | Block
>> > >
>> > >         ProxyVia On
>> > >
>> > > 3. Inside your virtual host config
>> > > -----------------------------------
>> > >     ProxyPreserveHost On
>> > >     proxyPass / ajp://localhost:8009/
>> > >     RewriteEngine On
>> > >     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
>> > >
>> > > That is it you need to make it work.
>> > >
>> > > Thanks,
>> > >
>> > > Raj
>> > >
>> > > Jacques Le Roux wrote:
>> > > > >From this blog I'm not sure it's the good solution yet. Do you have
>> > > > > valuable experience with it ?
>> > > >
>> > > > http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod_pr
>> > > >oxy_ajp.html
>> > > >
>> > > > Jacques
>> > > >
>> > > > PS : though this links seem good points :
>> > > > http://confluence.atlassian.com/display/DOC/Running+Confluence+behind+A
>> > > >pache#comment-16121884
>> > > > http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
>> > > >
>> > > > De : "Raj Saini" <ra...@gmail.com>
>> > > >
>> > > >> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is far
>> > > >> simpler than mod_jk.
>> > > >>
>> > > >> Thanks,
>> > > >>
>> > > >> Raj
>> > > >>
>> > > >> Gautam Deb wrote:
>> > > >>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in
>> > > >>> that handles the communication between Tomcat and Apache. You can
>> > > >>> refer the link
>> > > >>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
>> > > >>>
>> > > >>> This way you can route request to the web container.
>> > > >>>
>> > > >>> Regards,
>> > > >>> Gautam Deb
>> > > >>>
>> > > >>> On 8/12/07, Mathius Allo <mg...@yahoo.com> wrote:
>> > > >>>> Hi All,
>> > > >>>>
>> > > >>>>   Is it possible to have a deployment configuration where Apache web
>> > > >>>> server being used to route request to the web container?
>> > > >>>>
>> > > >>>>   How to deploy an OfBiz application within an Application Server?
>> > > >>>>
>> > > >>>>   Thanks in advanced.
>> > > >>>>   Mathius
>> > > >>>>
>> > > >>>>
>> > > >>>> ---------------------------------
>> > > >>>> Pinpoint customers who are looking for what you sell.
>> 
>>
>

Re: How to configure OFBiz with Apache Web Server or Application Server

Posted by Jacques Le Roux <ja...@les7arts.com>.
Not yet, I want to test it before (on Windows and Linux) but there are always more important things to do...

The FAQ URL is http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Cookbook+-+How+to++%28work+in+progress%29

Did you try Raj's tip below ?

Jacques


> Did you manage to put it in your FAQ, and is there a URL to that FAQ?
> 
> I am having problem in that this Apache Web server is also serving a number
> of other (non Java) things, and when I try to add this ProxyPass it gets
> confused with the /image files, and tries to get them from /var/www/images
> which of course does not work.  I tried moving the ProxyPass stuff to the
> front of the VirtualHost, but that made no difference.
> 
> David
> 
> On Sunday 12 August 2007, Jacques Le Roux wrote:
> > Thanks a lot Raj,
> >
> > I think I will try it soon and hopefully put your tip in "my" FAQ on
> > Confluence !  It's clearly far easier than mod_jk and moreover if it's
> > faster then it should be the new way of doing that...
> >
> > Jacques
> >
> > De : "Raj Saini" <ra...@gmail.com>
> >
> > > Yes, I have configured our Ofbiz + Apache HTTP 2.2 with mod_ajp_proxy.
> > > You will need to enable proxy for httpd and  mod_proxy_ajp within your
> > > virtual hosts. I am doing it Debian way. For a standard httpd.conf
> > > following should work:
> > >
> > > 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
> > >
> > > 2. Somewhere in the global part of httpd.conf
> > > --------------------------------------------------
> > >     #turning ProxyRequests on and allowing proxying from all may allow
> > >         #spammers to use your proxy to send email.
> > >
> > >         ProxyRequests Off
> > >
> > >         <Proxy *>
> > >                 AddDefaultCharset off
> > >                 Order deny,allow
> > >                 Allow from all
> > >                 #Allow from .example.com
> > >         </Proxy>
> > >
> > >         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
> > >         # ("Full" adds the server version; "Block" removes all outgoing
> > > Via: headers)
> > >         # Set to one of: Off | On | Full | Block
> > >
> > >         ProxyVia On
> > >
> > > 3. Inside your virtual host config
> > > -----------------------------------
> > >     ProxyPreserveHost On
> > >     proxyPass / ajp://localhost:8009/
> > >     RewriteEngine On
> > >     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
> > >
> > > That is it you need to make it work.
> > >
> > > Thanks,
> > >
> > > Raj
> > >
> > > Jacques Le Roux wrote:
> > > > >From this blog I'm not sure it's the good solution yet. Do you have
> > > > > valuable experience with it ?
> > > >
> > > > http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod_pr
> > > >oxy_ajp.html
> > > >
> > > > Jacques
> > > >
> > > > PS : though this links seem good points :
> > > > http://confluence.atlassian.com/display/DOC/Running+Confluence+behind+A
> > > >pache#comment-16121884
> > > > http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
> > > >
> > > > De : "Raj Saini" <ra...@gmail.com>
> > > >
> > > >> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is far
> > > >> simpler than mod_jk.
> > > >>
> > > >> Thanks,
> > > >>
> > > >> Raj
> > > >>
> > > >> Gautam Deb wrote:
> > > >>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in
> > > >>> that handles the communication between Tomcat and Apache. You can
> > > >>> refer the link
> > > >>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
> > > >>>
> > > >>> This way you can route request to the web container.
> > > >>>
> > > >>> Regards,
> > > >>> Gautam Deb
> > > >>>
> > > >>> On 8/12/07, Mathius Allo <mg...@yahoo.com> wrote:
> > > >>>> Hi All,
> > > >>>>
> > > >>>>   Is it possible to have a deployment configuration where Apache web
> > > >>>> server being used to route request to the web container?
> > > >>>>
> > > >>>>   How to deploy an OfBiz application within an Application Server?
> > > >>>>
> > > >>>>   Thanks in advanced.
> > > >>>>   Mathius
> > > >>>>
> > > >>>>
> > > >>>> ---------------------------------
> > > >>>> Pinpoint customers who are looking for what you sell.
> 
>

RE: Quantity discount pricing

Posted by "skip@theDevers" <sk...@thedevers.org>.
They are not random. Mostly like < 10 = list, 10 - 50 = price y, 51+ = price
z, and then a few odd balls.  However, I am betting that the resulting price
breaks are based on an underlying percentage.   I am importing price1 - 3,
and qty1 - qty3.

List, y and z vary greatly from one product to the next.

Too bad it's not a fixed percentage, that would be pretty easy.


More importantly, I have to import these prices into Ofbiz along with my
inventory import, so it would be helpful to know the entities involved.

I was thinking of adding a fromQty and thruQty to PriceRule.  That would
make it dead simple.  Alternatively, I could add a QuantityBreak entity
similiar to page 88 of the Data Model Resource Book, but it seems sensless
to create a whole new entity when two fields in ProductPrice would do it.

-----Original Message-----
From: Walter Vaughan [mailto:wvaughan@steelerubber.com]
Sent: Thursday, September 27, 2007 7:19 PM
To: user@ofbiz.apache.org
Subject: Re: Quantity discount pricing


skip@theDevers wrote:

> Can someone tell me how to implement quantity price breaks?  I somehow
> thought there a "minOrderQuantity" field and "QTY_DISCOUNT_PRICE", and
> "QTY_DISCOUNT_PERCENTAGE"  productPriceTypeIds, in ProductPrice, but I
can't
> seem to find them now.
>
> I am looking in PriceServices.java and there seems to be some support for
> quantity breaks using ProductPriceRule, but because
> "optimizeForLargeRuleSet" is hardcoded "false" with no way to change it,
it
> looks to me like it will be impossibly slow because EVERY product for the
> current customer has two price breaks (thats a total of 140,000+ price
rules
> to sort through).

I'm guessing Price Rules could work. Are the quantity breaks random, or is
logical? I mean 1-5qty Full Price, 6-9qty 10% off, 10 or more 15% off?
Or is it more insane like productId A is 1-5, productId B is 1-3? Z 1-500?
Even if appears random, is there some sort of pattern from which you could
create groups (Product Classifications)?
Product Classifications can be your friend. We have thousands of Product
Classifications, yet only a handful of price rules.

In case you didn't realize it price rules add together, and you may have to
create offseting rules to get the price where you want it.

> Can someone offer guidance or should I modify ProductPrice to suite my
needs
> and hope that you guys will roll it back in.
>
> Skip
>
>
>



RE: Stumped on a complicated question

Posted by Skip <sk...@thedevers.org>.
For those of you who are interested in this low level stuff, here is a
solution to the classpath issue.  If anyone wants ClassPathUpdate class,
just shoot me an email:

public class main
{
	public main(String[] args)
	{

		ClassLoader loader = ClassLoader.getSystemClassLoader();
		if(loader instanceof URLClassLoader)
		{
			//For convenience so we don't have to cast everything
			URLClassLoader urlLoader = (URLClassLoader)loader;

			//Get the existing jars in the class path and show them
			URL [] urls = urlLoader.getURLs();
			showUrls(urls, "Before");

			System.out.println("Trying to add url
C:\\jdk1.5\\jre\\lib\\ext.sav\\servlet.jar");
			try
			{
				//Add a new one
				ClassPathUpdater.addFile("C:\\jdk1.5\\jre\\lib\\ext.sav\\servlet.jar",
urlLoader);
				System.out.println("!!!!!Success");

				//Show the results after
				urls = urlLoader.getURLs();
				showUrls(urls, "\nAfter");
			}
			catch(Exception e)
			{
				e.printStackTrace();
			}

		}
		else
		{
			System.out.println(loader.getClass().getName() + " is not a
URLClassLoader");
		}
	}
	....


And here is the results of the run,  Note that the added file "servlet.jar"
is now in the classpath in the "After" block:

...test>java -cp test.jar main
Before, Got 1 URLs = :
URL[0] = file:/D:/JavaProjects/ClassLoader/test/test.jar

Trying to add url C:\jdk1.5\jre\lib\ext.sav\servlet.jar
!!!!!Success

After, Got 2 URLs = :
URL[0] = file:/D:/JavaProjects/ClassLoader/test/test.jar
URL[1] = file:/C:/jdk1.5/jre/lib/ext.sav/servlet.jar





> skip@theDevers sent the following on 9/27/2007 10:30 PM:
>> I am getting the following error:
>>
>> java.lang.ClassNotFoundException:
>> org.ofbiz.service.engine.StandardJavaEngine
>>
>> On this line 81 of
>> org.ofbiz.service.engine.GenericEngineFactory.getGenericEngine:
>>
>>   Class c = loader.loadClass(className);
>>
>>
>> I am running ofbiz as a standalone app, similiar to java ofbiz.jar -pos
>>
>> I don't get this problem when I run Ofbiz normally using the same "login"
>> service.
>>
>> Somehow, it appears as if ofbiz-service.jar is not on the class path or
>> cannot be accessed.  I even went so far as to copy it into my lib
> directory
>> with my jar file where it is referenced by my ofbiz-component.xml as:
>>
>>     <classpath type="jar" location="dist/*"/>
>>     <classpath type="jar" location="dist/lib/*"/>
>>
>> No joy.  I am referencing lots of other Ofbiz jar files and they all load
>> just fine, for example ofbiz-base.jar, ofbiz-security.jar, and
>> ofbiz-party.jar.  For some reason, the class loader will not load the
>> service engine.  I only get a problem when I try to call a service with
>> "dispatcher.runSync()".  I have been successfully reading and writing the
>> the database via GenericDelegator without problem.  Just when I try to
run
> a
>> service.
>>
>> This is running under windows, jdk 1.5 and the Ofbiz version of a week
> ago.
>> For completeness, here is my containers.xml file:
>>
>> <ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>
>>
>
xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/ofbiz-containers.xs
>> d">
>>     <!-- load the ofbiz component container (always first) -->
>>     <container name="component-container"
>> class="org.ofbiz.base.container.ComponentContainer"/>
>>
>>     <!-- load the cached classloader container (always second) -->
>>     <container name="classloader-container"
>> class="org.ofbiz.base.container.ClassLoaderContainer"/>
>>
>>     <!-- load the FS Sales Order Entry GUI -->
>>     <container name="fssoe-container" class="com.fs.FSSoeContainer">
>>         <property name="startup-directory"
>> value="/specialpurpose/fs/config/"/>
>>         <property name="dispatcher-name" value="FSSoeDispatcher"/>
>>         <property name="delegator-name" value="default"/>
>>     </container>
>>
>> </ofbiz-containers>
>>
>> Anyone have a clue.  I'd hate to do this thing entirely without using the
>> Ofbiz services.
>>
>> Skip
>>
>>
>>
>>
>>
>
>
>
>


Re: Stumped on a complicated question

Posted by BJ Freeman <bj...@free-man.net>.
Oh your doing custom stuff.
can't help there.

Skip sent the following on 9/28/2007 9:15 AM:
> BJ
> 
> I'll check this, but I think I have figured out a way.  The classloader of
> the thread that instantiates my container has the necessary url's.  However,
> because this is a java -jar startup, classpath is ignored by the default
> classloader.
> 
> So, (I think), all I gotta do is call ClassLoader.getURLs() from the Ofbiz
> thread, save them away, then call addURL(URL url) on the gui thread to add
> them in.  I know addURL(URL url) is protected, but I am pretty sure I know
> how to get around that.  Unfortunately, I am at my main job now and cant try
> it out.  Can't wait to get home to give it a go.
> 
> Skip
> 
> -----Original Message-----
> From: BJ Freeman [mailto:bjfree@free-man.net]
> Sent: Friday, September 28, 2007 8:22 AM
> To: user@ofbiz.apache.org
> Subject: Re: Stumped on a complicated question
> 
> 
> did you check the log to see of services is getting loaded.
> (main) [            UtilXml.java:243:DEBUG] XML Read 0.047s:
> file:/C:/projects/java/digiresourcesllc/framework/service/ofbiz-component.xm
> l
> (main) [ ComponentContainer.java:207:INFO ] Loading component : [service]
> 
> 
> skip@theDevers sent the following on 9/28/2007 6:25 AM:
>> Yep, I gathered that.  Note that the class loader is retrieved with:
>>
>>  ClassLoader loader = Thread.currentThread().getContextClassLoader();
>>
>> I am guessing that the GUI thread does not have the application classpath.
>> The question is, how to give it.  At runtime, I know exactly where all
> these
>> jar file are.
>>
>> Skip
>>
>> -----Original Message-----
>> From: BJ Freeman [mailto:bjfree@free-man.net]
>> Sent: Friday, September 28, 2007 1:44 AM
>> To: user@ofbiz.apache.org
>> Subject: Re: Stumped on a complicated question
>>
>>
>> would seem you don't have a classpath to the service engine.
>>
>> skip@theDevers sent the following on 9/27/2007 10:30 PM:
>>> I am getting the following error:
>>>
>>> java.lang.ClassNotFoundException:
>>> org.ofbiz.service.engine.StandardJavaEngine
>>>
>>> On this line 81 of
>>> org.ofbiz.service.engine.GenericEngineFactory.getGenericEngine:
>>>
>>>   Class c = loader.loadClass(className);
>>>
>>>
>>> I am running ofbiz as a standalone app, similiar to java ofbiz.jar -pos
>>>
>>> I don't get this problem when I run Ofbiz normally using the same "login"
>>> service.
>>>
>>> Somehow, it appears as if ofbiz-service.jar is not on the class path or
>>> cannot be accessed.  I even went so far as to copy it into my lib
>> directory
>>> with my jar file where it is referenced by my ofbiz-component.xml as:
>>>
>>>     <classpath type="jar" location="dist/*"/>
>>>     <classpath type="jar" location="dist/lib/*"/>
>>>
>>> No joy.  I am referencing lots of other Ofbiz jar files and they all load
>>> just fine, for example ofbiz-base.jar, ofbiz-security.jar, and
>>> ofbiz-party.jar.  For some reason, the class loader will not load the
>>> service engine.  I only get a problem when I try to call a service with
>>> "dispatcher.runSync()".  I have been successfully reading and writing the
>>> the database via GenericDelegator without problem.  Just when I try to
> run
>> a
>>> service.
>>>
>>> This is running under windows, jdk 1.5 and the Ofbiz version of a week
>> ago.
>>> For completeness, here is my containers.xml file:
>>>
>>> <ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>
>>>
> xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/ofbiz-containers.xs
>>> d">
>>>     <!-- load the ofbiz component container (always first) -->
>>>     <container name="component-container"
>>> class="org.ofbiz.base.container.ComponentContainer"/>
>>>
>>>     <!-- load the cached classloader container (always second) -->
>>>     <container name="classloader-container"
>>> class="org.ofbiz.base.container.ClassLoaderContainer"/>
>>>
>>>     <!-- load the FS Sales Order Entry GUI -->
>>>     <container name="fssoe-container" class="com.fs.FSSoeContainer">
>>>         <property name="startup-directory"
>>> value="/specialpurpose/fs/config/"/>
>>>         <property name="dispatcher-name" value="FSSoeDispatcher"/>
>>>         <property name="delegator-name" value="default"/>
>>>     </container>
>>>
>>> </ofbiz-containers>
>>>
>>> Anyone have a clue.  I'd hate to do this thing entirely without using the
>>> Ofbiz services.
>>>
>>> Skip
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
> 
> 
> 
> 

RE: Stumped on a complicated question

Posted by Skip <sk...@thedevers.org>.
BJ

I'll check this, but I think I have figured out a way.  The classloader of
the thread that instantiates my container has the necessary url's.  However,
because this is a java -jar startup, classpath is ignored by the default
classloader.

So, (I think), all I gotta do is call ClassLoader.getURLs() from the Ofbiz
thread, save them away, then call addURL(URL url) on the gui thread to add
them in.  I know addURL(URL url) is protected, but I am pretty sure I know
how to get around that.  Unfortunately, I am at my main job now and cant try
it out.  Can't wait to get home to give it a go.

Skip

-----Original Message-----
From: BJ Freeman [mailto:bjfree@free-man.net]
Sent: Friday, September 28, 2007 8:22 AM
To: user@ofbiz.apache.org
Subject: Re: Stumped on a complicated question


did you check the log to see of services is getting loaded.
(main) [            UtilXml.java:243:DEBUG] XML Read 0.047s:
file:/C:/projects/java/digiresourcesllc/framework/service/ofbiz-component.xm
l
(main) [ ComponentContainer.java:207:INFO ] Loading component : [service]


skip@theDevers sent the following on 9/28/2007 6:25 AM:
> Yep, I gathered that.  Note that the class loader is retrieved with:
>
>  ClassLoader loader = Thread.currentThread().getContextClassLoader();
>
> I am guessing that the GUI thread does not have the application classpath.
> The question is, how to give it.  At runtime, I know exactly where all
these
> jar file are.
>
> Skip
>
> -----Original Message-----
> From: BJ Freeman [mailto:bjfree@free-man.net]
> Sent: Friday, September 28, 2007 1:44 AM
> To: user@ofbiz.apache.org
> Subject: Re: Stumped on a complicated question
>
>
> would seem you don't have a classpath to the service engine.
>
> skip@theDevers sent the following on 9/27/2007 10:30 PM:
>> I am getting the following error:
>>
>> java.lang.ClassNotFoundException:
>> org.ofbiz.service.engine.StandardJavaEngine
>>
>> On this line 81 of
>> org.ofbiz.service.engine.GenericEngineFactory.getGenericEngine:
>>
>>   Class c = loader.loadClass(className);
>>
>>
>> I am running ofbiz as a standalone app, similiar to java ofbiz.jar -pos
>>
>> I don't get this problem when I run Ofbiz normally using the same "login"
>> service.
>>
>> Somehow, it appears as if ofbiz-service.jar is not on the class path or
>> cannot be accessed.  I even went so far as to copy it into my lib
> directory
>> with my jar file where it is referenced by my ofbiz-component.xml as:
>>
>>     <classpath type="jar" location="dist/*"/>
>>     <classpath type="jar" location="dist/lib/*"/>
>>
>> No joy.  I am referencing lots of other Ofbiz jar files and they all load
>> just fine, for example ofbiz-base.jar, ofbiz-security.jar, and
>> ofbiz-party.jar.  For some reason, the class loader will not load the
>> service engine.  I only get a problem when I try to call a service with
>> "dispatcher.runSync()".  I have been successfully reading and writing the
>> the database via GenericDelegator without problem.  Just when I try to
run
> a
>> service.
>>
>> This is running under windows, jdk 1.5 and the Ofbiz version of a week
> ago.
>> For completeness, here is my containers.xml file:
>>
>> <ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>
>>
>
xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/ofbiz-containers.xs
>> d">
>>     <!-- load the ofbiz component container (always first) -->
>>     <container name="component-container"
>> class="org.ofbiz.base.container.ComponentContainer"/>
>>
>>     <!-- load the cached classloader container (always second) -->
>>     <container name="classloader-container"
>> class="org.ofbiz.base.container.ClassLoaderContainer"/>
>>
>>     <!-- load the FS Sales Order Entry GUI -->
>>     <container name="fssoe-container" class="com.fs.FSSoeContainer">
>>         <property name="startup-directory"
>> value="/specialpurpose/fs/config/"/>
>>         <property name="dispatcher-name" value="FSSoeDispatcher"/>
>>         <property name="delegator-name" value="default"/>
>>     </container>
>>
>> </ofbiz-containers>
>>
>> Anyone have a clue.  I'd hate to do this thing entirely without using the
>> Ofbiz services.
>>
>> Skip
>>
>>
>>
>>
>>
>
>
>
>


Re: Stumped on a complicated question

Posted by BJ Freeman <bj...@free-man.net>.
did you check the log to see of services is getting loaded.
(main) [            UtilXml.java:243:DEBUG] XML Read 0.047s:
file:/C:/projects/java/digiresourcesllc/framework/service/ofbiz-component.xml
(main) [ ComponentContainer.java:207:INFO ] Loading component : [service]


skip@theDevers sent the following on 9/28/2007 6:25 AM:
> Yep, I gathered that.  Note that the class loader is retrieved with:
> 
>  ClassLoader loader = Thread.currentThread().getContextClassLoader();
> 
> I am guessing that the GUI thread does not have the application classpath.
> The question is, how to give it.  At runtime, I know exactly where all these
> jar file are.
> 
> Skip
> 
> -----Original Message-----
> From: BJ Freeman [mailto:bjfree@free-man.net]
> Sent: Friday, September 28, 2007 1:44 AM
> To: user@ofbiz.apache.org
> Subject: Re: Stumped on a complicated question
> 
> 
> would seem you don't have a classpath to the service engine.
> 
> skip@theDevers sent the following on 9/27/2007 10:30 PM:
>> I am getting the following error:
>>
>> java.lang.ClassNotFoundException:
>> org.ofbiz.service.engine.StandardJavaEngine
>>
>> On this line 81 of
>> org.ofbiz.service.engine.GenericEngineFactory.getGenericEngine:
>>
>>   Class c = loader.loadClass(className);
>>
>>
>> I am running ofbiz as a standalone app, similiar to java ofbiz.jar -pos
>>
>> I don't get this problem when I run Ofbiz normally using the same "login"
>> service.
>>
>> Somehow, it appears as if ofbiz-service.jar is not on the class path or
>> cannot be accessed.  I even went so far as to copy it into my lib
> directory
>> with my jar file where it is referenced by my ofbiz-component.xml as:
>>
>>     <classpath type="jar" location="dist/*"/>
>>     <classpath type="jar" location="dist/lib/*"/>
>>
>> No joy.  I am referencing lots of other Ofbiz jar files and they all load
>> just fine, for example ofbiz-base.jar, ofbiz-security.jar, and
>> ofbiz-party.jar.  For some reason, the class loader will not load the
>> service engine.  I only get a problem when I try to call a service with
>> "dispatcher.runSync()".  I have been successfully reading and writing the
>> the database via GenericDelegator without problem.  Just when I try to run
> a
>> service.
>>
>> This is running under windows, jdk 1.5 and the Ofbiz version of a week
> ago.
>> For completeness, here is my containers.xml file:
>>
>> <ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>
>>
> xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/ofbiz-containers.xs
>> d">
>>     <!-- load the ofbiz component container (always first) -->
>>     <container name="component-container"
>> class="org.ofbiz.base.container.ComponentContainer"/>
>>
>>     <!-- load the cached classloader container (always second) -->
>>     <container name="classloader-container"
>> class="org.ofbiz.base.container.ClassLoaderContainer"/>
>>
>>     <!-- load the FS Sales Order Entry GUI -->
>>     <container name="fssoe-container" class="com.fs.FSSoeContainer">
>>         <property name="startup-directory"
>> value="/specialpurpose/fs/config/"/>
>>         <property name="dispatcher-name" value="FSSoeDispatcher"/>
>>         <property name="delegator-name" value="default"/>
>>     </container>
>>
>> </ofbiz-containers>
>>
>> Anyone have a clue.  I'd hate to do this thing entirely without using the
>> Ofbiz services.
>>
>> Skip
>>
>>
>>
>>
>>
> 
> 
> 
> 

RE: Stumped on a complicated question

Posted by "skip@theDevers" <sk...@thedevers.org>.
Yep, I gathered that.  Note that the class loader is retrieved with:

 ClassLoader loader = Thread.currentThread().getContextClassLoader();

I am guessing that the GUI thread does not have the application classpath.
The question is, how to give it.  At runtime, I know exactly where all these
jar file are.

Skip

-----Original Message-----
From: BJ Freeman [mailto:bjfree@free-man.net]
Sent: Friday, September 28, 2007 1:44 AM
To: user@ofbiz.apache.org
Subject: Re: Stumped on a complicated question


would seem you don't have a classpath to the service engine.

skip@theDevers sent the following on 9/27/2007 10:30 PM:
> I am getting the following error:
>
> java.lang.ClassNotFoundException:
> org.ofbiz.service.engine.StandardJavaEngine
>
> On this line 81 of
> org.ofbiz.service.engine.GenericEngineFactory.getGenericEngine:
>
>   Class c = loader.loadClass(className);
>
>
> I am running ofbiz as a standalone app, similiar to java ofbiz.jar -pos
>
> I don't get this problem when I run Ofbiz normally using the same "login"
> service.
>
> Somehow, it appears as if ofbiz-service.jar is not on the class path or
> cannot be accessed.  I even went so far as to copy it into my lib
directory
> with my jar file where it is referenced by my ofbiz-component.xml as:
>
>     <classpath type="jar" location="dist/*"/>
>     <classpath type="jar" location="dist/lib/*"/>
>
> No joy.  I am referencing lots of other Ofbiz jar files and they all load
> just fine, for example ofbiz-base.jar, ofbiz-security.jar, and
> ofbiz-party.jar.  For some reason, the class loader will not load the
> service engine.  I only get a problem when I try to call a service with
> "dispatcher.runSync()".  I have been successfully reading and writing the
> the database via GenericDelegator without problem.  Just when I try to run
a
> service.
>
> This is running under windows, jdk 1.5 and the Ofbiz version of a week
ago.
>
> For completeness, here is my containers.xml file:
>
> <ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
>
xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/ofbiz-containers.xs
> d">
>     <!-- load the ofbiz component container (always first) -->
>     <container name="component-container"
> class="org.ofbiz.base.container.ComponentContainer"/>
>
>     <!-- load the cached classloader container (always second) -->
>     <container name="classloader-container"
> class="org.ofbiz.base.container.ClassLoaderContainer"/>
>
>     <!-- load the FS Sales Order Entry GUI -->
>     <container name="fssoe-container" class="com.fs.FSSoeContainer">
>         <property name="startup-directory"
> value="/specialpurpose/fs/config/"/>
>         <property name="dispatcher-name" value="FSSoeDispatcher"/>
>         <property name="delegator-name" value="default"/>
>     </container>
>
> </ofbiz-containers>
>
> Anyone have a clue.  I'd hate to do this thing entirely without using the
> Ofbiz services.
>
> Skip
>
>
>
>
>


Re: Stumped on a complicated question

Posted by BJ Freeman <bj...@free-man.net>.
would seem you don't have a classpath to the service engine.

skip@theDevers sent the following on 9/27/2007 10:30 PM:
> I am getting the following error:
> 
> java.lang.ClassNotFoundException:
> org.ofbiz.service.engine.StandardJavaEngine
> 
> On this line 81 of
> org.ofbiz.service.engine.GenericEngineFactory.getGenericEngine:
> 
>   Class c = loader.loadClass(className);
> 
> 
> I am running ofbiz as a standalone app, similiar to java ofbiz.jar -pos
> 
> I don't get this problem when I run Ofbiz normally using the same "login"
> service.
> 
> Somehow, it appears as if ofbiz-service.jar is not on the class path or
> cannot be accessed.  I even went so far as to copy it into my lib directory
> with my jar file where it is referenced by my ofbiz-component.xml as:
> 
>     <classpath type="jar" location="dist/*"/>
>     <classpath type="jar" location="dist/lib/*"/>
> 
> No joy.  I am referencing lots of other Ofbiz jar files and they all load
> just fine, for example ofbiz-base.jar, ofbiz-security.jar, and
> ofbiz-party.jar.  For some reason, the class loader will not load the
> service engine.  I only get a problem when I try to call a service with
> "dispatcher.runSync()".  I have been successfully reading and writing the
> the database via GenericDelegator without problem.  Just when I try to run a
> service.
> 
> This is running under windows, jdk 1.5 and the Ofbiz version of a week ago.
> 
> For completeness, here is my containers.xml file:
> 
> <ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 
> xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/ofbiz-containers.xs
> d">
>     <!-- load the ofbiz component container (always first) -->
>     <container name="component-container"
> class="org.ofbiz.base.container.ComponentContainer"/>
> 
>     <!-- load the cached classloader container (always second) -->
>     <container name="classloader-container"
> class="org.ofbiz.base.container.ClassLoaderContainer"/>
> 
>     <!-- load the FS Sales Order Entry GUI -->
>     <container name="fssoe-container" class="com.fs.FSSoeContainer">
>         <property name="startup-directory"
> value="/specialpurpose/fs/config/"/>
>         <property name="dispatcher-name" value="FSSoeDispatcher"/>
>         <property name="delegator-name" value="default"/>
>     </container>
> 
> </ofbiz-containers>
> 
> Anyone have a clue.  I'd hate to do this thing entirely without using the
> Ofbiz services.
> 
> Skip
> 
> 
> 
> 
> 

Stumped on a complicated question

Posted by "skip@theDevers" <sk...@thedevers.org>.
I am getting the following error:

java.lang.ClassNotFoundException:
org.ofbiz.service.engine.StandardJavaEngine

On this line 81 of
org.ofbiz.service.engine.GenericEngineFactory.getGenericEngine:

  Class c = loader.loadClass(className);


I am running ofbiz as a standalone app, similiar to java ofbiz.jar -pos

I don't get this problem when I run Ofbiz normally using the same "login"
service.

Somehow, it appears as if ofbiz-service.jar is not on the class path or
cannot be accessed.  I even went so far as to copy it into my lib directory
with my jar file where it is referenced by my ofbiz-component.xml as:

    <classpath type="jar" location="dist/*"/>
    <classpath type="jar" location="dist/lib/*"/>

No joy.  I am referencing lots of other Ofbiz jar files and they all load
just fine, for example ofbiz-base.jar, ofbiz-security.jar, and
ofbiz-party.jar.  For some reason, the class loader will not load the
service engine.  I only get a problem when I try to call a service with
"dispatcher.runSync()".  I have been successfully reading and writing the
the database via GenericDelegator without problem.  Just when I try to run a
service.

This is running under windows, jdk 1.5 and the Ofbiz version of a week ago.

For completeness, here is my containers.xml file:

<ofbiz-containers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/ofbiz-containers.xs
d">
    <!-- load the ofbiz component container (always first) -->
    <container name="component-container"
class="org.ofbiz.base.container.ComponentContainer"/>

    <!-- load the cached classloader container (always second) -->
    <container name="classloader-container"
class="org.ofbiz.base.container.ClassLoaderContainer"/>

    <!-- load the FS Sales Order Entry GUI -->
    <container name="fssoe-container" class="com.fs.FSSoeContainer">
        <property name="startup-directory"
value="/specialpurpose/fs/config/"/>
        <property name="dispatcher-name" value="FSSoeDispatcher"/>
        <property name="delegator-name" value="default"/>
    </container>

</ofbiz-containers>

Anyone have a clue.  I'd hate to do this thing entirely without using the
Ofbiz services.

Skip



Re: Quantity discount pricing

Posted by Walter Vaughan <wv...@steelerubber.com>.
skip@theDevers wrote:

> Can someone tell me how to implement quantity price breaks?  I somehow
> thought there a "minOrderQuantity" field and "QTY_DISCOUNT_PRICE", and
> "QTY_DISCOUNT_PERCENTAGE"  productPriceTypeIds, in ProductPrice, but I can't
> seem to find them now.
> 
> I am looking in PriceServices.java and there seems to be some support for
> quantity breaks using ProductPriceRule, but because
> "optimizeForLargeRuleSet" is hardcoded "false" with no way to change it, it
> looks to me like it will be impossibly slow because EVERY product for the
> current customer has two price breaks (thats a total of 140,000+ price rules
> to sort through).

I'm guessing Price Rules could work. Are the quantity breaks random, or is 
logical? I mean 1-5qty Full Price, 6-9qty 10% off, 10 or more 15% off?
Or is it more insane like productId A is 1-5, productId B is 1-3? Z 1-500?
Even if appears random, is there some sort of pattern from which you could 
create groups (Product Classifications)?
Product Classifications can be your friend. We have thousands of Product 
Classifications, yet only a handful of price rules.

In case you didn't realize it price rules add together, and you may have to 
create offseting rules to get the price where you want it.

> Can someone offer guidance or should I modify ProductPrice to suite my needs
> and hope that you guys will roll it back in.
> 
> Skip
> 
> 
> 


Quantity discount pricing

Posted by "skip@theDevers" <sk...@thedevers.org>.
Can someone tell me how to implement quantity price breaks?  I somehow
thought there a "minOrderQuantity" field and "QTY_DISCOUNT_PRICE", and
"QTY_DISCOUNT_PERCENTAGE"  productPriceTypeIds, in ProductPrice, but I can't
seem to find them now.

I am looking in PriceServices.java and there seems to be some support for
quantity breaks using ProductPriceRule, but because
"optimizeForLargeRuleSet" is hardcoded "false" with no way to change it, it
looks to me like it will be impossibly slow because EVERY product for the
current customer has two price breaks (thats a total of 140,000+ price rules
to sort through).

Can someone offer guidance or should I modify ProductPrice to suite my needs
and hope that you guys will roll it back in.

Skip


Re: How to configure OFBiz with Apache Web Server or Application Server

Posted by David Goodenough <da...@linkchoose.co.uk>.
Did you manage to put it in your FAQ, and is there a URL to that FAQ?

I am having problem in that this Apache Web server is also serving a number
of other (non Java) things, and when I try to add this ProxyPass it gets
confused with the /image files, and tries to get them from /var/www/images
which of course does not work.  I tried moving the ProxyPass stuff to the
front of the VirtualHost, but that made no difference.

David

On Sunday 12 August 2007, Jacques Le Roux wrote:
> Thanks a lot Raj,
>
> I think I will try it soon and hopefully put your tip in "my" FAQ on
> Confluence !  It's clearly far easier than mod_jk and moreover if it's
> faster then it should be the new way of doing that...
>
> Jacques
>
> De : "Raj Saini" <ra...@gmail.com>
>
> > Yes, I have configured our Ofbiz + Apache HTTP 2.2 with mod_ajp_proxy.
> > You will need to enable proxy for httpd and  mod_proxy_ajp within your
> > virtual hosts. I am doing it Debian way. For a standard httpd.conf
> > following should work:
> >
> > 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
> >
> > 2. Somewhere in the global part of httpd.conf
> > --------------------------------------------------
> >     #turning ProxyRequests on and allowing proxying from all may allow
> >         #spammers to use your proxy to send email.
> >
> >         ProxyRequests Off
> >
> >         <Proxy *>
> >                 AddDefaultCharset off
> >                 Order deny,allow
> >                 Allow from all
> >                 #Allow from .example.com
> >         </Proxy>
> >
> >         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
> >         # ("Full" adds the server version; "Block" removes all outgoing
> > Via: headers)
> >         # Set to one of: Off | On | Full | Block
> >
> >         ProxyVia On
> >
> > 3. Inside your virtual host config
> > -----------------------------------
> >     ProxyPreserveHost On
> >     proxyPass / ajp://localhost:8009/
> >     RewriteEngine On
> >     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
> >
> > That is it you need to make it work.
> >
> > Thanks,
> >
> > Raj
> >
> > Jacques Le Roux wrote:
> > > >From this blog I'm not sure it's the good solution yet. Do you have
> > > > valuable experience with it ?
> > >
> > > http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod_pr
> > >oxy_ajp.html
> > >
> > > Jacques
> > >
> > > PS : though this links seem good points :
> > > http://confluence.atlassian.com/display/DOC/Running+Confluence+behind+A
> > >pache#comment-16121884
> > > http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
> > >
> > > De : "Raj Saini" <ra...@gmail.com>
> > >
> > >> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is far
> > >> simpler than mod_jk.
> > >>
> > >> Thanks,
> > >>
> > >> Raj
> > >>
> > >> Gautam Deb wrote:
> > >>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in
> > >>> that handles the communication between Tomcat and Apache. You can
> > >>> refer the link
> > >>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
> > >>>
> > >>> This way you can route request to the web container.
> > >>>
> > >>> Regards,
> > >>> Gautam Deb
> > >>>
> > >>> On 8/12/07, Mathius Allo <mg...@yahoo.com> wrote:
> > >>>> Hi All,
> > >>>>
> > >>>>   Is it possible to have a deployment configuration where Apache web
> > >>>> server being used to route request to the web container?
> > >>>>
> > >>>>   How to deploy an OfBiz application within an Application Server?
> > >>>>
> > >>>>   Thanks in advanced.
> > >>>>   Mathius
> > >>>>
> > >>>>
> > >>>> ---------------------------------
> > >>>> Pinpoint customers who are looking for what you sell.



Re: How to configure OFBiz with Apache Web Server or Application Server

Posted by Jacques Le Roux <jl...@apache.org>.
Thanks a lot Raj,

I think I will try it soon and hopefully put your tip in "my" FAQ on Confluence !  It's clearly far easier than mod_jk and moreover
if it's faster then it should be the new way of doing that...

Jacques

De : "Raj Saini" <ra...@gmail.com>
> Yes, I have configured our Ofbiz + Apache HTTP 2.2 with mod_ajp_proxy.
> You will need to enable proxy for httpd and  mod_proxy_ajp within your
> virtual hosts. I am doing it Debian way. For a standard httpd.conf
> following should work:
>
> 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
>
> 2. Somewhere in the global part of httpd.conf
> --------------------------------------------------
>     #turning ProxyRequests on and allowing proxying from all may allow
>         #spammers to use your proxy to send email.
>
>         ProxyRequests Off
>
>         <Proxy *>
>                 AddDefaultCharset off
>                 Order deny,allow
>                 Allow from all
>                 #Allow from .example.com
>         </Proxy>
>
>         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
>         # ("Full" adds the server version; "Block" removes all outgoing
> Via: headers)
>         # Set to one of: Off | On | Full | Block
>
>         ProxyVia On
>
> 3. Inside your virtual host config
> -----------------------------------
>     ProxyPreserveHost On
>     proxyPass / ajp://localhost:8009/
>     RewriteEngine On
>     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
>
> That is it you need to make it work.
>
> Thanks,
>
> Raj
>
> Jacques Le Roux wrote:
> > >From this blog I'm not sure it's the good solution yet. Do you have valuable experience with it ?
> >
> > http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod_proxy_ajp.html
> >
> > Jacques
> >
> > PS : though this links seem good points :
> > http://confluence.atlassian.com/display/DOC/Running+Confluence+behind+Apache#comment-16121884
> > http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
> >
> > De : "Raj Saini" <ra...@gmail.com>
> >
> >> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is far
> >> simpler than mod_jk.
> >>
> >> Thanks,
> >>
> >> Raj
> >> Gautam Deb wrote:
> >>
> >>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in that
> >>> handles the communication between Tomcat and Apache. You can refer the link
> >>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
> >>>
> >>> This way you can route request to the web container.
> >>>
> >>> Regards,
> >>> Gautam Deb
> >>>
> >>> On 8/12/07, Mathius Allo <mg...@yahoo.com> wrote:
> >>>
> >>>
> >>>> Hi All,
> >>>>
> >>>>   Is it possible to have a deployment configuration where Apache web
> >>>> server being used to route request to the web container?
> >>>>
> >>>>   How to deploy an OfBiz application within an Application Server?
> >>>>
> >>>>   Thanks in advanced.
> >>>>   Mathius
> >>>>
> >>>>
> >>>> ---------------------------------
> >>>> Pinpoint customers who are looking for what you sell.
> >>>>
> >>>>
> >>>
> >
> >


Re: How to configure OFBiz with Apache Web Server or Application Server

Posted by Raj Saini <ra...@gmail.com>.
I think site settings in the Content tab are used for e-commerce. For 
back office application, url.properties is used. Someone please correct 
if I am wrong.

Thanks,

Raj

David Goodenough wrote:
> Is there a guide as to what might be need to be put in the url.properties file
> or what we might need to enter under the Content Tab?
>
> David
>
> On Sunday 19 August 2007, Raj Saini wrote:
>   
>> Hi Mathius,
>>
>> You will need to fine tune your  settings in the url.properties file.
>> For ecommerce, you can do that in the web site under content tab.
>>
>> Thanks,
>>
>> Raj
>>
>> Mathius Allo wrote:
>>     
>>> Hi Raj,
>>>
>>> I have tried to configure it using mod_proxy_ajp. The only changes that I
>>> made is to add the following line into proxy_ajp.conf under
>>> /etc/httpd/conf.d/ (i'm using FC5): LoadModule proxy_ajp_module
>>> modules/mod_proxy_ajp.so
>>>
>>>     ProxyPass / ajp://localhost:8009
>>>
>>> This seems to be working for non-ssl. I can access my module in the
>>> following: http://www.mallo.com/customer/
>>> apache & tomcat access_log indicates that everything is ok.
>>>
>>> However, when trying to access modules that require ssl port ":8443"
>>> appears automatically the URL
>>> (https://www.mallo.com:8443/project/control/main)  and I noticed the
>>> following in the apache access_log: 192.168.1.65 - -
>>> [18/Aug/2007:20:49:13 +0800] "GET
>>> /project/control/main?externalLoginKey=EL994157896198 HTTP/1.1" 302 -
>>> "http://www.mallo.com/customer/control/editCustomer?customerId=10000"
>>> "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070417
>>> Fedora/2.0.0.3-4.fc7 Firefox/2.0.0.3"
>>>
>>> After the above message, accessing non-ssl module does not seems to go
>>> through apache (even though I don't see :8080 in the URL) as I don't see
>>> any entry in the apache access_log.
>>>
>>> Any idea on how to make it work for https?
>>>
>>> Thanks,
>>> Mathius Allo
>>>
>>> Raj Saini <ra...@gmail.com> wrote: Yes, I have configured our Ofbiz +
>>> Apache HTTP 2.2 with mod_ajp_proxy. You will need to enable proxy for
>>> httpd and  mod_proxy_ajp within your virtual hosts. I am doing it Debian
>>> way. For a standard httpd.conf following should work:
>>>
>>> 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
>>>
>>> 2. Somewhere in the global part of httpd.conf
>>> --------------------------------------------------
>>>     #turning ProxyRequests on and allowing proxying from all may allow
>>>         #spammers to use your proxy to send email.
>>>
>>>         ProxyRequests Off
>>>
>>>
>>>
>>>                 AddDefaultCharset off
>>>                 Order deny,allow
>>>                 Allow from all
>>>                 #Allow from .example.com
>>>
>>>
>>>
>>>         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
>>>         # ("Full" adds the server version; "Block" removes all outgoing
>>> Via: headers)
>>>         # Set to one of: Off | On | Full | Block
>>>
>>>         ProxyVia On
>>>
>>> 3. Inside your virtual host config
>>> -----------------------------------
>>>     ProxyPreserveHost On
>>>     proxyPass / ajp://localhost:8009/
>>>     RewriteEngine On
>>>     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
>>>
>>> That is it you need to make it work.
>>>
>>> Thanks,
>>>
>>> Raj
>>>
>>> Jacques Le Roux wrote:
>>>       
>>>> >From this blog I'm not sure it's the good solution yet. Do you have
>>>>         
>>>>> valuable experience with it ?
>>>>>           
>>>> http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod_pro
>>>> xy_ajp.html
>>>>
>>>> Jacques
>>>>
>>>> PS : though this links seem good points :
>>>> http://confluence.atlassian.com/display/DOC/Running+Confluence+behind+Ap
>>>> ache#comment-16121884
>>>> http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
>>>>
>>>> De : "Raj Saini"
>>>>
>>>>         
>>>>> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is far
>>>>> simpler than mod_jk.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Raj
>>>>>
>>>>> Gautam Deb wrote:
>>>>>           
>>>>>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in
>>>>>> that handles the communication between Tomcat and Apache. You can
>>>>>> refer the link
>>>>>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
>>>>>>
>>>>>> This way you can route request to the web container.
>>>>>>
>>>>>> Regards,
>>>>>> Gautam Deb
>>>>>>
>>>>>> On 8/12/07, Mathius Allo  wrote:
>>>>>>             
>>>>>>> Hi All,
>>>>>>>
>>>>>>>   Is it possible to have a deployment configuration where Apache web
>>>>>>> server being used to route request to the web container?
>>>>>>>
>>>>>>>   How to deploy an OfBiz application within an Application Server?
>>>>>>>
>>>>>>>   Thanks in advanced.
>>>>>>>   Mathius
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------
>>>>>>> Pinpoint customers who are looking for what you sell.
>>>>>>>               
>>> ---------------------------------
>>> Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail,
>>> news, photos & more.
>>>       
>
>
>
>   


Re: How to configure OFBiz with Apache Web Server or Application Server

Posted by David Goodenough <da...@linkchoose.co.uk>.
Is there a guide as to what might be need to be put in the url.properties file
or what we might need to enter under the Content Tab?

David

On Sunday 19 August 2007, Raj Saini wrote:
> Hi Mathius,
>
> You will need to fine tune your  settings in the url.properties file.
> For ecommerce, you can do that in the web site under content tab.
>
> Thanks,
>
> Raj
>
> Mathius Allo wrote:
> > Hi Raj,
> >
> > I have tried to configure it using mod_proxy_ajp. The only changes that I
> > made is to add the following line into proxy_ajp.conf under
> > /etc/httpd/conf.d/ (i'm using FC5): LoadModule proxy_ajp_module
> > modules/mod_proxy_ajp.so
> >
> >     ProxyPass / ajp://localhost:8009
> >
> > This seems to be working for non-ssl. I can access my module in the
> > following: http://www.mallo.com/customer/
> > apache & tomcat access_log indicates that everything is ok.
> >
> > However, when trying to access modules that require ssl port ":8443"
> > appears automatically the URL
> > (https://www.mallo.com:8443/project/control/main)  and I noticed the
> > following in the apache access_log: 192.168.1.65 - -
> > [18/Aug/2007:20:49:13 +0800] "GET
> > /project/control/main?externalLoginKey=EL994157896198 HTTP/1.1" 302 -
> > "http://www.mallo.com/customer/control/editCustomer?customerId=10000"
> > "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070417
> > Fedora/2.0.0.3-4.fc7 Firefox/2.0.0.3"
> >
> > After the above message, accessing non-ssl module does not seems to go
> > through apache (even though I don't see :8080 in the URL) as I don't see
> > any entry in the apache access_log.
> >
> > Any idea on how to make it work for https?
> >
> > Thanks,
> > Mathius Allo
> >
> > Raj Saini <ra...@gmail.com> wrote: Yes, I have configured our Ofbiz +
> > Apache HTTP 2.2 with mod_ajp_proxy. You will need to enable proxy for
> > httpd and  mod_proxy_ajp within your virtual hosts. I am doing it Debian
> > way. For a standard httpd.conf following should work:
> >
> > 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
> >
> > 2. Somewhere in the global part of httpd.conf
> > --------------------------------------------------
> >     #turning ProxyRequests on and allowing proxying from all may allow
> >         #spammers to use your proxy to send email.
> >
> >         ProxyRequests Off
> >
> >
> >
> >                 AddDefaultCharset off
> >                 Order deny,allow
> >                 Allow from all
> >                 #Allow from .example.com
> >
> >
> >
> >         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
> >         # ("Full" adds the server version; "Block" removes all outgoing
> > Via: headers)
> >         # Set to one of: Off | On | Full | Block
> >
> >         ProxyVia On
> >
> > 3. Inside your virtual host config
> > -----------------------------------
> >     ProxyPreserveHost On
> >     proxyPass / ajp://localhost:8009/
> >     RewriteEngine On
> >     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
> >
> > That is it you need to make it work.
> >
> > Thanks,
> >
> > Raj
> >
> > Jacques Le Roux wrote:
> >> >From this blog I'm not sure it's the good solution yet. Do you have
> >> > valuable experience with it ?
> >>
> >> http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod_pro
> >>xy_ajp.html
> >>
> >> Jacques
> >>
> >> PS : though this links seem good points :
> >> http://confluence.atlassian.com/display/DOC/Running+Confluence+behind+Ap
> >>ache#comment-16121884
> >> http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
> >>
> >> De : "Raj Saini"
> >>
> >>> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is far
> >>> simpler than mod_jk.
> >>>
> >>> Thanks,
> >>>
> >>> Raj
> >>>
> >>> Gautam Deb wrote:
> >>>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in
> >>>> that handles the communication between Tomcat and Apache. You can
> >>>> refer the link
> >>>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
> >>>>
> >>>> This way you can route request to the web container.
> >>>>
> >>>> Regards,
> >>>> Gautam Deb
> >>>>
> >>>> On 8/12/07, Mathius Allo  wrote:
> >>>>> Hi All,
> >>>>>
> >>>>>   Is it possible to have a deployment configuration where Apache web
> >>>>> server being used to route request to the web container?
> >>>>>
> >>>>>   How to deploy an OfBiz application within an Application Server?
> >>>>>
> >>>>>   Thanks in advanced.
> >>>>>   Mathius
> >>>>>
> >>>>>
> >>>>> ---------------------------------
> >>>>> Pinpoint customers who are looking for what you sell.
> >
> > ---------------------------------
> > Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail,
> > news, photos & more.



Re: How to configure OFBiz with Apache Web Server or Application Server

Posted by Raj Saini <ra...@gmail.com>.
Hi Mathius,

You will need to fine tune your  settings in the url.properties file. 
For ecommerce, you can do that in the web site under content tab.

Thanks,

Raj

Mathius Allo wrote:
> Hi Raj,
>
> I have tried to configure it using mod_proxy_ajp. The only changes that I made is to add the following line into proxy_ajp.conf under /etc/httpd/conf.d/ (i'm using FC5):
>     LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
>  
>     ProxyPass / ajp://localhost:8009
>      
> This seems to be working for non-ssl. I can access my module in the following:
> http://www.mallo.com/customer/
> apache & tomcat access_log indicates that everything is ok.
>
> However, when trying to access modules that require ssl port ":8443" appears automatically the URL (https://www.mallo.com:8443/project/control/main)  and I noticed the following in the apache access_log:
> 192.168.1.65 - - [18/Aug/2007:20:49:13 +0800] "GET /project/control/main?externalLoginKey=EL994157896198 HTTP/1.1" 302 - "http://www.mallo.com/customer/control/editCustomer?customerId=10000" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070417 Fedora/2.0.0.3-4.fc7 Firefox/2.0.0.3"
>
> After the above message, accessing non-ssl module does not seems to go through apache (even though I don't see :8080 in the URL) as I don't see any entry in the apache access_log. 
>
> Any idea on how to make it work for https?
>
> Thanks,
> Mathius Allo
>
> Raj Saini <ra...@gmail.com> wrote: Yes, I have configured our Ofbiz + Apache HTTP 2.2 with mod_ajp_proxy. 
> You will need to enable proxy for httpd and  mod_proxy_ajp within your 
> virtual hosts. I am doing it Debian way. For a standard httpd.conf 
> following should work:
>
> 1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.
>
> 2. Somewhere in the global part of httpd.conf
> --------------------------------------------------
>     #turning ProxyRequests on and allowing proxying from all may allow
>         #spammers to use your proxy to send email.
>
>         ProxyRequests Off
>
>         
>
>                 AddDefaultCharset off
>                 Order deny,allow
>                 Allow from all
>                 #Allow from .example.com
>         
>
>
>         # Enable/disable the handling of HTTP/1.1 "Via:" headers.
>         # ("Full" adds the server version; "Block" removes all outgoing 
> Via: headers)
>         # Set to one of: Off | On | Full | Block
>
>         ProxyVia On
>
> 3. Inside your virtual host config
> -----------------------------------
>     ProxyPreserveHost On
>     proxyPass / ajp://localhost:8009/
>     RewriteEngine On
>     RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
>
> That is it you need to make it work.
>
> Thanks,
>
> Raj
>
> Jacques Le Roux wrote:
>   
>> >From this blog I'm not sure it's the good solution yet. Do you have valuable experience with it ?
>>
>> http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod_proxy_ajp.html
>>
>> Jacques
>>
>> PS : though this links seem good points : 
>> http://confluence.atlassian.com/display/DOC/Running+Confluence+behind+Apache#comment-16121884
>> http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
>>
>> De : "Raj Saini" 
>>   
>>     
>>> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is far 
>>> simpler than mod_jk.
>>>
>>> Thanks,
>>>
>>> Raj
>>> Gautam Deb wrote:
>>>     
>>>       
>>>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in that
>>>> handles the communication between Tomcat and Apache. You can refer the link
>>>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
>>>>
>>>> This way you can route request to the web container.
>>>>
>>>> Regards,
>>>> Gautam Deb
>>>>
>>>> On 8/12/07, Mathius Allo  wrote:
>>>>   
>>>>       
>>>>         
>>>>> Hi All,
>>>>>
>>>>>   Is it possible to have a deployment configuration where Apache web
>>>>> server being used to route request to the web container?
>>>>>
>>>>>   How to deploy an OfBiz application within an Application Server?
>>>>>
>>>>>   Thanks in advanced.
>>>>>   Mathius
>>>>>
>>>>>
>>>>> ---------------------------------
>>>>> Pinpoint customers who are looking for what you sell.
>>>>>     
>>>>>         
>>>>>           
>>>>       
>>>>         
>>   
>>     
>
>
>
>        
> ---------------------------------
> Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. 
>   


Re: How to configure OFBiz with Apache Web Server or Application Server

Posted by Mathius Allo <mg...@yahoo.com>.
Hi Raj,

I have tried to configure it using mod_proxy_ajp. The only changes that I made is to add the following line into proxy_ajp.conf under /etc/httpd/conf.d/ (i'm using FC5):
    LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
 
    ProxyPass / ajp://localhost:8009
     
This seems to be working for non-ssl. I can access my module in the following:
http://www.mallo.com/customer/
apache & tomcat access_log indicates that everything is ok.

However, when trying to access modules that require ssl port ":8443" appears automatically the URL (https://www.mallo.com:8443/project/control/main)  and I noticed the following in the apache access_log:
192.168.1.65 - - [18/Aug/2007:20:49:13 +0800] "GET /project/control/main?externalLoginKey=EL994157896198 HTTP/1.1" 302 - "http://www.mallo.com/customer/control/editCustomer?customerId=10000" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070417 Fedora/2.0.0.3-4.fc7 Firefox/2.0.0.3"

After the above message, accessing non-ssl module does not seems to go through apache (even though I don't see :8080 in the URL) as I don't see any entry in the apache access_log. 

Any idea on how to make it work for https?

Thanks,
Mathius Allo

Raj Saini <ra...@gmail.com> wrote: Yes, I have configured our Ofbiz + Apache HTTP 2.2 with mod_ajp_proxy. 
You will need to enable proxy for httpd and  mod_proxy_ajp within your 
virtual hosts. I am doing it Debian way. For a standard httpd.conf 
following should work:

1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.

2. Somewhere in the global part of httpd.conf
--------------------------------------------------
    #turning ProxyRequests on and allowing proxying from all may allow
        #spammers to use your proxy to send email.

        ProxyRequests Off

        

                AddDefaultCharset off
                Order deny,allow
                Allow from all
                #Allow from .example.com
        


        # Enable/disable the handling of HTTP/1.1 "Via:" headers.
        # ("Full" adds the server version; "Block" removes all outgoing 
Via: headers)
        # Set to one of: Off | On | Full | Block

        ProxyVia On

3. Inside your virtual host config
-----------------------------------
    ProxyPreserveHost On
    proxyPass / ajp://localhost:8009/
    RewriteEngine On
    RewriteRule ^/(images/.+);jsessionid=\w+$ /$1

That is it you need to make it work.

Thanks,

Raj

Jacques Le Roux wrote:
> >From this blog I'm not sure it's the good solution yet. Do you have valuable experience with it ?
>
> http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod_proxy_ajp.html
>
> Jacques
>
> PS : though this links seem good points : 
> http://confluence.atlassian.com/display/DOC/Running+Confluence+behind+Apache#comment-16121884
> http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
>
> De : "Raj Saini" 
>   
>> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is far 
>> simpler than mod_jk.
>>
>> Thanks,
>>
>> Raj
>> Gautam Deb wrote:
>>     
>>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in that
>>> handles the communication between Tomcat and Apache. You can refer the link
>>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
>>>
>>> This way you can route request to the web container.
>>>
>>> Regards,
>>> Gautam Deb
>>>
>>> On 8/12/07, Mathius Allo  wrote:
>>>   
>>>       
>>>> Hi All,
>>>>
>>>>   Is it possible to have a deployment configuration where Apache web
>>>> server being used to route request to the web container?
>>>>
>>>>   How to deploy an OfBiz application within an Application Server?
>>>>
>>>>   Thanks in advanced.
>>>>   Mathius
>>>>
>>>>
>>>> ---------------------------------
>>>> Pinpoint customers who are looking for what you sell.
>>>>     
>>>>         
>>>       
>
>   



       
---------------------------------
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. 

Re: How to configure OFBiz with Apache Web Server or Application Server

Posted by Raj Saini <ra...@gmail.com>.
Yes, I have configured our Ofbiz + Apache HTTP 2.2 with mod_ajp_proxy. 
You will need to enable proxy for httpd and  mod_proxy_ajp within your 
virtual hosts. I am doing it Debian way. For a standard httpd.conf 
following should work:

1. Enable mod_proxy and mod_proxy_ajp modules in the Apache.

2. Somewhere in the global part of httpd.conf
--------------------------------------------------
    #turning ProxyRequests on and allowing proxying from all may allow
        #spammers to use your proxy to send email.

        ProxyRequests Off

        <Proxy *>
                AddDefaultCharset off
                Order deny,allow
                Allow from all
                #Allow from .example.com
        </Proxy>

        # Enable/disable the handling of HTTP/1.1 "Via:" headers.
        # ("Full" adds the server version; "Block" removes all outgoing 
Via: headers)
        # Set to one of: Off | On | Full | Block

        ProxyVia On

3. Inside your virtual host config
-----------------------------------
    ProxyPreserveHost On
    proxyPass / ajp://localhost:8009/
    RewriteEngine On
    RewriteRule ^/(images/.+);jsessionid=\w+$ /$1

That is it you need to make it work.

Thanks,

Raj

Jacques Le Roux wrote:
> >From this blog I'm not sure it's the good solution yet. Do you have valuable experience with it ?
>
> http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod_proxy_ajp.html
>
> Jacques
>
> PS : though this links seem good points : 
> http://confluence.atlassian.com/display/DOC/Running+Confluence+behind+Apache#comment-16121884
> http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html
>
> De : "Raj Saini" <ra...@gmail.com>
>   
>> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is far 
>> simpler than mod_jk.
>>
>> Thanks,
>>
>> Raj
>> Gautam Deb wrote:
>>     
>>> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in that
>>> handles the communication between Tomcat and Apache. You can refer the link
>>> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
>>>
>>> This way you can route request to the web container.
>>>
>>> Regards,
>>> Gautam Deb
>>>
>>> On 8/12/07, Mathius Allo <mg...@yahoo.com> wrote:
>>>   
>>>       
>>>> Hi All,
>>>>
>>>>   Is it possible to have a deployment configuration where Apache web
>>>> server being used to route request to the web container?
>>>>
>>>>   How to deploy an OfBiz application within an Application Server?
>>>>
>>>>   Thanks in advanced.
>>>>   Mathius
>>>>
>>>>
>>>> ---------------------------------
>>>> Pinpoint customers who are looking for what you sell.
>>>>     
>>>>         
>>>       
>
>   


Re: How to configure OFBiz with Apache Web Server or Application Server

Posted by Jacques Le Roux <ja...@les7arts.com>.
>From this blog I'm not sure it's the good solution yet. Do you have valuable experience with it ?

http://getahead.org/blog/joe/2006/02/01/mod_jk_is_dead_long_live_mod_proxy_ajp.html

Jacques

PS : though this links seem good points : 
http://confluence.atlassian.com/display/DOC/Running+Confluence+behind+Apache#comment-16121884
http://lenya.apache.org/docs/2_0_x/tutorials/mod_proxy_ajp.html

De : "Raj Saini" <ra...@gmail.com>
> mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is far 
> simpler than mod_jk.
> 
> Thanks,
> 
> Raj
> Gautam Deb wrote:
> > Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in that
> > handles the communication between Tomcat and Apache. You can refer the link
> > http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
> >
> > This way you can route request to the web container.
> >
> > Regards,
> > Gautam Deb
> >
> > On 8/12/07, Mathius Allo <mg...@yahoo.com> wrote:
> >   
> >> Hi All,
> >>
> >>   Is it possible to have a deployment configuration where Apache web
> >> server being used to route request to the web container?
> >>
> >>   How to deploy an OfBiz application within an Application Server?
> >>
> >>   Thanks in advanced.
> >>   Mathius
> >>
> >>
> >> ---------------------------------
> >> Pinpoint customers who are looking for what you sell.
> >>     
> >
> >

Re: How to configure OFBiz with Apache Web Server or Application Server

Posted by Raj Saini <ra...@gmail.com>.
mod_proxy_ajp is another way of doing it with Apache 2.2.x. It is far 
simpler than mod_jk.

Thanks,

Raj
Gautam Deb wrote:
> Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in that
> handles the communication between Tomcat and Apache. You can refer the link
> http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html
>
> This way you can route request to the web container.
>
> Regards,
> Gautam Deb
>
> On 8/12/07, Mathius Allo <mg...@yahoo.com> wrote:
>   
>> Hi All,
>>
>>   Is it possible to have a deployment configuration where Apache web
>> server being used to route request to the web container?
>>
>>   How to deploy an OfBiz application within an Application Server?
>>
>>   Thanks in advanced.
>>   Mathius
>>
>>
>> ---------------------------------
>> Pinpoint customers who are looking for what you sell.
>>     
>
>   


Re: How to configure OFBiz with Apache Web Server or Application Server

Posted by Gautam Deb <ga...@gmail.com>.
Yes, it is possible. You can use the *mod_jk* Tomcat-Apache plug-in that
handles the communication between Tomcat and Apache. You can refer the link
http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html

This way you can route request to the web container.

Regards,
Gautam Deb

On 8/12/07, Mathius Allo <mg...@yahoo.com> wrote:
>
> Hi All,
>
>   Is it possible to have a deployment configuration where Apache web
> server being used to route request to the web container?
>
>   How to deploy an OfBiz application within an Application Server?
>
>   Thanks in advanced.
>   Mathius
>
>
> ---------------------------------
> Pinpoint customers who are looking for what you sell.

How to configure OFBiz with Apache Web Server or Application Server

Posted by Mathius Allo <mg...@yahoo.com>.
Hi All,
   
  Is it possible to have a deployment configuration where Apache web server being used to route request to the web container? 
   
  How to deploy an OfBiz application within an Application Server?
   
  Thanks in advanced.
  Mathius

       
---------------------------------
Pinpoint customers who are looking for what you sell. 

Re: How to render Chinese characters in OFBiz PDF reports?

Posted by Jacopo Cappellato <ti...@sastau.it>.
Oleg,

first of all, thanks for your notes.
I did what you have suggested (even if I just created the "normal" Arial 
font metrics, not the ones for bold and italics); now I can see in the 
PDF two small boxes instead of the ## characters... unfortunately I 
still can't see ideograms :-(

Do you have any ideas about this issue?

Jacopo

Oleg Andreyev wrote:
> Jacopo Cappellato пишет:
>> Hi all,
>>
>> I know this is not probably an OFBiz related issue but I know that we 
>> have several Chinese users and maybe this can be of interest for 
>> others...
>> I'm having issues displaying Chinese characters in the OFBiz PDF 
>> reports (invoice, order etc...) created with xsl-fo: they appear as 
>> '####'.
> Of course. Currently Ofbiz printing subsystem doesn't work if document 
> uses any charsets out Latin-1. (May be work for localized readers).
>> I did some research in the Internet and the problem seems related to 
>> the font family used that doesn't include the Chinese fonts.
>> I have tried to set a different font-family in the template's fo:root 
>> element, but unfortunately I couldn't find a font family that supports 
>> the Chinese characters (e.g. I've tried with Arial in an Ubuntu box).
>>
> I was searching in Google and seen many links to free Chinese fonts but 
> if you will try use font-family that have required characters the result 
> will be the same. You have to embed used fonts to pdf.
>> I've also found some instructions on how to generate an ad-hoc xml 
>> file with the necessary font family description, to be embedded in the 
>> pdf reports by FOP... but the steps were not very clear to me 
>> (especially, how to map them to the OFBiz framework).
>>
>> Any hints on how I can solve this issue?
> Steps below apply to cyrillic fonts, but I hope Chinese too.
> 1. Create FOP config file. Ready for use one attached to 
> https://issues.apache.org/jira/browse/OFBIZ-1110.
> 2. Create font metrics for given font. 
> (http://xmlgraphics.apache.org/fop/0.93/fonts.html)
> 3. Place fonts and metrics to framework/widget/config
> 4. Add to fop.xconf font triplets
> Example from my config
> 
> <renderer mime="application/pdf">
> <fonts>
> <font metrics-url="arial.xml" kerning="yes" embed-url="arial.ttf">
> <font-triplet name="Arial" style="normal" weight="normal"/>
> <font-triplet name="ArialMT" style="normal" weight="normal"/>
> </font>
> <font metrics-url="arialbd.xml" kerning="yes" embed-url="arialbd.ttf">
> <font-triplet name="Arial" style="normal" weight="bold"/>
> <font-triplet name="ArialMT" style="normal" weight="bold"/>
> </font>
> <font metrics-url="ariali.xml" kerning="yes" embed-url="ariali.ttf">
> <font-triplet name="Arial" style="italic" weight="normal"/>
> <font-triplet name="ArialMT" style="italic" weight="normal"/>
> </font>
> <font metrics-url="arialbi.xml" kerning="yes" embed-url="arialbi.ttf">
> <font-triplet name="Arial" style="italic" weight="bold"/>
> <font-triplet name="ArialMT" style="italic" weight="bold"/>
> </font>
> </fonts>
> </renderer>
> 5. Modify fo.ftl to use font-family="Arial"
> 
> Oleg



Re: How to render Chinese characters in OFBiz PDF reports?

Posted by guo weizhan <gu...@gmail.com>.
It works in Chinese,  thanks Oleg.

2007/8/10, guo weizhan <gu...@gmail.com>:
> I will try this later, in my chinese OS :)   thank you!
>
> 2007/8/10, Oleg Andreyev <td...@mail.ru>:
> > Jacopo Cappellato пишет:
> > > Hi all,
> > >
> > > I know this is not probably an OFBiz related issue but I know that we
> > > have several Chinese users and maybe this can be of interest for
> > > others...
> > > I'm having issues displaying Chinese characters in the OFBiz PDF
> > > reports (invoice, order etc...) created with xsl-fo: they appear as
> > > '####'.
> > Of course. Currently Ofbiz printing subsystem doesn't work if document
> > uses any charsets out Latin-1. (May be work for localized readers).
> > > I did some research in the Internet and the problem seems related to
> > > the font family used that doesn't include the Chinese fonts.
> > > I have tried to set a different font-family in the template's fo:root
> > > element, but unfortunately I couldn't find a font family that supports
> > > the Chinese characters (e.g. I've tried with Arial in an Ubuntu box).
> > >
> > I was searching in Google and seen many links to free Chinese fonts but
> > if you will try use font-family that have required characters the result
> > will be the same. You have to embed used fonts to pdf.
> > > I've also found some instructions on how to generate an ad-hoc xml
> > > file with the necessary font family description, to be embedded in the
> > > pdf reports by FOP... but the steps were not very clear to me
> > > (especially, how to map them to the OFBiz framework).
> > >
> > > Any hints on how I can solve this issue?
> > Steps below apply to cyrillic fonts, but I hope Chinese too.
> > 1. Create FOP config file. Ready for use one attached to
> > https://issues.apache.org/jira/browse/OFBIZ-1110.
> > 2. Create font metrics for given font.
> > (http://xmlgraphics.apache.org/fop/0.93/fonts.html)
> > 3. Place fonts and metrics to framework/widget/config
> > 4. Add to fop.xconf font triplets
> > Example from my config
> >
> > <renderer mime="application/pdf">
> > <fonts>
> > <font metrics-url="arial.xml" kerning="yes" embed-url="arial.ttf">
> > <font-triplet name="Arial" style="normal" weight="normal"/>
> > <font-triplet name="ArialMT" style="normal" weight="normal"/>
> > </font>
> > <font metrics-url="arialbd.xml" kerning="yes" embed-url="arialbd.ttf">
> > <font-triplet name="Arial" style="normal" weight="bold"/>
> > <font-triplet name="ArialMT" style="normal" weight="bold"/>
> > </font>
> > <font metrics-url="ariali.xml" kerning="yes" embed-url="ariali.ttf">
> > <font-triplet name="Arial" style="italic" weight="normal"/>
> > <font-triplet name="ArialMT" style="italic" weight="normal"/>
> > </font>
> > <font metrics-url="arialbi.xml" kerning="yes" embed-url="arialbi.ttf">
> > <font-triplet name="Arial" style="italic" weight="bold"/>
> > <font-triplet name="ArialMT" style="italic" weight="bold"/>
> > </font>
> > </fonts>
> > </renderer>
> > 5. Modify fo.ftl to use font-family="Arial"
> >
> > Oleg
> >
> >
>

Re: How to render Chinese characters in OFBiz PDF reports?

Posted by guo weizhan <gu...@gmail.com>.
I will try this later, in my chinese OS :)   thank you!

2007/8/10, Oleg Andreyev <td...@mail.ru>:
> Jacopo Cappellato пишет:
> > Hi all,
> >
> > I know this is not probably an OFBiz related issue but I know that we
> > have several Chinese users and maybe this can be of interest for
> > others...
> > I'm having issues displaying Chinese characters in the OFBiz PDF
> > reports (invoice, order etc...) created with xsl-fo: they appear as
> > '####'.
> Of course. Currently Ofbiz printing subsystem doesn't work if document
> uses any charsets out Latin-1. (May be work for localized readers).
> > I did some research in the Internet and the problem seems related to
> > the font family used that doesn't include the Chinese fonts.
> > I have tried to set a different font-family in the template's fo:root
> > element, but unfortunately I couldn't find a font family that supports
> > the Chinese characters (e.g. I've tried with Arial in an Ubuntu box).
> >
> I was searching in Google and seen many links to free Chinese fonts but
> if you will try use font-family that have required characters the result
> will be the same. You have to embed used fonts to pdf.
> > I've also found some instructions on how to generate an ad-hoc xml
> > file with the necessary font family description, to be embedded in the
> > pdf reports by FOP... but the steps were not very clear to me
> > (especially, how to map them to the OFBiz framework).
> >
> > Any hints on how I can solve this issue?
> Steps below apply to cyrillic fonts, but I hope Chinese too.
> 1. Create FOP config file. Ready for use one attached to
> https://issues.apache.org/jira/browse/OFBIZ-1110.
> 2. Create font metrics for given font.
> (http://xmlgraphics.apache.org/fop/0.93/fonts.html)
> 3. Place fonts and metrics to framework/widget/config
> 4. Add to fop.xconf font triplets
> Example from my config
>
> <renderer mime="application/pdf">
> <fonts>
> <font metrics-url="arial.xml" kerning="yes" embed-url="arial.ttf">
> <font-triplet name="Arial" style="normal" weight="normal"/>
> <font-triplet name="ArialMT" style="normal" weight="normal"/>
> </font>
> <font metrics-url="arialbd.xml" kerning="yes" embed-url="arialbd.ttf">
> <font-triplet name="Arial" style="normal" weight="bold"/>
> <font-triplet name="ArialMT" style="normal" weight="bold"/>
> </font>
> <font metrics-url="ariali.xml" kerning="yes" embed-url="ariali.ttf">
> <font-triplet name="Arial" style="italic" weight="normal"/>
> <font-triplet name="ArialMT" style="italic" weight="normal"/>
> </font>
> <font metrics-url="arialbi.xml" kerning="yes" embed-url="arialbi.ttf">
> <font-triplet name="Arial" style="italic" weight="bold"/>
> <font-triplet name="ArialMT" style="italic" weight="bold"/>
> </font>
> </fonts>
> </renderer>
> 5. Modify fo.ftl to use font-family="Arial"
>
> Oleg
>
>

Re: How to render Chinese characters in OFBiz PDF reports?

Posted by Oleg Andreyev <td...@mail.ru>.
Jacopo Cappellato пишет:
> Hi all,
>
> I know this is not probably an OFBiz related issue but I know that we 
> have several Chinese users and maybe this can be of interest for 
> others...
> I'm having issues displaying Chinese characters in the OFBiz PDF 
> reports (invoice, order etc...) created with xsl-fo: they appear as 
> '####'.
Of course. Currently Ofbiz printing subsystem doesn't work if document 
uses any charsets out Latin-1. (May be work for localized readers).
> I did some research in the Internet and the problem seems related to 
> the font family used that doesn't include the Chinese fonts.
> I have tried to set a different font-family in the template's fo:root 
> element, but unfortunately I couldn't find a font family that supports 
> the Chinese characters (e.g. I've tried with Arial in an Ubuntu box).
>
I was searching in Google and seen many links to free Chinese fonts but 
if you will try use font-family that have required characters the result 
will be the same. You have to embed used fonts to pdf.
> I've also found some instructions on how to generate an ad-hoc xml 
> file with the necessary font family description, to be embedded in the 
> pdf reports by FOP... but the steps were not very clear to me 
> (especially, how to map them to the OFBiz framework).
>
> Any hints on how I can solve this issue?
Steps below apply to cyrillic fonts, but I hope Chinese too.
1. Create FOP config file. Ready for use one attached to 
https://issues.apache.org/jira/browse/OFBIZ-1110.
2. Create font metrics for given font. 
(http://xmlgraphics.apache.org/fop/0.93/fonts.html)
3. Place fonts and metrics to framework/widget/config
4. Add to fop.xconf font triplets
Example from my config

<renderer mime="application/pdf">
<fonts>
<font metrics-url="arial.xml" kerning="yes" embed-url="arial.ttf">
<font-triplet name="Arial" style="normal" weight="normal"/>
<font-triplet name="ArialMT" style="normal" weight="normal"/>
</font>
<font metrics-url="arialbd.xml" kerning="yes" embed-url="arialbd.ttf">
<font-triplet name="Arial" style="normal" weight="bold"/>
<font-triplet name="ArialMT" style="normal" weight="bold"/>
</font>
<font metrics-url="ariali.xml" kerning="yes" embed-url="ariali.ttf">
<font-triplet name="Arial" style="italic" weight="normal"/>
<font-triplet name="ArialMT" style="italic" weight="normal"/>
</font>
<font metrics-url="arialbi.xml" kerning="yes" embed-url="arialbi.ttf">
<font-triplet name="Arial" style="italic" weight="bold"/>
<font-triplet name="ArialMT" style="italic" weight="bold"/>
</font>
</fonts>
</renderer>
5. Modify fo.ftl to use font-family="Arial"

Oleg