This fix move the code that reads the JSON parameters from the body into the ContextFilter: the parameters are then stored as attributes that can be later used by events and other artifacts (service events, simple events, scripts events support this and Java events if they use UtilHttp.getCombinedMap(request) to get the map of input parameters.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1665162 13f79535-47bb-0310-9956-ffa450edef68
FOP <fo:external-graphic/> images do not appear when portoffset used:
2015-02-28 18:12:12,249 |http-bio-8445-exec-4 |ApacheFopWorker |I| FOP FontBaseURL: file:/home/anon/workspace/ofbiz/framework/webapp/config/
2015-02-28 18:12:12,254 |http-bio-8445-exec-4 |FOP |D| target-resolution set to: 72.0dpi (px2mm=0.35277778)
2015-02-28 18:12:12,593 |http-bio-8445-exec-4 |FOP |E| Error with opening URL 'http://localhost:8080/content/control/stream?contentId=10004': Connection refused
2015-02-28 18:12:12,616 |http-bio-8445-exec-4 |FOUserAgent |E| Image not found. URI: /content/control/stream?contentId=10004. (See position 40:158)
In framework/webapp/config/fop.xconf <base>http://localhost:8080</base> is hardcoded
This patch employs FopFactory.setBaseUrl() along with the portOffset from Start class.
A better solution might be to extract the port from the baseUrl of fop.xconf and then apply the offset to that but I don't have time to implement that yet.
jleroux: I followed Christian's tip to complete his patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1663979 13f79535-47bb-0310-9956-ffa450edef68
<@ofbizUrl secure="true">SomeRequest</@ofbizUrl>
will actually use the https protocol. Thanks to Deepak Dixit for reporting discussing the issue and fix with me.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1662919 13f79535-47bb-0310-9956-ffa450edef68
After some efforts to take into consideration Anil's justified concerns (simply put: keep the current behaviour), the modifications are finally light, which is greater for reviews. Most important are:
* Product component
** I have moved the OfbizCatalogAltUrlTransform and OfbizCatalogUrlTransform classes to a ftl subdirectory with the new FTL macros implementation: CatalogAltUrlSeoTransform, CatalogUrlSeoFilter, CatalogAltUrlSeoTransform, CatalogUrlSeoTransform, SeoTransform, UrlRegexpTransform
** A bunch of new filters have been added CatalogUrlSeoFilter, controlServlet, SeoCatalogUrlServlet, SeoContentUrlFilter, SeoContextFilter, SeoControlServlet, UrlRegexpContextFilter
** 2 util classes: SeoConfigUtil, SeoUrlUtil
** By default ofbizCatalogAltUrl and ofbizCatalogUrl macros now use the new implementations by CatalogAltUrlSeoTransform and CatalogUrlSeoTransform. This can be changed back in freemarkerTransforms.properties
** A SeoConfig.xml file define some SEO parameters, the SeoConfig.xsd can be sued as documentation, globally please refer to OFBIZ-5312.
* Framework webapp component
** By default ofbizUrl macro now uses the new implementations by UrlRegexpTransform. This can be changed back in freemarkerTransforms.properties
* Ecommerce component
** A new ecomseo webapp clones the ecommerce webapp on the model of ecomclone. There is not much there: mostly a controller with a new JspViewHandler class (in ecommerce) and a web.xml file
With these changes we can have both worlds running side by side. So you can use eitherb http://localhost:8080/ecommerce/control/main as root or http://localhost:8080/ecomseo, but also if you want http://localhost:8080/ecommerce/. Then everything follows.
From my reviews and tests all is working as expected. I only found a trivial bug that I can also reproduce in current trunk see OFBIZ-5305 (sometimes not locally, weird).
Of course, all the tests passes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1655803 13f79535-47bb-0310-9956-ffa450edef68
The DefaultEncoder from OWASP ESAPI, used internally by UtilCodec is now built with the default constructor that also adds the JavascriptCodec to the list of codecs used to canonicalize and validate the input.
Renamed the UrlEncoder class to UrlCodec in order to better describe its behavior.
Misc minor cleanups.
Added to the list of tests of the base component a series of Junit test classes that were missing.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1648403 13f79535-47bb-0310-9956-ffa450edef68
Adds
<auto-detect/>
in the fonts section of our fop.xconf
Adds the Google NotoSans font which is Apache licensed
* http://www.google.com/fonts/specimen/Noto+Sans
* https://www.google.com/get/noto/#/
Uses NotoSans as the default FOP font. For that puts the NotoSans font 4 files in framework/resources/fonts and add <directory>framework/resources/fonts/NotoSansFonts</directory> in fop.xconf
Renders ₹ in content/control/fonts.pdf as we do for €. Other symbols could be added later when needed, backed by Google NotoSans font...
Renders the NotoSans content/control/fonts.pdf as we do for other main fonts
Adds the rupee symbol (₹) to antisamy-esapi.xml file like we have the euro symbol (€)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1647782 13f79535-47bb-0310-9956-ffa450edef68
1) removed foreign key relationship from/to this group of entities and the other entities of the OFBiz data model; the fields are still available but they are not enforced by a foreign key constraint
2) removed one view entitiy joining Visit with Party entities and refactored the code that was using it in order to provide the same behavior
3) added a new entity group ("org.ofbiz.stats") for the Visit/Visitor/ServerHit* (and related) entities; for now the group is not active so that the entities are still in the same database as before; however assigning them to a different database is now a matter of uncommenting the group file definition in framework/webapp/ofbiz-component.xml and provide the new datasource definition
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1647271 13f79535-47bb-0310-9956-ffa450edef68
We have removed the recent changes that we did for <property-to-field> in XML file because those changes was not actually needed.
Thanks Arun for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1646214 13f79535-47bb-0310-9956-ffa450edef68
* Groovy services and Groovy events now use the same util methods from GroovyUtil to parse/execute the scripts
* the script base class is now specified in the base/config/groovy.parameter file rather than in the serviceengine.xml
* the same util methods (DSL) are now available to all Groovy scripts (executed as services, events or widget actions)
* removed a series of unused methods in the GroovyUtil class
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636346 13f79535-47bb-0310-9956-ffa450edef68
* moved the json-lib jar (json-lib-2.2.3-jdk15.jar) from the framework/webapp to the framework/base component
* removed the SQL select Parser.jj (parser definition) and its unit tests: it was not used (and never used) by any OFBiz code
* removed the JSON.jj (parser definition) and its unit tests: it was not used (and never used) by any OFBiz code apart from the JSON Converters (now migrated to json-lib, see next items in this list) some utility methods in UtilIO.java (that have been removed too because they have never been used in OFBiz)
* removed the JavaCC jar and related ant scripts because no more needed after the removal of Parser.jj and JSON.jj
* converted the JSONConverter code that was based on JSON.jj to Jackson
* added a new class org.ofbiz.base.lang.JSON that have been contributed by Adrian Crum that is a facade for simplifying the client code and for hiding the specific JSON library being used
* removed an unused method: ImageManagementServices.toJsonObject(...)
* added TestBooleanConverters to the list of tests
* new unit tests for the new JSON converters
* refactored Ajax code in applications to use the common request json response rather than a custom method
* OFBIZ-5790 Implemented ability to call a service event by passing its input parameters in the request body as JSON data. These classes provide a simple mechanism, based on the request's content type, that can be extended to support other formats (e.g. XML).
This commit resolves OFBIZ-4572, OFBIZ-3365, OFBIZ-5751, OFBIZ-5790
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635901 13f79535-47bb-0310-9956-ffa450edef68
jleroux: some changes I spotted in Nick Ho's patch which sounded sound to me. Some groups of label internal ending white spaces would have been caught by HTML rendering, but anyway better like that.
I also fixed a number of wrong line returns. And found duplicates zh labels entries that I will report to Nick Ho to fix. And finally fixed some errors introduced by Nick Ho I spotted, I hope there are not too much left :/
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1625893 13f79535-47bb-0310-9956-ffa450edef68
added/revised zh-TW translations in the framework, applications and specialpurpose folders to have consistent, commonly-used meaningful terms in Traditional Chinese.
jleroux: from Nick Ho's patch I have extracted only the Chinese changes, w/o the proposed dash to underscore changes
This contains notably this 14 "zh" (not "sh-TW") changes:
<value xml:lang="zh">人将由电子邮件接受一个临时密码。</value><!-- was 客户将通过电子邮件收到一个临时密码。 -->
<value xml:lang="zh">合计属于公司: </value>
<value xml:lang="zh"> 完整文本:${fullText}</value>
<value xml:lang="zh">供货商佣金百分比</value>
<value xml:lang="zh">文本大小</value>
<value xml:lang="zh">值</value>
<value xml:lang="zh">算子</value>
<value xml:lang="zh">不能转移已序列化的库存。</value>
<value xml:lang="zh">货运收据</value>
<value xml:lang="zh">获取标识为 ${productStoreShipMethId} 的产品店铺送货方法(ProductStoreShipmentMeth)时出错:${errorString}</value>
<value xml:lang="zh">中国人民币元</value>
<value xml:lang="zh">如果选择"specify other",下拉框旁边会出现文本框。参考form的drop-down元素的other-field-size属性说明</value>
<value xml:lang="zh">文本消息</value>
<value xml:lang="zh">能够收到和解析XML消息,但是BSR->NOUN(买卖关系->名词) ${bsrNoun} 和/或 BSR->VERB(买卖关系->动词) ${bsrVerb} 是空的</value>
I have no competency to judge these changes, but from previous Shi Jinghai's feedback I believe there are OK
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1625816 13f79535-47bb-0310-9956-ffa450edef68
Junit tests are included. The two custom classloaders could be merged into one but this will be addressed in a second phase because it will require some changes to the bootstrap componenr and process.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1624549 13f79535-47bb-0310-9956-ffa450edef68
UtilJ2eeCompat was used to figure out, by checking the servlet container implementation, if the response should be sent using a Writer or a OutputStream; a Writer was used for Tomcat, Websphere, Jetty, Orion, Jrun, Tradecity and an OutputStream was used for all the other servlet containers.
However accordingly to the Servlet api:
ServletResponse.getWriter():
Returns a PrintWriter object that can send character text to the client.
ServletResponse.getOutputStream():
Returns a ServletOutputStream suitable for writing binary data in the response.
Based on this getWriter() should always be used (for html pages) in all the containers, not just Tomcat, Websphere, Jetty, Orion, Jrun, Tradecity.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1622976 13f79535-47bb-0310-9956-ffa450edef68
more added/updated translations patch files for zh-TW locale
jleroux:
I added the label
<value xml:lang="zh_TW">服務執行程式拋出一個異常</value>
by hand
Only 1 label was not added:
<value xml:lang="zh_TW">代號</value>
Because of the fuzziness and presence of several possibilities
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621688 13f79535-47bb-0310-9956-ffa450edef68