Commit Graph
667 Commits
Author SHA1 Message Date
Jacques Le Roux 082d2ec52f In r1533839 (related to https://issues.apache.org/jira/browse/OFBIZ-4794 "Set different ports for testing in a CI environment (e.g. Jenkins)"
Which will mostly be used to simultaneously run official demos without having to create patches, I forgot the portOffset for websites and url.properties ports values.
This fixes this point. I also did in it RequestHandler class though the getDefaultServerRootUrl() method is now deprecated.
To be consistent with r1547186 I will backport in R13.07

People should be aware that this will change the ports values of websites and url.properties ports values which in some cases could be an unwanted side effect. 
Anyway the portOffset feature is not destined to be used in production environments where websites and url.properties ports values are often changed purposely

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1549015 13f79535-47bb-0310-9956-ffa450edef68
2013-12-08 10:48:18 +00:00
Adrian Crum 63462fa908 Added a new attribute to the ofbiz-component.xml <webapp> element - access-permission. It is used to specify an explicit permission to allow access to the web application, instead of the implied permissions specified in the base-permission attribute (which causes unpredictable behavior).
Also moved web application authorization code from the Flat Grey visual theme to LoginWorker.java. This change needs to be copied to other visual themes as well.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1546891 13f79535-47bb-0310-9956-ffa450edef68
2013-12-02 04:19:48 +00:00
Jacques Le Roux ddf898a735 This reverts r1541641 + 1541746
Local variables are always thread safe, no needs to worry about them

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1541894 13f79535-47bb-0310-9956-ffa450edef68
2013-11-14 12:55:18 +00:00
Jacques Le Roux e4529567c2 java.util.regex.Pattern instances are immutable but not instances of the Matcher companion class.
So better be safe than sorry, even if in the loops we loose a bit of performance (here only "short" loops anyway)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1541641 13f79535-47bb-0310-9956-ffa450edef68
2013-11-13 18:04:14 +00:00
Adrian Crum 2ccdb6b312 Fixed a bug in WebSiteProperties.java where host name defaults were not initialized properly. Also added a toString method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1540482 13f79535-47bb-0310-9956-ffa450edef68
2013-11-10 15:17:15 +00:00
Adrian Crum 203ba5c608 Improved WebSiteProperties.java - better handling of missing values.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1539513 13f79535-47bb-0310-9956-ffa450edef68
2013-11-07 01:55:06 +00:00
Adrian Crum 33d54463cc The RequestHandler.makeLink method uses the new URL generation classes (2nd try).
This time I preserved the complicated boolean logic in the host-part block of code.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535755 13f79535-47bb-0310-9956-ffa450edef68
2013-10-25 14:57:25 +00:00
Jacques Le Roux 185925a648 No functional changes, just better documentation on status-code
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535669 13f79535-47bb-0310-9956-ffa450edef68
2013-10-25 09:50:21 +00:00
Adrian Crum 5b675f5a79 Some code simplification in the new URL generation classes.
Also loosened things up a bit in the OfbizUrlBuilder class: allow object construction with partial information - required by some services. I don't like this approach because it makes it possible to create nonsensical URLs, but it is a necessary evil to keep the existing code working.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535444 13f79535-47bb-0310-9956-ffa450edef68
2013-10-24 17:12:46 +00:00
Adrian Crum 4af172cad4 Reverting rev 1535129 due to a problem reported by Jacques on the dev mailing list.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535419 13f79535-47bb-0310-9956-ffa450edef68
2013-10-24 15:44:03 +00:00
Adrian Crum 6107ff911a Fixed a bug in RequestHandler.java that threw an exception when the servlet is mapped to /.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535276 13f79535-47bb-0310-9956-ffa450edef68
2013-10-24 04:47:12 +00:00
Adrian Crum 0aa028cbce Simplified some code in OfbizUrlTransform.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535270 13f79535-47bb-0310-9956-ffa450edef68
2013-10-24 02:45:47 +00:00
Adrian Crum a8109cf259 Added a helpful method to WebAppUtil.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535268 13f79535-47bb-0310-9956-ffa450edef68
2013-10-24 02:44:45 +00:00
Adrian Crum ca37709641 Deprecated a method in RequestHandler.java that should not be used.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535261 13f79535-47bb-0310-9956-ffa450edef68
2013-10-24 01:48:22 +00:00
Adrian Crum 64177b19d7 Eliminated a logged warning in OfbizUrlBuilder - the request-map might not exist because of the various URL rewriting schemes in OFBiz.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535260 13f79535-47bb-0310-9956-ffa450edef68
2013-10-24 01:46:56 +00:00
Adrian Crum d28470d4be Code cleanup and JavaDocs in OfbizUrlTransform.java.
If a web site ID is specified, the transform does not require a HttpServletRequest object - so the transform will work in scheduled services.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535246 13f79535-47bb-0310-9956-ffa450edef68
2013-10-24 00:45:51 +00:00
Adrian Crum f569a189a7 Formatted OfbizUrlTransform.java - no functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535164 13f79535-47bb-0310-9956-ffa450edef68
2013-10-23 20:40:39 +00:00
Adrian Crum b803a32fc9 Some JavaDoc fixups - no functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535131 13f79535-47bb-0310-9956-ffa450edef68
2013-10-23 19:40:05 +00:00
Adrian Crum 501ca548d5 The RequestHandler.makeLink method uses the new URL generation classes.
I tried to preserve the complicated boolean logic in the replaced block of code, but if I got something wrong, just leave a message on the dev mailing list.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535129 13f79535-47bb-0310-9956-ffa450edef68
2013-10-23 19:35:17 +00:00
Adrian Crum 86fc2a1c8e Oops, missed a file in my previous commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535128 13f79535-47bb-0310-9956-ffa450edef68
2013-10-23 19:32:47 +00:00
Adrian Crum cf3b8d7025 Added a new classes to simplify OFBiz URL generation and eliminate redundant code.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1535126 13f79535-47bb-0310-9956-ffa450edef68
2013-10-23 19:29:47 +00:00
Jacques Le Roux 1aebfe082b An enhanced patch from Shi Jinghai <<Change GROOVY_SUPPORT position in .classpath to remove "The method getContextPath() is undefined for the type ServletContext" message in Eclipse.>> https://issues.apache.org/jira/browse/OFBIZ-5369
While editing some java files with "request.getSession().getServletContext().getContextPath()" in Eclipse, an error message appears:
"The method getContextPath() is undefined for the type ServletContext".

This error message can be removed by changing GROOVY_SUPPORT position to be after servlet jar in .classpath

jleroux: I needed to also remove the now useless warning message I put in ControlServlet.java

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534989 13f79535-47bb-0310-9956-ffa450edef68
2013-10-23 11:28:31 +00:00
Adrian Crum 56e780b97c Fixed a flaw in the RequestHandler.makeLink method: if any exceptions were thrown while generating the URL, the method proceeded as if nothing was wrong and created an invalid URL. Now the method returns null if any exceptions were thrown - it is up to calling code to decide what to do about it.
This commit also makes use of the new WebSiteProperties class to simplify code and improve performance.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534827 13f79535-47bb-0310-9956-ffa450edef68
2013-10-22 22:32:56 +00:00
Adrian Crum 0580243b03 Added a new class to simplify OFBiz URL generation and eliminate redundant code.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534826 13f79535-47bb-0310-9956-ffa450edef68
2013-10-22 22:27:13 +00:00
Jacques Le Roux 7f246614fd Eclipse keeps telling me I should use HttpServletRequest and says "The method getContextPath() is undefined for the type ServletContext" despite https://docs.oracle.com/javaee/6/api/javax/servlet/ServletContext.html#getContextPath%28%29
I tried to put a @SuppressWarnings("cast") which is also supported by Eclipse http://stackoverflow.com/questions/1205995/what-is-the-list-of-valid-suppresswarnings-warning-names-in-java
But no ways, I gave up and just put a comment there


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534591 13f79535-47bb-0310-9956-ffa450edef68
2013-10-22 10:23:26 +00:00
Adrian Crum af23fe0b35 Refactored ConfigXMLReader.java - added exception handling. The class swallowed exceptions like controller.xml file is missing or invalid - making debugging difficult. This commit introduces a WebAppConfigurationException and it propagates that exception farther up the stack.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534517 13f79535-47bb-0310-9956-ffa450edef68
2013-10-22 06:50:05 +00:00
Adrian Crum 09bd8a1428 Reformatted ConfigXMLReader.java - no functional change. This is in preparation for some refactoring.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534488 13f79535-47bb-0310-9956-ffa450edef68
2013-10-22 04:17:55 +00:00
Jacques Le Roux 8b081856e2 Revert r1534276 commented with <<No functional change, fixes this message in Eclipse "The method getContextPath() is undefined for the type ServletContext" which does not prevent to compile though. Compiled with Oracle JVM 1.6.0.45">>
As reported by Adrian in dev ML this commit breaks the embedded Catalina startup.

 java.lang.ClassCastException: org.apache.catalina.core.ApplicationContextFacade cannot be cast to javax.servlet.http.HttpServletRequest

Before Oracle JVM 1.6.0.45 you could not even compile, interesting... I wonder what will happen when we will jump in Java 8, which we will need to do a day or another anyway...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534404 13f79535-47bb-0310-9956-ffa450edef68
2013-10-21 22:48:29 +00:00
Jacques Le Roux 58e427adae No functional change, fixes this message in Eclipse "The method getContextPath() is undefined for the type ServletContext" which does not prevent to compile though. Compiled with Oracle JVM 1.6.0.45
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534276 13f79535-47bb-0310-9956-ffa450edef68
2013-10-21 17:01:03 +00:00
Jacques Le Roux 3a116293a3 A slightly modified patch from Gareth Carter for "Fixes for some xml/groovy files" https://issues.apache.org/jira/browse/OFBIZ-5349
Validated all xml files and compiled all groovy files and found a few errors. Look at patch for details

jleroux: For webapptests.xml, I prefered to revert it from r959261 (I saw an issue in my xml editor, did not check more)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1532366 13f79535-47bb-0310-9956-ffa450edef68
2013-10-15 14:51:57 +00:00
Jacques Le Roux c8ce55ecc9 A patch from Anahita Goljahani for Fixed mispelling of "occurred" https://issues.apache.org/jira/browse/OFBIZ-5342
jleroux: this includes a safe change in jquery.validate.js and jquery.validate.min.js

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530341 13f79535-47bb-0310-9956-ffa450edef68
2013-10-08 16:35:40 +00:00
Adam Heath 7b3d3f6be9 There are some controller.xml entries that have a name of "none"; those
should be preferred as valid responses, instead of always assuming that
none means do nothing.

This fixes the issue reported in OFBIZ-5304.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1527754 13f79535-47bb-0310-9956-ffa450edef68
2013-09-30 19:57:13 +00:00
Adrian Crum 58bdfa3254 Remove dependency of webapp component on geo-related entities. This will make it easier to exclude geo-related functionality in a framework-only installation.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526298 13f79535-47bb-0310-9956-ffa450edef68
2013-09-25 20:51:33 +00:00
Jacques Le Roux 5c4bb0a2b4 Reverts r1518777
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1522675 13f79535-47bb-0310-9956-ffa450edef68
2013-09-12 17:36:45 +00:00
Adrian Crum ac4f89935d Trivial improvement to log message: Add a stack trace.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1522006 13f79535-47bb-0310-9956-ffa450edef68
2013-09-11 19:39:34 +00:00
Jacques Le Roux d6eaefbeb6 This fixes "Net before overhead report generates an error" https://issues.apache.org/jira/browse/OFBIZ-5267
This is related with r1361130, where the birt component was moved from framework to specialpurpose.

The fix is to create the possibility of a loose coupling from applications controllers to specialpurpose controllers. For that an if-present attribute is added to the include element. When used, if the included controller does not exist, instead of an error and a stack trace, a warning is thrown (only in English, for developers) suggesting to checkout the component from trunk. Indeed, in the current case, this situation should only arise in release after 12.04 where the birt component, like all others but the ecommerce component, had been removed. This can be used in other cases, but for now only the component level is covered.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1518777 13f79535-47bb-0310-9956-ffa450edef68
2013-08-29 19:37:44 +00:00
Jacques Le Roux 1956e731a3 No functional changes, only formatting.
While looking for other cases like r1459222 and r1509164 introduced by r1300812 and r1305309. I noticed there were a lot of wrong for loops formatting (miss a white space after for), this changes it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1511742 13f79535-47bb-0310-9956-ffa450edef68
2013-08-08 12:28:01 +00:00
Hans Bakker 7d904526a0 missing file related to r1506836
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1508362 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 09:45:18 +00:00
Hans Bakker d3248ec21b be able to set a font for pdf generation
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1506836 13f79535-47bb-0310-9956-ffa450edef68
2013-07-25 07:53:29 +00:00
Adam Heath 35f83deb96 FEATURE: Add extension points to the controller login workflow; this
allows other components to automatically insert themselves, without
having to modify any existing files.  This can be used for integrating
with Jasig CAS, or with OpenID.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1497892 13f79535-47bb-0310-9956-ffa450edef68
2013-06-28 19:08:32 +00:00
Adam Heath 256a4af82b FEATURE: Allow for externalLoginKey parameter generation to be turned
off; the use for this feature will become apparent shortly.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1497891 13f79535-47bb-0310-9956-ffa450edef68
2013-06-28 19:08:24 +00:00
Jacques Le Roux 5bffbb20bf A fixing patch from Leon for "Some enhancement to password change." https://issues.apache.org/jira/browse/OFBIZ-5176
This line should not have been changed, "requirePasswordChange" can come from UserLogin not only "request"

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1488938 13f79535-47bb-0310-9956-ffa450edef68
2013-06-03 09:34:26 +00:00
Jacques Le Roux eb9f05e7aa Add a mean to collect and show the Requests Events durations using Metrics https://issues.apache.org/jira/browse/OFBIZ-5198
Fulfill the goal with some more:
* makes the Metrics main parameters (estimationSize, estimationTime and smoothing) dynamically changeable (added in serverstats.properties)
* there is no threshold handling for event metrics


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1485601 13f79535-47bb-0310-9956-ffa450edef68
2013-05-23 07:55:14 +00:00
Adrian Crum e5099432a0 Fixed a bug in the performance metrics feature where the wrong request Map was being updated in some cases.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1484145 13f79535-47bb-0310-9956-ffa450edef68
2013-05-18 16:46:01 +00:00
Adrian Crum 9bd42ec3a2 Reverted revision 1483822.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1484134 13f79535-47bb-0310-9956-ffa450edef68
2013-05-18 16:12:50 +00:00
Jacques Le Roux 929a06dfd5 Improves the Metrics stats by adding a new column used only by requests. It's quite useful to measure the real (not smoothed) durations of events in notably *chained* requests.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1483822 13f79535-47bb-0310-9956-ffa450edef68
2013-05-17 14:21:02 +00:00
Adam Heath 952e43cdb5 FEATURE: When calling services from an incoming http requests, allow for a different request and session attribute name to be specified.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482508 13f79535-47bb-0310-9956-ffa450edef68
2013-05-14 18:09:31 +00:00
Adam Heath ec142071b0 FEATURE: If the user gets forcibly logged out, store a message into the
request that mentions this; currently, nothing uses this, but that is
coming soon.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482132 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 22:31:20 +00:00
Adam Heath e787885bb6 FEATURE: Allow events to return "none"; they can already return null,
which stops processing.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482130 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 22:31:04 +00:00
Adam Heath da1f1f92e6 FEATURE: Allow first-visit and preprocessor events to run "none"; this
is the same as null, and will stop processing.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482129 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 22:30:55 +00:00