Index: /FCKeditor.Java/branches/2.6.x/LICENSE.txt
===================================================================
--- /FCKeditor.Java/branches/2.6.x/LICENSE.txt	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/LICENSE.txt	(revision 4150)
@@ -0,0 +1,1247 @@
+FCKeditor - The text editor for Internet - http://www.fckeditor.net
+Copyright (C) 2004-2009 Frederico Caldeira Knabben
+
+Licensed under the terms of any of the following licenses at your
+choice:
+
+ - GNU General Public License Version 2 or later (the "GPL")
+   http://www.gnu.org/licenses/gpl.html
+   (See Appendix A)
+
+ - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+   http://www.gnu.org/licenses/lgpl.html
+   (See Appendix B)
+
+ - Mozilla Public License Version 1.1 or later (the "MPL")
+   http://www.mozilla.org/MPL/MPL-1.1.html
+   (See Appendix C)
+
+You are not required to, but if you want to explicitly declare the
+license you have chosen to be bound to when using, reproducing,
+modifying and distributing this software, just include a text file
+titled "legal.txt" in your version of this software, indicating your
+license choice. In any case, your choice will not restrict any
+recipient of your version of this software to use, reproduce, modify
+and distribute this software under any of the above licenses.
+
+Appendix A: The GPL License
+===========================
+
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+
+Appendix B: The LGPL License
+============================
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+
+Appendix C: The MPL License
+===========================
+
+                          MOZILLA PUBLIC LICENSE
+                                Version 1.1
+
+                              ---------------
+
+1. Definitions.
+
+     1.0.1. "Commercial Use" means distribution or otherwise making the
+     Covered Code available to a third party.
+
+     1.1. "Contributor" means each entity that creates or contributes to
+     the creation of Modifications.
+
+     1.2. "Contributor Version" means the combination of the Original
+     Code, prior Modifications used by a Contributor, and the Modifications
+     made by that particular Contributor.
+
+     1.3. "Covered Code" means the Original Code or Modifications or the
+     combination of the Original Code and Modifications, in each case
+     including portions thereof.
+
+     1.4. "Electronic Distribution Mechanism" means a mechanism generally
+     accepted in the software development community for the electronic
+     transfer of data.
+
+     1.5. "Executable" means Covered Code in any form other than Source
+     Code.
+
+     1.6. "Initial Developer" means the individual or entity identified
+     as the Initial Developer in the Source Code notice required by Exhibit
+     A.
+
+     1.7. "Larger Work" means a work which combines Covered Code or
+     portions thereof with code not governed by the terms of this License.
+
+     1.8. "License" means this document.
+
+     1.8.1. "Licensable" means having the right to grant, to the maximum
+     extent possible, whether at the time of the initial grant or
+     subsequently acquired, any and all of the rights conveyed herein.
+
+     1.9. "Modifications" means any addition to or deletion from the
+     substance or structure of either the Original Code or any previous
+     Modifications. When Covered Code is released as a series of files, a
+     Modification is:
+          A. Any addition to or deletion from the contents of a file
+          containing Original Code or previous Modifications.
+
+          B. Any new file that contains any part of the Original Code or
+          previous Modifications.
+
+     1.10. "Original Code" means Source Code of computer software code
+     which is described in the Source Code notice required by Exhibit A as
+     Original Code, and which, at the time of its release under this
+     License is not already Covered Code governed by this License.
+
+     1.10.1. "Patent Claims" means any patent claim(s), now owned or
+     hereafter acquired, including without limitation,  method, process,
+     and apparatus claims, in any patent Licensable by grantor.
+
+     1.11. "Source Code" means the preferred form of the Covered Code for
+     making modifications to it, including all modules it contains, plus
+     any associated interface definition files, scripts used to control
+     compilation and installation of an Executable, or source code
+     differential comparisons against either the Original Code or another
+     well known, available Covered Code of the Contributor's choice. The
+     Source Code can be in a compressed or archival form, provided the
+     appropriate decompression or de-archiving software is widely available
+     for no charge.
+
+     1.12. "You" (or "Your")  means an individual or a legal entity
+     exercising rights under, and complying with all of the terms of, this
+     License or a future version of this License issued under Section 6.1.
+     For legal entities, "You" includes any entity which controls, is
+     controlled by, or is under common control with You. For purposes of
+     this definition, "control" means (a) the power, direct or indirect,
+     to cause the direction or management of such entity, whether by
+     contract or otherwise, or (b) ownership of more than fifty percent
+     (50%) of the outstanding shares or beneficial ownership of such
+     entity.
+
+2. Source Code License.
+
+     2.1. The Initial Developer Grant.
+     The Initial Developer hereby grants You a world-wide, royalty-free,
+     non-exclusive license, subject to third party intellectual property
+     claims:
+          (a)  under intellectual property rights (other than patent or
+          trademark) Licensable by Initial Developer to use, reproduce,
+          modify, display, perform, sublicense and distribute the Original
+          Code (or portions thereof) with or without Modifications, and/or
+          as part of a Larger Work; and
+
+          (b) under Patents Claims infringed by the making, using or
+          selling of Original Code, to make, have made, use, practice,
+          sell, and offer for sale, and/or otherwise dispose of the
+          Original Code (or portions thereof).
+
+          (c) the licenses granted in this Section 2.1(a) and (b) are
+          effective on the date Initial Developer first distributes
+          Original Code under the terms of this License.
+
+          (d) Notwithstanding Section 2.1(b) above, no patent license is
+          granted: 1) for code that You delete from the Original Code; 2)
+          separate from the Original Code;  or 3) for infringements caused
+          by: i) the modification of the Original Code or ii) the
+          combination of the Original Code with other software or devices.
+
+     2.2. Contributor Grant.
+     Subject to third party intellectual property claims, each Contributor
+     hereby grants You a world-wide, royalty-free, non-exclusive license
+
+          (a)  under intellectual property rights (other than patent or
+          trademark) Licensable by Contributor, to use, reproduce, modify,
+          display, perform, sublicense and distribute the Modifications
+          created by such Contributor (or portions thereof) either on an
+          unmodified basis, with other Modifications, as Covered Code
+          and/or as part of a Larger Work; and
+
+          (b) under Patent Claims infringed by the making, using, or
+          selling of  Modifications made by that Contributor either alone
+          and/or in combination with its Contributor Version (or portions
+          of such combination), to make, use, sell, offer for sale, have
+          made, and/or otherwise dispose of: 1) Modifications made by that
+          Contributor (or portions thereof); and 2) the combination of
+          Modifications made by that Contributor with its Contributor
+          Version (or portions of such combination).
+
+          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
+          effective on the date Contributor first makes Commercial Use of
+          the Covered Code.
+
+          (d)    Notwithstanding Section 2.2(b) above, no patent license is
+          granted: 1) for any code that Contributor has deleted from the
+          Contributor Version; 2)  separate from the Contributor Version;
+          3)  for infringements caused by: i) third party modifications of
+          Contributor Version or ii)  the combination of Modifications made
+          by that Contributor with other software  (except as part of the
+          Contributor Version) or other devices; or 4) under Patent Claims
+          infringed by Covered Code in the absence of Modifications made by
+          that Contributor.
+
+3. Distribution Obligations.
+
+     3.1. Application of License.
+     The Modifications which You create or to which You contribute are
+     governed by the terms of this License, including without limitation
+     Section 2.2. The Source Code version of Covered Code may be
+     distributed only under the terms of this License or a future version
+     of this License released under Section 6.1, and You must include a
+     copy of this License with every copy of the Source Code You
+     distribute. You may not offer or impose any terms on any Source Code
+     version that alters or restricts the applicable version of this
+     License or the recipients' rights hereunder. However, You may include
+     an additional document offering the additional rights described in
+     Section 3.5.
+
+     3.2. Availability of Source Code.
+     Any Modification which You create or to which You contribute must be
+     made available in Source Code form under the terms of this License
+     either on the same media as an Executable version or via an accepted
+     Electronic Distribution Mechanism to anyone to whom you made an
+     Executable version available; and if made available via Electronic
+     Distribution Mechanism, must remain available for at least twelve (12)
+     months after the date it initially became available, or at least six
+     (6) months after a subsequent version of that particular Modification
+     has been made available to such recipients. You are responsible for
+     ensuring that the Source Code version remains available even if the
+     Electronic Distribution Mechanism is maintained by a third party.
+
+     3.3. Description of Modifications.
+     You must cause all Covered Code to which You contribute to contain a
+     file documenting the changes You made to create that Covered Code and
+     the date of any change. You must include a prominent statement that
+     the Modification is derived, directly or indirectly, from Original
+     Code provided by the Initial Developer and including the name of the
+     Initial Developer in (a) the Source Code, and (b) in any notice in an
+     Executable version or related documentation in which You describe the
+     origin or ownership of the Covered Code.
+
+     3.4. Intellectual Property Matters
+          (a) Third Party Claims.
+          If Contributor has knowledge that a license under a third party's
+          intellectual property rights is required to exercise the rights
+          granted by such Contributor under Sections 2.1 or 2.2,
+          Contributor must include a text file with the Source Code
+          distribution titled "LEGAL" which describes the claim and the
+          party making the claim in sufficient detail that a recipient will
+          know whom to contact. If Contributor obtains such knowledge after
+          the Modification is made available as described in Section 3.2,
+          Contributor shall promptly modify the LEGAL file in all copies
+          Contributor makes available thereafter and shall take other steps
+          (such as notifying appropriate mailing lists or newsgroups)
+          reasonably calculated to inform those who received the Covered
+          Code that new knowledge has been obtained.
+
+          (b) Contributor APIs.
+          If Contributor's Modifications include an application programming
+          interface and Contributor has knowledge of patent licenses which
+          are reasonably necessary to implement that API, Contributor must
+          also include this information in the LEGAL file.
+
+               (c)    Representations.
+          Contributor represents that, except as disclosed pursuant to
+          Section 3.4(a) above, Contributor believes that Contributor's
+          Modifications are Contributor's original creation(s) and/or
+          Contributor has sufficient rights to grant the rights conveyed by
+          this License.
+
+     3.5. Required Notices.
+     You must duplicate the notice in Exhibit A in each file of the Source
+     Code.  If it is not possible to put such notice in a particular Source
+     Code file due to its structure, then You must include such notice in a
+     location (such as a relevant directory) where a user would be likely
+     to look for such a notice.  If You created one or more Modification(s)
+     You may add your name as a Contributor to the notice described in
+     Exhibit A.  You must also duplicate this License in any documentation
+     for the Source Code where You describe recipients' rights or ownership
+     rights relating to Covered Code.  You may choose to offer, and to
+     charge a fee for, warranty, support, indemnity or liability
+     obligations to one or more recipients of Covered Code. However, You
+     may do so only on Your own behalf, and not on behalf of the Initial
+     Developer or any Contributor. You must make it absolutely clear than
+     any such warranty, support, indemnity or liability obligation is
+     offered by You alone, and You hereby agree to indemnify the Initial
+     Developer and every Contributor for any liability incurred by the
+     Initial Developer or such Contributor as a result of warranty,
+     support, indemnity or liability terms You offer.
+
+     3.6. Distribution of Executable Versions.
+     You may distribute Covered Code in Executable form only if the
+     requirements of Section 3.1-3.5 have been met for that Covered Code,
+     and if You include a notice stating that the Source Code version of
+     the Covered Code is available under the terms of this License,
+     including a description of how and where You have fulfilled the
+     obligations of Section 3.2. The notice must be conspicuously included
+     in any notice in an Executable version, related documentation or
+     collateral in which You describe recipients' rights relating to the
+     Covered Code. You may distribute the Executable version of Covered
+     Code or ownership rights under a license of Your choice, which may
+     contain terms different from this License, provided that You are in
+     compliance with the terms of this License and that the license for the
+     Executable version does not attempt to limit or alter the recipient's
+     rights in the Source Code version from the rights set forth in this
+     License. If You distribute the Executable version under a different
+     license You must make it absolutely clear that any terms which differ
+     from this License are offered by You alone, not by the Initial
+     Developer or any Contributor. You hereby agree to indemnify the
+     Initial Developer and every Contributor for any liability incurred by
+     the Initial Developer or such Contributor as a result of any such
+     terms You offer.
+
+     3.7. Larger Works.
+     You may create a Larger Work by combining Covered Code with other code
+     not governed by the terms of this License and distribute the Larger
+     Work as a single product. In such a case, You must make sure the
+     requirements of this License are fulfilled for the Covered Code.
+
+4. Inability to Comply Due to Statute or Regulation.
+
+     If it is impossible for You to comply with any of the terms of this
+     License with respect to some or all of the Covered Code due to
+     statute, judicial order, or regulation then You must: (a) comply with
+     the terms of this License to the maximum extent possible; and (b)
+     describe the limitations and the code they affect. Such description
+     must be included in the LEGAL file described in Section 3.4 and must
+     be included with all distributions of the Source Code. Except to the
+     extent prohibited by statute or regulation, such description must be
+     sufficiently detailed for a recipient of ordinary skill to be able to
+     understand it.
+
+5. Application of this License.
+
+     This License applies to code to which the Initial Developer has
+     attached the notice in Exhibit A and to related Covered Code.
+
+6. Versions of the License.
+
+     6.1. New Versions.
+     Netscape Communications Corporation ("Netscape") may publish revised
+     and/or new versions of the License from time to time. Each version
+     will be given a distinguishing version number.
+
+     6.2. Effect of New Versions.
+     Once Covered Code has been published under a particular version of the
+     License, You may always continue to use it under the terms of that
+     version. You may also choose to use such Covered Code under the terms
+     of any subsequent version of the License published by Netscape. No one
+     other than Netscape has the right to modify the terms applicable to
+     Covered Code created under this License.
+
+     6.3. Derivative Works.
+     If You create or use a modified version of this License (which you may
+     only do in order to apply it to code which is not already Covered Code
+     governed by this License), You must (a) rename Your license so that
+     the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
+     "MPL", "NPL" or any confusingly similar phrase do not appear in your
+     license (except to note that your license differs from this License)
+     and (b) otherwise make it clear that Your version of the license
+     contains terms which differ from the Mozilla Public License and
+     Netscape Public License. (Filling in the name of the Initial
+     Developer, Original Code or Contributor in the notice described in
+     Exhibit A shall not of themselves be deemed to be modifications of
+     this License.)
+
+7. DISCLAIMER OF WARRANTY.
+
+     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
+     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
+     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
+     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
+     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
+     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
+     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
+     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+8. TERMINATION.
+
+     8.1.  This License and the rights granted hereunder will terminate
+     automatically if You fail to comply with terms herein and fail to cure
+     such breach within 30 days of becoming aware of the breach. All
+     sublicenses to the Covered Code which are properly granted shall
+     survive any termination of this License. Provisions which, by their
+     nature, must remain in effect beyond the termination of this License
+     shall survive.
+
+     8.2.  If You initiate litigation by asserting a patent infringement
+     claim (excluding declatory judgment actions) against Initial Developer
+     or a Contributor (the Initial Developer or Contributor against whom
+     You file such action is referred to as "Participant")  alleging that:
+
+     (a)  such Participant's Contributor Version directly or indirectly
+     infringes any patent, then any and all rights granted by such
+     Participant to You under Sections 2.1 and/or 2.2 of this License
+     shall, upon 60 days notice from Participant terminate prospectively,
+     unless if within 60 days after receipt of notice You either: (i)
+     agree in writing to pay Participant a mutually agreeable reasonable
+     royalty for Your past and future use of Modifications made by such
+     Participant, or (ii) withdraw Your litigation claim with respect to
+     the Contributor Version against such Participant.  If within 60 days
+     of notice, a reasonable royalty and payment arrangement are not
+     mutually agreed upon in writing by the parties or the litigation claim
+     is not withdrawn, the rights granted by Participant to You under
+     Sections 2.1 and/or 2.2 automatically terminate at the expiration of
+     the 60 day notice period specified above.
+
+     (b)  any software, hardware, or device, other than such Participant's
+     Contributor Version, directly or indirectly infringes any patent, then
+     any rights granted to You by such Participant under Sections 2.1(b)
+     and 2.2(b) are revoked effective as of the date You first made, used,
+     sold, distributed, or had made, Modifications made by that
+     Participant.
+
+     8.3.  If You assert a patent infringement claim against Participant
+     alleging that such Participant's Contributor Version directly or
+     indirectly infringes any patent where such claim is resolved (such as
+     by license or settlement) prior to the initiation of patent
+     infringement litigation, then the reasonable value of the licenses
+     granted by such Participant under Sections 2.1 or 2.2 shall be taken
+     into account in determining the amount or value of any payment or
+     license.
+
+     8.4.  In the event of termination under Sections 8.1 or 8.2 above,
+     all end user license agreements (excluding distributors and resellers)
+     which have been validly granted by You or any distributor hereunder
+     prior to termination shall survive termination.
+
+9. LIMITATION OF LIABILITY.
+
+     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
+     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
+     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
+     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
+     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
+     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
+     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
+     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
+     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
+     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
+     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
+     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
+     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
+     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+10. U.S. GOVERNMENT END USERS.
+
+     The Covered Code is a "commercial item," as that term is defined in
+     48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+     software" and "commercial computer software documentation," as such
+     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
+     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
+     all U.S. Government End Users acquire Covered Code with only those
+     rights set forth herein.
+
+11. MISCELLANEOUS.
+
+     This License represents the complete agreement concerning subject
+     matter hereof. If any provision of this License is held to be
+     unenforceable, such provision shall be reformed only to the extent
+     necessary to make it enforceable. This License shall be governed by
+     California law provisions (except to the extent applicable law, if
+     any, provides otherwise), excluding its conflict-of-law provisions.
+     With respect to disputes in which at least one party is a citizen of,
+     or an entity chartered or registered to do business in the United
+     States of America, any litigation relating to this License shall be
+     subject to the jurisdiction of the Federal Courts of the Northern
+     District of California, with venue lying in Santa Clara County,
+     California, with the losing party responsible for costs, including
+     without limitation, court costs and reasonable attorneys' fees and
+     expenses. The application of the United Nations Convention on
+     Contracts for the International Sale of Goods is expressly excluded.
+     Any law or regulation which provides that the language of a contract
+     shall be construed against the drafter shall not apply to this
+     License.
+
+12. RESPONSIBILITY FOR CLAIMS.
+
+     As between Initial Developer and the Contributors, each party is
+     responsible for claims and damages arising, directly or indirectly,
+     out of its utilization of rights under this License and You agree to
+     work with Initial Developer and Contributors to distribute such
+     responsibility on an equitable basis. Nothing herein is intended or
+     shall be deemed to constitute any admission of liability.
+
+13. MULTIPLE-LICENSED CODE.
+
+     Initial Developer may designate portions of the Covered Code as
+     "Multiple-Licensed".  "Multiple-Licensed" means that the Initial
+     Developer permits you to utilize portions of the Covered Code under
+     Your choice of the NPL or the alternative licenses, if any, specified
+     by the Initial Developer in the file described in Exhibit A.
+
+EXHIBIT A -Mozilla Public License.
+
+     ``The contents of this file are subject to the Mozilla Public License
+     Version 1.1 (the "License"); you may not use this file except in
+     compliance with the License. You may obtain a copy of the License at
+     http://www.mozilla.org/MPL/
+
+     Software distributed under the License is distributed on an "AS IS"
+     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+     License for the specific language governing rights and limitations
+     under the License.
+
+     The Original Code is ______________________________________.
+
+     The Initial Developer of the Original Code is ________________________.
+     Portions created by ______________________ are Copyright (C) ______
+     _______________________. All Rights Reserved.
+
+     Contributor(s): ______________________________________.
+
+     Alternatively, the contents of this file may be used under the terms
+     of the _____ license (the  "[___] License"), in which case the
+     provisions of [______] License are applicable instead of those
+     above.  If you wish to allow use of your version of this file only
+     under the terms of the [____] License and not to allow others to use
+     your version of this file under the MPL, indicate your decision by
+     deleting  the provisions above and replace  them with the notice and
+     other provisions required by the [___] License.  If you do not delete
+     the provisions above, a recipient may use your version of this file
+     under either the MPL or the [___] License."
+
+     [NOTE: The text of this Exhibit A may differ slightly from the text of
+     the notices in the Source Code files of the Original Code. You should
+     use the text of this Exhibit A rather than the text found in the
+     Original Code Source Code for Your Modifications.]
+
Index: /FCKeditor.Java/branches/2.6.x/build.xml
===================================================================
--- /FCKeditor.Java/branches/2.6.x/build.xml	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/build.xml	(revision 4150)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ * @version: $Id$
+-->
+<project name="fckeditor-java" basedir=".">
+
+	<target name="stripped-fckeditor-dist"
+	        description="Creates a stripped FCKeditor distribution">
+		<property name="fckeditor-tmp" location="fckeditor-tmp" />
+		<property name="fckeditor-basename" value="FCKeditor_2.6.4.1" />
+		<property name="fckeditor-destfile"
+		          value="${fckeditor-basename}_clean.zip"
+		/>
+		<delete file="${fckeditor-destfile}" />
+		<unzip dest="${fckeditor-tmp}" src="${fckeditor-basename}.zip" />
+		<zip destfile="${fckeditor-destfile}">
+			<zipfileset dir="${fckeditor-tmp}/fckeditor" prefix="fckeditor">
+				<include name="_samples/_plugins/" />
+				<include name="editor/" />
+				<include name="fckconfig.js" />
+				<include name="*.xml" />
+				<exclude name="editor/filemanager/connectors/" />
+			</zipfileset>
+		</zip>
+		<delete dir="${fckeditor-tmp}" />
+	</target>
+
+	<target name="clean-deployment" description="Cleans local deployment path">
+        <delete dir="/home/mosipov/public_html" />
+    </target>
+	
+	<!-- Do NOT remove this target. This is for link rewrite testing purposes -->
+	<!--
+	<target name="rewrite-links" description="rewrites plain links in real links">
+
+		<replaceregexp byline="true" flags="m" file="target/site/tagreference.html">
+
+			<regexp pattern="&amp;lt;a href=&amp;quot;(\p{Graph}+)&amp;quot;\s*&amp;gt;(\p{Graph}+)&amp;lt;/a&amp;gt;" />
+			<substitution expression="&lt;a href=&quot;\1&quot;&gt;\2&lt;/a&gt;" />
+
+		</replaceregexp>
+	</target>
+	-->
+
+</project>
Index: /FCKeditor.Java/branches/2.6.x/eclipse-format-profile.xml
===================================================================
--- /FCKeditor.Java/branches/2.6.x/eclipse-format-profile.xml	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/eclipse-format-profile.xml	(revision 4150)
@@ -0,0 +1,264 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<profiles version="11">
+<profile kind="CodeFormatterProfile" name="FCKeditor Conventions" version="11">
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="100"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.compiler.source" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="100"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
+</profile>
+</profiles>
Index: /FCKeditor.Java/branches/2.6.x/java-core/pom.xml
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/pom.xml	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/pom.xml	(revision 4150)
@@ -0,0 +1,242 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ * @version: $Id$
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>java-core</artifactId>
+	<packaging>jar</packaging>
+	<dependencies>
+		<dependency>
+			<groupId>commons-fileupload</groupId>
+			<artifactId>commons-fileupload</artifactId>
+			<version>1.2.1</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-io</groupId>
+			<artifactId>commons-io</artifactId>
+			<version>1.3.2</version>
+		</dependency>
+		<dependency>
+			<groupId>org.devlib.schmidt</groupId>
+			<artifactId>imageinfo</artifactId>
+			<version>1.9</version>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+			<version>${slf4j.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>2.4</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>jstl</artifactId>
+			<version>1.1.2</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet.jsp</groupId>
+			<artifactId>jsp-api</artifactId>
+			<version>2.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.5</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-nop</artifactId>
+			<version>${slf4j.version}</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.mockito</groupId>
+			<artifactId>mockito-all</artifactId>
+			<version>1.7</version>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+	<parent>
+		<groupId>net.fckeditor</groupId>
+		<artifactId>fckeditor-java</artifactId>
+		<version>2.6-SNAPSHOT</version>
+	</parent>
+
+	<build>
+		<finalName>fckeditor-${artifactId}-${version}</finalName>
+		<plugins>
+			<plugin>
+				<artifactId>maven-antrun-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>rewrite-tagreference-links</id>
+						<phase>site</phase>
+						<goals>
+							<goal>run</goal>
+						</goals>
+						<configuration>
+							<tasks>
+								<property name="ant.regexp.regexpimpl" value="org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp" />
+								<replaceregexp byline="true" flags="m" file="target/site/tagreference.html">
+									<regexp pattern="&amp;lt;a href=&amp;quot;(\p{Graph}+)&amp;quot;\s*&amp;gt;(\p{Graph}+)&amp;lt;/a&amp;gt;" />
+									<substitution expression="&lt;a href=&quot;\1&quot;&gt;\2&lt;/a&gt;" />
+								</replaceregexp>
+							</tasks>
+						</configuration>
+					</execution>
+				</executions>
+				<!--<dependencies>
+					<dependency>
+					<groupId>ant</groupId>
+					<artifactId>ant-nodeps</artifactId>
+					<version>1.6.5</version>
+					</dependency>
+					</dependencies>-->
+			</plugin>
+			<plugin>
+				<artifactId>maven-javadoc-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>attach-javadocs</id>
+						<goals>
+							<goal>jar</goal>
+						</goals>
+					</execution>
+				</executions>
+				 <configuration>
+					<links>
+						<link>http://tomcat.apache.org/tomcat-5.5-doc/servletapi/</link>
+						<link>http://tomcat.apache.org/tomcat-5.5-doc/jspapi/</link>
+					</links>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-source-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>attach-sources</id>
+						<goals>
+							<goal>jar-no-fork</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+
+	<reporting>
+		<plugins>
+			<plugin>
+				<groupId>net.sourceforge.maven-taglib</groupId>
+				<artifactId>maven-taglib-plugin</artifactId>
+			</plugin>
+			<plugin>
+				<artifactId>maven-surefire-report-plugin</artifactId>
+			</plugin>
+			<plugin>
+				<artifactId>maven-jxr-plugin</artifactId>
+			</plugin>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>cobertura-maven-plugin</artifactId>
+				<version>2.3</version>
+			</plugin>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>taglist-maven-plugin</artifactId>
+				<version>2.3</version>
+				<configuration>
+					<tags>
+						<tag>TODO</tag>
+						<tag>FIXME</tag>
+					</tags>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>
+					maven-project-info-reports-plugin
+				</artifactId>
+				<reportSets>
+					<reportSet>
+						<reports>
+							<report>dependencies</report>
+							<report>summary</report>
+						</reports>
+					</reportSet>
+				</reportSets>
+			</plugin>
+			<plugin>
+				<artifactId>maven-javadoc-plugin</artifactId>
+				<configuration>
+					<quiet>true</quiet>
+		 			<links>
+						<link>http://tomcat.apache.org/tomcat-5.5-doc/servletapi/</link>
+						<link>http://tomcat.apache.org/tomcat-5.5-doc/jspapi/</link>
+					</links>
+					<show>package</show>
+					<docfilessubdirs>true</docfilessubdirs>
+					<keywords>true</keywords>
+				</configuration>
+				<reportSets>
+					<reportSet>
+						<reports>
+							<report>javadoc</report>
+						</reports>
+					</reportSet>
+				</reportSets>
+			</plugin>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>clirr-maven-plugin</artifactId>
+				<version>2.2.2</version>
+				<configuration>
+					<comparisonVersion>2.5</comparisonVersion>
+					<minSeverity>info</minSeverity>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>javancss-maven-plugin</artifactId>
+				<version>2.0</version>
+				<configuration>
+					<lineThreshold>15</lineThreshold>
+				</configuration>
+			</plugin>
+		</plugins>
+	</reporting>
+
+	<name>FCKeditor.Java Integration Core</name>
+	<description>
+		This Java library enables the FCKeditor to be used in a
+		Servlet/J2EE environment. It provides JSP tags for creating a
+		FCKeditor instance and a Servlet handling server-side user files
+		and folders.
+	</description>
+	<url>http://java.fckeditor.net</url>
+</project>
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/FCKeditor.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/FCKeditor.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/FCKeditor.java	(revision 4150)
@@ -0,0 +1,380 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor;
+
+import javax.servlet.http.HttpServletRequest;
+
+import net.fckeditor.handlers.PropertiesLoader;
+import net.fckeditor.tool.Compatibility;
+import net.fckeditor.tool.Utils;
+import net.fckeditor.tool.XHtmlTagTool;
+
+/**
+ * Java representation of the <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Server_Side_Integration#FCKeditor_Creator"
+ * target="_blank">FCKeditor</a>. This representation reflects the editor in an
+ * object-oriented way. It can be configured as any other JavaBean type class.
+ * The final output of this class is HTML code.<br />
+ * <strong>Note:</strong> It's your responsibility to supply reasonable and
+ * valid values, only {@code request} and {@code instanceName} will be checked
+ * for sanity.
+ * 
+ * @version $Id$
+ */
+public class FCKeditor {
+
+	private FCKeditorConfig fckConfig = new FCKeditorConfig();
+	private String instanceName;
+	private HttpServletRequest request;
+
+	// defaults
+	private String value = Utils.EMPTY_STRING;
+	private String toolbarSet = PropertiesLoader.getEditorToolbarSet();
+	private String width = PropertiesLoader.getEditorWidth();
+	private String height = PropertiesLoader.getEditorHeight();
+	private String basePath = PropertiesLoader.getEditorBasePath();
+
+	/**
+	 * Class constructor with all basic parameters.
+	 * 
+	 * A constructors which handles basic FCKeditor initialization with a few
+	 * parameters. If you omit basic parameters, default ones will be taken from
+	 * the {@link PropertiesLoader properties file}.
+	 * 
+	 * @param request
+	 *            current user request instance
+	 * @param instanceName
+	 *            the unique name of this editor
+	 * @param width
+	 *            the desired editor width (CSS-style value)
+	 * @param height
+	 *            the desired editor height (CSS-style value)
+	 * @param toolbarSet
+	 *            the desired toolbar set name
+	 * @param value
+	 *            the HTML markup of this editor. Markup will be properly
+	 *            escaped.
+	 * @param basePath
+	 *            the base path of this editor, absolute to the context
+	 * @throws IllegalArgumentException
+	 *             if instanceName is empty or not a valid XHTML id
+	 */
+	public FCKeditor(final HttpServletRequest request,
+			final String instanceName, final String width, final String height,
+			final String toolbarSet, final String value, final String basePath) {
+
+		this(request, instanceName);
+		this.width = width;
+		this.height = height;
+		this.toolbarSet = toolbarSet;
+		this.value = value;
+		this.basePath = basePath;
+
+	}
+
+	/**
+	 * Class constructor with a minimal set of parameters.
+	 * 
+	 * Omitted parameters will be set to default values.
+	 * 
+	 * @param request
+	 *            current user request instance
+	 * @param instanceName
+	 *            the unique name of this editor
+	 * @throws IllegalArgumentException
+	 *             if instanceName is empty or not a valid HTML id
+	 */
+	public FCKeditor(final HttpServletRequest request, final String instanceName) {
+
+		if (request == null)
+			throw new NullPointerException("the request cannot be null");
+		this.request = request;
+
+		setInstanceName(instanceName);
+
+	}
+
+	/**
+	 * Sets the unique name of this editor.
+	 * 
+	 * @param instanceName
+	 *            the unique name of this editor
+	 * @throws IllegalArgumentException
+	 *             if instanceName is empty or not a valid XHTML id
+	 */
+	public void setInstanceName(final String instanceName) {
+		if (Utils.isEmpty(instanceName))
+			throw new IllegalArgumentException("instanceName cannot be empty");
+		if (!instanceName.matches("\\p{Alpha}[\\p{Alnum}:_.-]*"))
+			throw new IllegalArgumentException(
+					"instanceName must be a valid XHTML id containing only \"\\p{Alpha}[\\p{Alnum}:_.-]*\"");
+		this.instanceName = instanceName;
+	}
+
+	/**
+	 * Sets the initial value to be edited as HTML markup.
+	 * 
+	 * @param value
+	 *            the HTML markup of this editor. Markup will be properly
+	 *            escaped.
+	 */
+	public void setValue(final String value) {
+		this.value = value;
+	}
+
+	/**
+	 * Sets the base path of this editor. The base path reflects the location of
+	 * the editor files absolute to the context root <i>not</i> the server root.
+	 * 
+	 * @param basePath
+	 *            the base path of this editor, absolute to the context
+	 */
+	public void setBasePath(final String basePath) {
+		this.basePath = basePath;
+	}
+
+	/**
+	 * Sets the name of the toolbar set of this editor.
+	 * 
+	 * @param toolbarSet
+	 *            the desired toolbar set name
+	 */
+	public void setToolbarSet(final String toolbarSet) {
+		this.toolbarSet = toolbarSet;
+	}
+
+	/**
+	 * Sets the width of this editor. This value can be any valid CSS width
+	 * value.
+	 * 
+	 * @param width
+	 *            the desired editor width (CSS-style value)
+	 */
+	public void setWidth(final String width) {
+		this.width = width;
+	}
+
+	/**
+	 * Sets the height of this editor. This value can be any valid CSS height
+	 * value.
+	 * 
+	 * @param height
+	 *            the desired editor height (CSS-style value)
+	 */
+	public void setHeight(final String height) {
+		this.height = height;
+	}
+
+	/**
+	 * Gets the advanced configuration map. Each configuration element has to be
+	 * set individually in this map.<br />
+	 * The editor provides already a system-wide configuration through the
+	 * <code>config.js</code> file. By adding elements to this map you can
+	 * override the configuration for each editor instance.
+	 * 
+	 * @deprecated Method will be removed in FCKeditor.Java 2.6, use
+	 *             {@link FCKeditor#getConfig(String)}.
+	 * @see #getConfig(String)
+	 * @return configuration configuration map for this editor instance
+	 */
+	@Deprecated
+	public FCKeditorConfig getConfig() {
+		return fckConfig;
+	}
+
+	/**
+	 * Returns a configuration option. See {@link FCKeditorConfig} for more
+	 * details.
+	 * 
+	 * @param name
+	 *            the name of the parameter (case-sensitive)
+	 * @return the value represented by this parameter, else null
+	 */
+	public String getConfig(String name) {
+		return fckConfig.get(name);
+	}
+
+	/**
+	 * Sets a configuration option. See {@link FCKeditorConfig} for more
+	 * details.
+	 * 
+	 * @param name
+	 *            the name of the config option (case-sensitive)
+	 * @param value
+	 *            the value of the config option. Null values will be ignored.
+	 */
+	public void setConfig(String name, String value) {
+		if (value != null)
+			fckConfig.put(name, value);
+	}
+
+	/**
+	 * Sets the advanced configuration maps. <strong>Note:</strong> previously
+	 * 
+	 * @deprecated Method will be removed in FCKeditor.Java 2.6, use
+	 *             {@link #setConfig(String, String)}.
+	 * @see #setConfig(String, String)
+	 * @param config
+	 *            configuration collection
+	 */
+	@Deprecated
+	public void setConfig(FCKeditorConfig config) {
+		this.fckConfig = config;
+	}
+
+	/**
+	 * Escapes base XML entities as specified <a
+	 * href="http://en.wikipedia.org/wiki/Xml#Entity_references">here</a>.
+	 * 
+	 * @param str
+	 *            string to escape, empty strings will be ignored
+	 * @return escaped string
+	 */
+	private String escapeXml(String str) {
+
+		if (Utils.isEmpty(str))
+			return str;
+
+		StringBuffer sb = new StringBuffer();
+
+		int len = str.length();
+		char c;
+
+		for (int i = 0; i < len; i++) {
+
+			c = str.charAt(i);
+			switch (c) {
+			case '&':
+				sb.append("&amp;");
+				break;
+			case '<':
+				sb.append("&lt;");
+				break;
+			case '>':
+				sb.append("&gt;");
+				break;
+			case '"':
+				sb.append("&quot;");
+				break;
+			// XML actually defines &apos; as entity for the apostrophe but we
+			// user rather the numerical reference to avoid XHTML 1.0 validation
+			// problems
+			case '\'':
+				sb.append("&#39;");
+				break;
+			default:
+				sb.append(c);
+				break;
+			}
+		}
+
+		return sb.toString();
+	}
+
+	/**
+	 * Creates the HTML representation of this editor instance. First of all,
+	 * this method determines whether the request browser is supported.
+	 * According to the result an appropriate HTML representation is assembled
+	 * and returned.
+	 * 
+	 * @return HTML representation of this editor instance
+	 */
+	@Override
+	public String toString() {
+		StringBuffer strEditor = new StringBuffer();
+
+		strEditor.append("<div>");
+		String encodedValue = escapeXml(value);
+
+		if (Compatibility.isCompatibleBrowser(request)) {
+			strEditor.append(createInputForVariable(instanceName, instanceName,
+					encodedValue));
+
+			// create config HTML
+			String configStr = fckConfig.getUrlParams();
+			if (Utils.isNotEmpty(configStr))
+				strEditor.append(createInputForVariable(null, instanceName
+						.concat("___Config"), configStr));
+
+			// create IFrame
+			StringBuffer editorLink = new StringBuffer(request.getContextPath());
+			editorLink.append(basePath);
+			editorLink.append("/editor/fckeditor.html?InstanceName=").append(
+					instanceName);
+			if (Utils.isNotEmpty(toolbarSet))
+				editorLink.append("&amp;Toolbar=").append(toolbarSet);
+
+			XHtmlTagTool iframeTag = new XHtmlTagTool("iframe",
+					XHtmlTagTool.SPACE);
+			iframeTag.addAttribute("id", instanceName.concat("___Frame"));
+			iframeTag.addAttribute("src", editorLink.toString());
+			iframeTag.addAttribute("width", width);
+			iframeTag.addAttribute("height", height);
+			iframeTag.addAttribute("frameborder", "0");
+			iframeTag.addAttribute("scrolling", "no");
+			strEditor.append(iframeTag);
+
+		} else {
+			XHtmlTagTool textareaTag = new XHtmlTagTool("textarea",
+					encodedValue);
+			textareaTag.addAttribute("name", instanceName);
+			textareaTag.addAttribute("rows", "4");
+			textareaTag.addAttribute("cols", "40");
+			textareaTag.addAttribute("wrap", "virtual");
+			textareaTag.addAttribute("style", "width: ".concat(width).concat(
+					"; height: ").concat(height));
+		}
+		strEditor.append("</div>");
+		return strEditor.toString();
+	}
+
+	/**
+	 * Creates the HTML representation of this editor instance.
+	 * 
+	 * @see #toString()
+	 * @return HTML representation of this editor instance
+	 */
+	public String createHtml() {
+		return toString();
+	}
+
+	/**
+	 * Creates a hidden input element for the given attributes.
+	 * 
+	 * @param name
+	 *            name attribute of the input tag
+	 * @param id
+	 *            id attribute of the input tag
+	 * @param value
+	 *            value attribute of the input tag
+	 * @return the produced XHTML tag
+	 */
+	private String createInputForVariable(final String name, final String id,
+			final String value) {
+		XHtmlTagTool tag = new XHtmlTagTool("input");
+		if (Utils.isNotEmpty(id))
+			tag.addAttribute("id", id);
+		if (Utils.isNotEmpty(name))
+			tag.addAttribute("name", name);
+		tag.addAttribute("value", value);
+		tag.addAttribute("type", "hidden");
+		return tag.toString();
+	}
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/FCKeditorConfig.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/FCKeditorConfig.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/FCKeditorConfig.java	(revision 4150)
@@ -0,0 +1,74 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.HashMap;
+import java.util.Map;
+
+import net.fckeditor.tool.Utils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Java representation of the <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options"
+ * target="_blank">FCKConfig</a> object from the editor. Every FCKeditor
+ * instance will load the <code>config.js</code> by default, if you assign a
+ * FCKConfig instance to an editor, it will automatically override these
+ * system-wide settings for the current instance only.
+ * 
+ * @version $Id$
+ */
+public class FCKeditorConfig extends HashMap<String, String> {
+
+	private static final long serialVersionUID = -4831190504944866644L;
+	private static final Logger logger = LoggerFactory
+			.getLogger(FCKeditorConfig.class);
+
+	/**
+	 * Generates the URL parameter sequence for this configuration.
+	 * 
+	 * @return HTML-encoded sequence of configuration parameters
+	 */
+	public String getUrlParams() {
+		StringBuffer osParams = new StringBuffer();
+		try {
+			for (Map.Entry<String, String> entry : this.entrySet()) {
+				if (Utils.isNotEmpty(entry.getValue())) {
+					osParams.append("&amp;");
+					osParams.append(entry.getKey());
+					osParams.append("=");
+					osParams.append(URLEncoder
+							.encode(entry.getValue(), "UTF-8"));
+				}
+			}
+
+		} catch (UnsupportedEncodingException e) {
+			logger.error("Configuration parameters could not be encoded", e);
+		}
+
+		if (osParams.length() > 0)
+			osParams.delete(0, 5);
+		return osParams.toString();
+	}
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/Connector.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/Connector.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/Connector.java	(revision 4150)
@@ -0,0 +1,171 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.connector;
+
+import java.io.InputStream;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.ServletContext;
+
+import net.fckeditor.connector.exception.FolderAlreadyExistsException;
+import net.fckeditor.connector.exception.InvalidCurrentFolderException;
+import net.fckeditor.connector.exception.InvalidNewFolderNameException;
+import net.fckeditor.connector.exception.ReadException;
+import net.fckeditor.connector.exception.WriteException;
+import net.fckeditor.connector.impl.AbstractLocalFileSystemConnector;
+import net.fckeditor.handlers.RequestCycleHandler;
+import net.fckeditor.handlers.ResourceType;
+import net.fckeditor.requestcycle.ThreadLocalData;
+
+/**
+ * Backend interface of a File Browser connector. A connector serves and manages
+ * files and folders accessed through the File Browser on an arbitrary backend
+ * system.<br />
+ * The connector will receive a request if, and only if, the request was valid
+ * in terms of valid and reasonable parameters up to an abstract point which is
+ * independent from a specific connector implementation.
+ * <p>
+ * Helpful classes and methods:
+ * <ol>
+ * <li>If you need to access the request instance itself and/or the context
+ * parameters sent from the File Browser, take a look at the
+ * {@link ThreadLocalData} class.</li>
+ * <li>Use
+ * {@link RequestCycleHandler#getUserFilesAbsolutePath(javax.servlet.http.HttpServletRequest)
+ * RequestCycleHandler.getUserFilesAbsolutePath},
+ * {@link AbstractLocalFileSystemConnector#getRealUserFilesAbsolutePath(java.lang.String)
+ * AbstractLocalFileSystemConnector.getRealUserFilesAbsolutePath} (if use it) to
+ * resolve the real path or simply do it yourself.</li>
+ * </ol>
+ * </p>
+ * 
+ * @version $Id$
+ */
+public interface Connector {
+
+	/** Key 'name' for a file's name */
+	public final static String KEY_NAME = "name";
+	
+	/** Key 'size' for a file's length */
+	public final static String KEY_SIZE = "size";
+
+	/**
+	 * Initializes this connector. Called at {@link Dispatcher dispatcher}
+	 * initialization.
+	 * 
+	 * @param servletContext
+	 *            reference to the {@link ServletContext} in which the caller is
+	 *            running
+	 * @throws Exception
+	 *             if the connector initialization fails due to some reason
+	 */
+	public void init(final ServletContext servletContext) throws Exception;
+
+	/**
+	 * Returns a list of file attributes from the backend. Use the pre-defined
+	 * keys ({@value #KEY_NAME}, {@value #KEY_SIZE}) to put file attributes into
+	 * the file map. The file length can be any instance of {@link Number}, its
+	 * long value will be taken as the final value.
+	 * 
+	 * @param type
+	 *            the current resource type
+	 * @param currentFolder
+	 *            the current folder
+	 * @return a list of file attributes
+	 * @throws InvalidCurrentFolderException
+	 *             if the current folder name is invalid or does not exist
+	 *             within the underlying backend
+	 * @throws ReadException
+	 *             if the file attributes could not be read due to some reason
+	 */
+	public List<Map<String, Object>> getFiles(final ResourceType type,
+			final String currentFolder) throws InvalidCurrentFolderException,
+			ReadException;
+
+	/**
+	 * Returns a list of folders from the backend.
+	 * 
+	 * @param type
+	 *            the current resource type
+	 * @param currentFolder
+	 *            the current folder
+	 * @return a list of folder names
+	 * @throws InvalidCurrentFolderException
+	 *             if the current folder name is invalid or does not exist
+	 *             within the underlying backend
+	 * @throws ReadException
+	 *             if the folder names could not be read due to some reason
+	 */
+	public List<String> getFolders(final ResourceType type,
+			final String currentFolder) throws InvalidCurrentFolderException,
+			ReadException;
+
+	/**
+	 * Creates a new folder on the backend.
+	 * 
+	 * @param type
+	 *            the current resource type
+	 * @param currentFolder
+	 *            the current folder
+	 * @param newFolder
+	 *            name of the new folder
+	 * @throws InvalidCurrentFolderException
+	 *             if the current folder name is invalid or does not exist
+	 *             within the underlying backend
+	 * @throws InvalidNewFolderNameException
+	 *             if the new folder name is invalid due to some reason
+	 * @throws FolderAlreadyExistsException
+	 *             if the new folder already exists
+	 * @throws WriteException
+	 *             if the new folder could not be created due to some reason
+	 */
+	public void createFolder(final ResourceType type,
+			final String currentFolder, final String newFolder)
+			throws InvalidCurrentFolderException,
+			InvalidNewFolderNameException, FolderAlreadyExistsException,
+			WriteException;
+
+	/**
+	 * Uploads a new file on to the backend. You are not allowed to overwrite
+	 * already existing files, rename the new file and return the new filename.
+	 * 
+	 * @param type
+	 *            the current resource type
+	 * @param currentFolder
+	 *            the current folder
+	 * @param fileName
+	 *            the name of the new file
+	 * @param inputStream
+	 *            input stream of the new file
+	 * @return the (eventually renamed) name of the uploaded file
+	 * @throws InvalidCurrentFolderException
+	 *             if the current folder name is invalid or does not exist
+	 *             within the underlying backend
+	 * @throws WriteException
+	 *             if the new file could not be created due to some reason
+	 */
+	public String fileUpload(final ResourceType type,
+			final String currentFolder, final String fileName,
+			final InputStream inputStream)
+			throws InvalidCurrentFolderException, WriteException;
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/ConnectorServlet.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/ConnectorServlet.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/ConnectorServlet.java	(revision 4150)
@@ -0,0 +1,145 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.connector;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import net.fckeditor.requestcycle.ThreadLocalData;
+import net.fckeditor.response.GetResponse;
+import net.fckeditor.response.UploadResponse;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Connector servlet of the File Browser. It accepts requests begins the request
+ * cycle, forwards requests to the {@link Dispatcher dispatcher} and ends the
+ * request cycle with an appropriate {@link net.fckeditor.response response}.
+ * 
+ * @version $Id$
+ */
+public class ConnectorServlet extends HttpServlet {
+	private static final long serialVersionUID = -5742008970929377161L;
+	private final Logger logger = LoggerFactory.getLogger(ConnectorServlet.class);
+	private transient Dispatcher dispatcher;
+
+	/**
+	 * Initializes this servlet. It initializes the dispatcher internally.
+	 * 
+	 * @throws ServletException
+	 *             if an exception occurs that interrupts the servlet's normal
+	 *             operation
+	 */
+	@Override
+	public void init() throws ServletException {
+		try {
+			dispatcher = new Dispatcher(getServletContext());
+		} catch (Exception e) {
+			logger.error("Dispatcher could not be initialized", e);
+			throw new ServletException(e);
+		}
+	}
+
+	/**
+	 * Passes a GET request to the dispatcher.
+	 * 
+	 * @throws IOException
+	 *             if an input or output error is detected when the servlet
+	 *             handles the GET request
+	 * @throws ServletException
+	 *             if the request for the GET could not be handled
+	 */
+	@Override
+	protected void doGet(final HttpServletRequest request,
+			final HttpServletResponse response) throws ServletException,
+			IOException {
+		request.setCharacterEncoding("UTF-8");
+		response.setCharacterEncoding("UTF-8");
+		response.setContentType("application/xml");
+		response.setHeader("Cache-Control", "no-cache");
+		PrintWriter out = response.getWriter();
+		GetResponse getResponse = null;
+
+		try {
+			ThreadLocalData.beginRequest(request);
+			getResponse = dispatcher.doGet(request);
+		} catch (Exception e) {
+			throw new ServletException(e);
+		} finally {
+			/*
+			 * call this method to prevent detached requests or else the request
+			 * will probably never be garbage collected and will fill your
+			 * memory
+			 */
+			ThreadLocalData.endRequest();
+		}
+
+		out.print(getResponse);
+		out.flush();
+		out.close();
+	}
+
+	/**
+	 * Passes a POST request to the dispatcher.
+	 * 
+	 * @throws IOException
+	 *             if an input or output error is detected when the servlet
+	 *             handles the request
+	 * @throws ServletException
+	 *             if the request for the POST could not be handled
+	 */
+	@Override
+	protected void doPost(final HttpServletRequest request,
+			final HttpServletResponse response) throws ServletException,
+			IOException {
+		request.setCharacterEncoding("UTF-8");
+		response.setCharacterEncoding("UTF-8");
+		response.setContentType("text/html");
+		response.setHeader("Cache-Control", "no-cache");
+		PrintWriter out = response.getWriter();
+		UploadResponse uploadResponse = null;
+
+		try {
+			ThreadLocalData.beginRequest(request);
+			uploadResponse = dispatcher.doPost(request);
+		} catch (Exception e) {
+			throw new ServletException(e);
+		} finally {
+			/*
+			 * call this method to prevent detached requests or else the request
+			 * will probably never be garbage collected and will fill your
+			 * memory
+			 */
+			ThreadLocalData.endRequest();
+		}
+
+		out.print(uploadResponse);
+		out.flush();
+		out.close();
+	}
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/Dispatcher.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/Dispatcher.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/Dispatcher.java	(revision 4150)
@@ -0,0 +1,296 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.connector;
+
+import java.io.IOException;
+import java.util.List;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+
+import net.fckeditor.connector.exception.FolderAlreadyExistsException;
+import net.fckeditor.connector.exception.InvalidCurrentFolderException;
+import net.fckeditor.connector.exception.InvalidNewFolderNameException;
+import net.fckeditor.connector.exception.ReadException;
+import net.fckeditor.connector.exception.WriteException;
+import net.fckeditor.handlers.Command;
+import net.fckeditor.handlers.ConnectorHandler;
+import net.fckeditor.handlers.PropertiesLoader;
+import net.fckeditor.handlers.RequestCycleHandler;
+import net.fckeditor.handlers.ResourceType;
+import net.fckeditor.requestcycle.Context;
+import net.fckeditor.requestcycle.ThreadLocalData;
+import net.fckeditor.response.GetResponse;
+import net.fckeditor.response.UploadResponse;
+import net.fckeditor.tool.Utils;
+import net.fckeditor.tool.UtilsFile;
+import net.fckeditor.tool.UtilsResponse;
+
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.FileItemFactory;
+import org.apache.commons.fileupload.FileUploadException;
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
+import org.apache.commons.fileupload.servlet.ServletFileUpload;
+import org.apache.commons.io.FilenameUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * File Browser request dispatcher. This class is the validating and managing
+ * instance between the {@link ConnectorServlet connector servlet} and the
+ * {@link Connector connector}. It receives the requests, parses the parameters,
+ * validates/sanitizes them and mandates them to the connector. After the
+ * connector has processed the request, this dispatcher passes the response back
+ * to the connector servlet. More over, it intercepts all
+ * {@link net.fckeditor.connector.exception specified exceptions} from a
+ * connector and emits appropriate (localized) messages to the user. The
+ * exceptions won't be logged, they simply indicate the connector state.
+ * 
+ * @version $Id$
+ */
+public class Dispatcher {
+	private final Logger logger = LoggerFactory.getLogger(Dispatcher.class);
+	private Connector connector;
+
+	/**
+	 * Initializes this dispatcher. It initializes the connector internally.
+	 * Called at connector servlet {@link ConnectorServlet#init()
+	 * initialization}.
+	 * 
+	 * @param servletContext
+	 *            reference to the {@link ServletContext} in which the caller is
+	 *            running
+	 * @throws Exception
+	 *             if the dispatcher initialization fails due to some reason
+	 */
+	Dispatcher(final ServletContext servletContext) throws Exception {
+		connector = ConnectorHandler.getConnector();
+		connector.init(servletContext);
+	}
+
+	/**
+	 * Called by the connector servlet to handle a {@code GET} request. In
+	 * particular, it handles the {@link Command#GET_FOLDERS GetFolders},
+	 * {@link Command#GET_FOLDERS_AND_FILES GetFoldersAndFiles} and
+	 * {@link Command#CREATE_FOLDER CreateFolder} commands.
+	 * 
+	 * @param request
+	 *            the current request instance
+	 * @return the get response instance associated with this request
+	 */
+	GetResponse doGet(final HttpServletRequest request) {
+		logger.debug("Entering Dispatcher#doGet");
+		
+		Context context = ThreadLocalData.getContext();
+		context.logBaseParameters();
+		
+		GetResponse getResponse = null;
+		// check parameters
+		if (!Command.isValidForGet(context.getCommandStr()))
+			getResponse = GetResponse.getInvalidCommandError();
+		else if (!ResourceType.isValidType(context.getTypeStr()))
+			getResponse = GetResponse.getInvalidResourceTypeError();
+		else if (!UtilsFile.isValidPath(context.getCurrentFolderStr()))
+			getResponse = GetResponse.getInvalidCurrentFolderError();
+		else {
+			
+			// in contrast to doPost the referrer has to send an explicit type
+			ResourceType type = context.getResourceType();
+			Command command = context.getCommand();
+			
+			// check permissions for user action
+			if ((command.equals(Command.GET_FOLDERS) || command
+					.equals(Command.GET_FOLDERS_AND_FILES))
+					&& !RequestCycleHandler.isEnabledForFileBrowsing(request))
+				getResponse = GetResponse.getGetResourcesDisabledError();
+			else if (command.equals(Command.CREATE_FOLDER)
+					&& !RequestCycleHandler.isCreateFolderEnabled(request))
+				getResponse = GetResponse.getCreateFolderDisabledError();
+			else {
+				// make the connector calls, catch its exceptions and generate
+				// the proper response object
+				try {
+					if (command.equals(Command.CREATE_FOLDER)) {
+						String newFolderNameStr = request
+								.getParameter("NewFolderName");
+						logger.debug("Parameter NewFolderName: {}",
+								newFolderNameStr);				
+						String sanitizedNewFolderNameStr = UtilsFile
+								.sanitizeFolderName(newFolderNameStr);
+						if (Utils.isEmpty(sanitizedNewFolderNameStr))
+							getResponse = GetResponse
+									.getInvalidNewFolderNameError();
+						else {
+							logger.debug(
+									"Parameter NewFolderName (sanitized): {}",
+									sanitizedNewFolderNameStr);
+							connector.createFolder(type, context
+									.getCurrentFolderStr(),
+									sanitizedNewFolderNameStr);
+							getResponse = GetResponse.getOK();
+						}
+					} else if (command.equals(Command.GET_FOLDERS)
+							|| command
+									.equals(Command.GET_FOLDERS_AND_FILES)) {
+						String url = UtilsResponse.getUrl(RequestCycleHandler
+								.getUserFilesPath(request), type, context
+								.getCurrentFolderStr());
+						getResponse = getFoldersAndOrFiles(command, type, context
+								.getCurrentFolderStr(), url);
+					}
+				} catch (InvalidCurrentFolderException e) {
+					getResponse = GetResponse.getInvalidCurrentFolderError();
+				} catch (InvalidNewFolderNameException e) {
+					getResponse = GetResponse.getInvalidNewFolderNameError();
+				} catch (FolderAlreadyExistsException e) {
+					getResponse = GetResponse.getFolderAlreadyExistsError();
+				} catch (WriteException e) {
+					getResponse = GetResponse.getCreateFolderWriteError();
+				} catch (ReadException e) {
+					getResponse = GetResponse.getGetResourcesReadError();
+				}
+			}
+		}
+		
+		logger.debug("Exiting Dispatcher#doGet");
+		return getResponse;
+	}
+	
+	/**
+	 * Returns get response for the {@code GetFolders*} commands. This is simply
+	 * a helper method.
+	 * 
+	 * @param command
+	 *            the current command, should be only GetFolders or
+	 *            GetFoldersAndFiles
+	 * @param the
+	 *            current resource type
+	 * @param currentFolder
+	 *            the current folder
+	 * @param constructedUrl
+	 *            the final URL
+	 * @return the get response instance associated with this request
+	 * @throws InvalidCurrentFolderException
+	 *             if the current folder name is invalid or does not exist
+	 *             within the underlying backend
+	 * @throws ReadException
+	 *             if the file attributes and/or folder names could not be read
+	 *             due to some reason
+	 */
+	private GetResponse getFoldersAndOrFiles(final Command command,
+			final ResourceType type, final String currentFolder,
+			final String constructedUrl) throws InvalidCurrentFolderException,
+			ReadException {
+		GetResponse getResponse = new GetResponse(command, type,
+				currentFolder, constructedUrl);
+		getResponse.setFolders(connector.getFolders(type, currentFolder));
+		if (command.equals(Command.GET_FOLDERS_AND_FILES))
+			getResponse.setFiles(connector.getFiles(type, currentFolder));
+		return getResponse;
+	}
+
+	/**
+	 * Called by the connector servlet to handle a {@code POST} request. In
+	 * particular, it handles the {@link Command#FILE_UPLOAD FileUpload} and
+	 * {@link Command#QUICK_UPLOAD QuickUpload} commands.
+	 * 
+	 * @param request
+	 *            the current request instance
+	 * @return the upload response instance associated with this request
+	 */
+	UploadResponse doPost(final HttpServletRequest request) {
+		logger.debug("Entering Dispatcher#doPost");
+		
+		Context context = ThreadLocalData.getContext();
+		context.logBaseParameters();
+		
+		UploadResponse uploadResponse = null;
+		// check permissions for user actions
+		if (!RequestCycleHandler.isEnabledForFileUpload(request))
+			uploadResponse = UploadResponse.getFileUploadDisabledError();
+		// check parameters  
+		else if (!Command.isValidForPost(context.getCommandStr()))
+			uploadResponse = UploadResponse.getInvalidCommandError();
+		else if (!ResourceType.isValidType(context.getTypeStr()))
+			uploadResponse = UploadResponse.getInvalidResourceTypeError();
+		else if (!UtilsFile.isValidPath(context.getCurrentFolderStr()))
+			uploadResponse = UploadResponse.getInvalidCurrentFolderError();
+		else {
+
+			// call the Connector#fileUpload
+			ResourceType type = context.getDefaultResourceType();
+			FileItemFactory factory = new DiskFileItemFactory();
+			ServletFileUpload upload = new ServletFileUpload(factory);
+			try {
+				List<FileItem> items = upload.parseRequest(request);
+				// We upload just one file at the same time
+				FileItem uplFile = items.get(0);
+				// Some browsers transfer the entire source path not just the
+				// filename
+				String fileName = FilenameUtils.getName(uplFile.getName());
+				logger.debug("Parameter NewFile: {}", fileName);
+				// check the extension
+				if (type.isNotAllowedExtension(FilenameUtils
+						.getExtension(fileName)))
+					uploadResponse = UploadResponse.getInvalidFileTypeError();
+				// Secure image check (can't be done if QuickUpload)
+				else if (type.equals(ResourceType.IMAGE)
+						&& PropertiesLoader.isSecureImageUploads()
+						&& !UtilsFile.isImage(uplFile.getInputStream())) {
+					uploadResponse = UploadResponse.getInvalidFileTypeError();
+				} else {
+					String sanitizedFileName = UtilsFile
+							.sanitizeFileName(fileName);
+					logger.debug("Parameter NewFile (sanitized): {}",
+							sanitizedFileName);
+					String newFileName = connector.fileUpload(type, context
+							.getCurrentFolderStr(), sanitizedFileName, uplFile
+							.getInputStream());
+					String fileUrl = UtilsResponse.fileUrl(RequestCycleHandler
+							.getUserFilesPath(request), type, context
+							.getCurrentFolderStr(), newFileName);
+
+					if (sanitizedFileName.equals(newFileName))
+						uploadResponse = UploadResponse.getOK(fileUrl);
+					else {
+						uploadResponse = UploadResponse.getFileRenamedWarning(fileUrl, newFileName);
+						logger.debug("Parameter NewFile (renamed): {}",
+								newFileName);
+					}
+				}
+				
+				uplFile.delete();
+			} catch (InvalidCurrentFolderException e) {
+				uploadResponse = UploadResponse.getInvalidCurrentFolderError();
+			} catch (WriteException e) {
+				uploadResponse = UploadResponse.getFileUploadWriteError();
+			} catch (IOException e) {
+				uploadResponse = UploadResponse.getFileUploadWriteError();
+			} catch (FileUploadException e) {
+				uploadResponse = UploadResponse.getFileUploadWriteError();
+			}
+		}
+		
+		logger.debug("Exiting Dispatcher#doPost");
+		return uploadResponse;
+	}
+	
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/exception/FolderAlreadyExistsException.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/exception/FolderAlreadyExistsException.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/exception/FolderAlreadyExistsException.java	(revision 4150)
@@ -0,0 +1,33 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.connector.exception;
+
+/**
+ * Thrown to indicate that the requested folder cannot be created because it
+ * already exists.
+ * 
+ * @version $Id$
+ */
+public class FolderAlreadyExistsException extends Exception {
+
+	private static final long serialVersionUID = 2526172654962583635L;
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/exception/InvalidCurrentFolderException.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/exception/InvalidCurrentFolderException.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/exception/InvalidCurrentFolderException.java	(revision 4150)
@@ -0,0 +1,32 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.connector.exception;
+
+/**
+ * Thrown when an improper/invalid current folder was provided/requested.
+ * 
+ * @version $Id$
+ */
+public class InvalidCurrentFolderException extends Exception {
+
+	private static final long serialVersionUID = 8569316682489606369L;
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/exception/InvalidNewFolderNameException.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/exception/InvalidNewFolderNameException.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/exception/InvalidNewFolderNameException.java	(revision 4150)
@@ -0,0 +1,32 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.connector.exception;
+
+/**
+ * Thrown when an improper/invalid new folder name was provided.
+ * 
+ * @version $Id$
+ */
+public class InvalidNewFolderNameException extends Exception {
+
+	private static final long serialVersionUID = 85317665011505135L;
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/exception/ReadException.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/exception/ReadException.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/exception/ReadException.java	(revision 4150)
@@ -0,0 +1,32 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.connector.exception;
+
+/**
+ * Thrown to indicate that an error has occurred during some read action.
+ * 
+ * @version $Id$
+ */
+public class ReadException extends Exception {
+
+	private static final long serialVersionUID = 6418053231588982734L;
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/exception/WriteException.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/exception/WriteException.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/exception/WriteException.java	(revision 4150)
@@ -0,0 +1,32 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.connector.exception;
+
+/**
+ * Thrown to indicate that an error has occurred during some write action.
+ * 
+ * @version $Id$
+ */
+public class WriteException extends Exception {
+
+	private static final long serialVersionUID = 7742121738185371543L;
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/exception/package-info.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/exception/package-info.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/exception/package-info.java	(revision 4150)
@@ -0,0 +1,27 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+
+/**
+ * Custom {@link net.fckeditor.connector.Connector connector} exceptions.
+ *
+ * @version $Id$
+ */
+package net.fckeditor.connector.exception;
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/impl/AbstractLocalFileSystemConnector.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/impl/AbstractLocalFileSystemConnector.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/impl/AbstractLocalFileSystemConnector.java	(revision 4150)
@@ -0,0 +1,175 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.connector.impl;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.ServletContext;
+
+import net.fckeditor.connector.Connector;
+import net.fckeditor.connector.exception.FolderAlreadyExistsException;
+import net.fckeditor.connector.exception.InvalidCurrentFolderException;
+import net.fckeditor.connector.exception.InvalidNewFolderNameException;
+import net.fckeditor.connector.exception.WriteException;
+import net.fckeditor.handlers.RequestCycleHandler;
+import net.fckeditor.handlers.ResourceType;
+import net.fckeditor.requestcycle.ThreadLocalData;
+import net.fckeditor.requestcycle.UserPathBuilder;
+import net.fckeditor.tool.UtilsFile;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.io.filefilter.DirectoryFileFilter;
+import org.apache.commons.io.filefilter.FileFileFilter;
+
+/**
+ * Abstract local filesystem backend connector. This class is the default
+ * implementation of the <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Server_Side_Integration"
+ * target="_blank">official connector specification</a>.
+ * <p>
+ * It serves files and folders against a specific local directory which is
+ * resolved in a subclass. You cannot use this class directly, instead you have
+ * to subclass it and implement the abstract methods and override methods if
+ * necessary.
+ * 
+ * @version $Id$
+ */
+public abstract class AbstractLocalFileSystemConnector implements Connector {
+
+	protected ServletContext servletContext;
+
+	public String fileUpload(final ResourceType type,
+			final String currentFolder, final String fileName,
+			final InputStream inputStream)
+			throws InvalidCurrentFolderException, WriteException {
+		String absolutePath = getRealUserFilesAbsolutePath(RequestCycleHandler
+				.getUserFilesAbsolutePath(ThreadLocalData.getRequest()));
+		File typeDir = getOrCreateResourceTypeDir(absolutePath, type);
+		File currentDir = new File(typeDir, currentFolder);
+		if (!currentDir.exists() || !currentDir.isDirectory())
+			throw new InvalidCurrentFolderException();
+
+		File newFile = new File(currentDir, fileName);
+		File fileToSave = UtilsFile.getUniqueFile(newFile.getAbsoluteFile());
+
+		try {
+			IOUtils.copyLarge(inputStream, new FileOutputStream(fileToSave));
+		} catch (IOException e) {
+			throw new WriteException();
+		}
+		return fileToSave.getName();
+	}
+
+	public void createFolder(final ResourceType type,
+			final String currentFolder, final String newFolder)
+			throws InvalidCurrentFolderException,
+			InvalidNewFolderNameException, FolderAlreadyExistsException {
+		String absolutePath = getRealUserFilesAbsolutePath(RequestCycleHandler
+				.getUserFilesAbsolutePath(ThreadLocalData.getRequest()));
+		File typeDir = getOrCreateResourceTypeDir(absolutePath, type);
+		File currentDir = new File(typeDir, currentFolder);
+		if (!currentDir.exists() || !currentDir.isDirectory())
+			throw new InvalidCurrentFolderException();
+
+		File newDir = new File(currentDir, newFolder);
+		if (newDir.exists())
+			throw new FolderAlreadyExistsException();
+		if (!newDir.mkdir())
+			throw new InvalidNewFolderNameException();
+	}
+
+	public List<Map<String, Object>> getFiles(ResourceType type,
+			String currentFolder) throws InvalidCurrentFolderException {
+		String absolutePath = getRealUserFilesAbsolutePath(RequestCycleHandler
+				.getUserFilesAbsolutePath(ThreadLocalData.getRequest()));
+		File typeDir = getOrCreateResourceTypeDir(absolutePath, type);
+		File currentDir = new File(typeDir, currentFolder);
+		if (!currentDir.exists() || !currentDir.isDirectory())
+			throw new InvalidCurrentFolderException();
+
+		// collect files
+		List<Map<String, Object>> files;
+		Map<String, Object> fileMap;
+		File[] fileList = currentDir
+				.listFiles((FileFilter) FileFileFilter.FILE);
+		files = new ArrayList<Map<String, Object>>(fileList.length);
+		for (File file : fileList) {
+			fileMap = new HashMap<String, Object>(2);
+			fileMap.put(Connector.KEY_NAME, file.getName());
+			fileMap.put(Connector.KEY_SIZE, file.length());
+			files.add(fileMap);
+		}
+		return files;
+	}
+
+	public List<String> getFolders(final ResourceType type,
+			final String currentFolder) throws InvalidCurrentFolderException {
+		String absolutePath = getRealUserFilesAbsolutePath(RequestCycleHandler
+				.getUserFilesAbsolutePath(ThreadLocalData.getRequest()));
+		File typeDir = getOrCreateResourceTypeDir(absolutePath, type);
+		File currentDir = new File(typeDir, currentFolder);
+		if (!currentDir.exists() || !currentDir.isDirectory())
+			throw new InvalidCurrentFolderException();
+
+		String[] fileList = currentDir.list(DirectoryFileFilter.DIRECTORY);
+		return Arrays.asList(fileList);
+	}
+
+	/**
+	 * Resolves a provided userfiles absolute path against a specific backend.
+	 * The is no restriction how to resolve the path. To keep it simple, you may
+	 * use
+	 * {@link UserPathBuilder#getUserFilesAbsolutePath(javax.servlet.http.HttpServletRequest) UserPathBuilder.getUserFilesAbsolutePath}.
+	 * The return value has to be consistent within the entire request cycle.
+	 * 
+	 * @param userFilesAbsolutePath
+	 *            the userfiles absolute path to resolve against a specific
+	 *            backend
+	 * @return the resolved userfiles absolute path
+	 */
+	protected abstract String getRealUserFilesAbsolutePath(String userFilesAbsolutePath);
+
+	/**
+	 * Returns a file reference to a created resource type directory. The
+	 * directory will be created only if it does not exist.
+	 * 
+	 * @param baseDir
+	 *            the current resource type's base directory
+	 * @param type
+	 *            the current resource type
+	 * @return a file reference the resource type directory
+	 */
+	protected static File getOrCreateResourceTypeDir(final String baseDir,
+			final ResourceType type) {
+		File dir = new File(baseDir, type.getPath());
+		if (!dir.exists())
+			dir.mkdirs();
+		return dir;
+	}
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/impl/ContextConnector.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/impl/ContextConnector.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/impl/ContextConnector.java	(revision 4150)
@@ -0,0 +1,87 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.connector.impl;
+
+import javax.servlet.ServletContext;
+
+import net.fckeditor.handlers.PropertiesLoader;
+import net.fckeditor.requestcycle.impl.ContextPathBuilder;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Context filesystem backend connector. The file access will be restricted to
+ * the real context root of the currently deployed webapp.
+ * <p>
+ * Though, this connector has some drawbacks:
+ * <ul>
+ * <li>Stored files and folders will be gone if the context is undeployed,
+ * unless you have saved them before.</li>
+ * <li>Some servers are unable to write to the real context root (like
+ * WebSphere), see {@link #init(ServletContext)} for more details.</li>
+ * <li>Some containers (like Jetty) unpack the war file to a different directory
+ * at server start which means that files are gone in temp.</li>
+ * </ul>
+ * </p>
+ * Use the {@link ContextPathBuilder} in conjunction with this class.
+ * 
+ * @version $Id$
+ */
+public class ContextConnector extends AbstractLocalFileSystemConnector {
+	
+	private final Logger logger = LoggerFactory.getLogger(ContextConnector.class);
+
+	/**
+	 * {@inheritDoc}
+	 * This method will prepare the connector for further usage, additionally it
+	 * will check if the aforementioned drawback exists. It will try to resolve
+	 * the default {@link PropertiesLoader#getUserFilesPath() UserFilesPath}
+	 * with
+	 * <code><a href="http://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/ServletContext.html#getRealPath(java.lang.String)"
+	 * target="_blank">ServletContext.getRealPath(String)</a></code> against the
+	 * local filesystem (real path). If it fails, it will emit helpful log
+	 * messages and will throw an exception too.
+	 */
+	public void init(final ServletContext servletContext) throws Exception {
+		this.servletContext = servletContext;
+		String defaultAbsolutePath = getRealUserFilesAbsolutePath(PropertiesLoader
+				.getUserFilesPath());
+
+		if (defaultAbsolutePath == null) {
+			logger.error("The context root cannot be resolved against the local filesystem");
+			logger.info("Your servlet container/application server does not expand deployed war files");
+			logger.debug("Use another Connector implementation (e.g. LocalConnector) and consult http://www.fckeditor.net/forums/viewtopic.php?f=6&t=11568");
+			throw new NullPointerException(
+					"The real context root cannot be resolved against the local filesystem");
+		}
+	}
+
+	/**
+	 * Resolves the userfiles absolute path against the current context real
+	 * path.
+	 */
+	@Override
+	protected String getRealUserFilesAbsolutePath(String userFilesAbsolutePath) {
+		return servletContext.getRealPath(userFilesAbsolutePath);
+	}
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/impl/LocalConnector.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/impl/LocalConnector.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/impl/LocalConnector.java	(revision 4150)
@@ -0,0 +1,63 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.connector.impl;
+
+import javax.servlet.ServletContext;
+
+import net.fckeditor.requestcycle.impl.ServerRootPathBuilder;
+
+/**
+ * Real local filesystem backend connector. The file access is translated as-is
+ * to the local filesystem.
+ * <p>
+ * This maybe interesting for those who serve userfiles
+ * <ul>
+ * <li>from a static context of a servlet container/application
+ * server,</li>
+ * <li>from virtual servers with Apache HTTPd on different
+ * domains, e.g. <code>http://userfiles.mydomain.com</code>, or</li>
+ * <li>on a per-user basis, e.g. uploading to
+ * <code>/home/$USERNAME/public_html/fckeditor</code> and an Apache HTTPd serves
+ * as <code>/~$USERNAME/fckeditor</code>.</li>
+ * </ul>
+ * </p>
+ * Use the {@link ServerRootPathBuilder} in conjunction with this class.
+ * 
+ * @version $Id$
+ */
+public class LocalConnector extends AbstractLocalFileSystemConnector {
+
+	/**
+	 * {@inheritDoc} Assigns only the {@code servletContext}.
+	 */
+	public void init(final ServletContext servletContext) throws Exception {
+		this.servletContext = servletContext;
+	}
+
+	/**
+	 * Returns the passed parameter as-is.
+	 */
+	@Override
+	protected String getRealUserFilesAbsolutePath(String userFilesAbsolutePath) {
+		return userFilesAbsolutePath;
+	}
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/impl/package-info.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/impl/package-info.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/impl/package-info.java	(revision 4150)
@@ -0,0 +1,27 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+
+/**
+ * Default implementations for the connector interface.
+ * 
+ * @version $Id$
+ */
+package net.fckeditor.connector.impl;
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/package-info.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/package-info.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/connector/package-info.java	(revision 4150)
@@ -0,0 +1,33 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+
+/**
+ * Central interfaces and classes for the connector life cycle. They accept a
+ * File Browser request and manage its correct handling.
+ * <p>
+ * The sequence diagram below depicts the interaction between interfaces and
+ * classes:<br />
+ * <img src="doc-files/sequence-diagram.png" alt="Connector Life Cycle Diagram" 
+ * title="Connector Life Cycle Diagram" />
+ * </p>
+ * @version $Id$
+ */
+package net.fckeditor.connector;
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/Command.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/Command.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/Command.java	(revision 4150)
@@ -0,0 +1,206 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.handlers;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import net.fckeditor.tool.Utils;
+
+/**
+ * File Browser <code>GET</code> and <code>POST</code> commands.<br />
+ * The File Browser sends a specific command for each and every request. This
+ * class is intended to reflect these in an Enum-like manner.
+ * <p>
+ * The commands are for <code>GET</code>:
+ * <ul>
+ * <li>GetFolders</li>
+ * <li>GetFoldersAndFiles</li>
+ * <li>CreateFolder</li>
+ * </ul>
+ * and for <code>POST</code>:
+ * <ul>
+ * <li>FileUpload</li>
+ * <li>QuickUpload</li>
+ *</ul>
+ * 
+ * @version $Id$
+ */
+public class Command {
+
+	private String name;
+	private static final Map<String, Command> getCommands = new HashMap<String, Command>(
+			3);
+	private static final Map<String, Command> postCommands = new HashMap<String, Command>(
+			2);
+	/** GET command <code>GetFolders</code> */
+	public static final Command GET_FOLDERS = new Command("GetFolders");
+	/** GET command <code>GetFoldersAndFiles</code> */
+	public static final Command GET_FOLDERS_AND_FILES = new Command(
+			"GetFoldersAndFiles");
+	/** GET command <code>CreateFolder</code> */
+	public static final Command CREATE_FOLDER = new Command("CreateFolder");
+	/** POST command <code>FileUpload</code> */
+	public static final Command FILE_UPLOAD = new Command("FileUpload");
+	/** POST command <code>QuickUpload</code> */
+	public static final Command QUICK_UPLOAD = new Command("QuickUpload");
+
+	static {
+		// initialize the get commands
+		getCommands.put(GET_FOLDERS.getName(), GET_FOLDERS);
+		getCommands.put(GET_FOLDERS_AND_FILES.getName(), GET_FOLDERS_AND_FILES);
+		getCommands.put(CREATE_FOLDER.getName(), CREATE_FOLDER);
+
+		// initialize the post commands
+		postCommands.put(FILE_UPLOAD.getName(), FILE_UPLOAD);
+		postCommands.put(QUICK_UPLOAD.getName(), QUICK_UPLOAD);
+	}
+
+	/**
+	 * Constructs a command with the given name.
+	 * 
+	 * @param name
+	 *            the name of the new command
+	 */
+	private Command(final String name) {
+		this.name = name;
+	}
+
+	/**
+	 * Returns the name of this command.
+	 * 
+	 * @return the name of this command
+	 */
+	public String getName() {
+		return name;
+	}
+
+	/**
+	 * Returns the command constant with the specified name.
+	 * 
+	 * @param name
+	 *            the name of the constant to return
+	 * @return  the command constant with the specified name
+	 * @throws IllegalArgumentException
+	 *              if this class has no constant with the specified name
+	 * @throws NullPointerException
+	 *             if <code>name</code> is null or empty
+	 */
+	public static Command valueOf(final String name) {
+		if (Utils.isEmpty(name))
+			throw new NullPointerException("Name is null or empty");
+
+		Command command = getCommands.get(name);
+		if (command == null)
+			command = postCommands.get(name);
+		if (command == null)
+			throw new IllegalArgumentException("No command const " + name);
+
+		return command;
+	}
+
+	/**
+	 * Returns <code>true</code> if name represents a valid <code>GET</code>
+	 * command constant.
+	 * 
+	 * @param name
+	 *            the command to check
+	 * @return <code>true</code> if name represents a valid command, else
+	 *         <code>false</code>
+	 */
+	public static boolean isValidForGet(final String name) {
+		return getCommands.containsKey(name);
+	}
+
+	/**
+	 * Returns <code>true</code> if name represents a valid <code>POST</code>
+	 * command constant.
+	 * 
+	 * @param name
+	 *            the command to check
+	 * @return <code>true</code> if name represents a valid command, else
+	 *         <code>false</code>
+	 */
+	public static boolean isValidForPost(final String name) {
+		return postCommands.containsKey(name);
+	}
+
+	/**
+	 * Returns the command constant with the specified name. In contrast to
+	 * {@link #valueOf(String)} it returns a null instead of throwing an
+	 * exception if a command constant was not found.
+	 * 
+	 * @param name
+	 *            the name of the constant to return
+	 * @return the command constant with the specified name, else
+	 *         <code>null</code>
+	 */
+	public static Command getCommand(final String name) {
+		try {
+			return Command.valueOf(name);
+		} catch (Exception e) {
+			return null;
+		}
+	}
+	
+	/**
+	 * Compares the specified object with this command for equality. The
+	 * comparison is based on class and name only.
+	 * 
+	 * @param obj
+	 *            Object to be compared with this command.
+	 * @return <code>true</code> if the specified object is equal to this
+	 *         command
+	 */
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+
+		if (obj == null || this.getClass() != obj.getClass())
+			return false;
+
+		final Command command = (Command) obj;
+		return name.equals(command.getName());
+	}
+
+	/**
+	 * Returns the hash code value for this command. The hash code equals the
+	 * hash code of the name field.
+	 * 
+	 * @return the hash code value for this command
+	 */
+	@Override
+	public int hashCode() {
+		return name.hashCode();
+	}
+
+	/**
+	 * Returns a string representation of this command.
+	 * 
+	 * @return a string representation of this command
+	 * @see #getName()
+	 */
+	@Override
+	public String toString() {
+		return name;
+	}
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/ConnectorHandler.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/ConnectorHandler.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/ConnectorHandler.java	(revision 4150)
@@ -0,0 +1,128 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.handlers;
+
+import net.fckeditor.connector.Connector;
+import net.fckeditor.connector.Dispatcher;
+import net.fckeditor.tool.Utils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Handler for Connector-related properties.<br />
+ * Wraps to the {@link PropertiesLoader}.<br />
+ * <strong>Attention</strong>: This class will be merged into {@link Dispatcher}
+ * since it serves only one reason (Connector instantiation) which will be done
+ * more reasonably in the dispatcher directly.
+ * 
+ * @version $Id$
+ * @deprecated Class will be removed in FCKeditor.Java 2.6.
+ */
+public class ConnectorHandler {
+
+	private static final Logger logger = LoggerFactory
+			.getLogger(ConnectorHandler.class);
+	private static Connector connector = null;
+
+	static {
+
+		// try to instantiate the Connector object
+		String className = PropertiesLoader.getConnectorImpl();
+		if (Utils.isEmpty(className))
+			logger.error("Empty Connector implementation class name provided");
+		else {
+			try {
+				Class<?> clazz = Class.forName(className);
+				connector = (Connector) clazz.newInstance();
+				logger.info("Connector initialized to {}", className);
+			} catch (Throwable e) {
+				logger.error("Connector implementation {} could not be instantiated", className);
+				throw new RuntimeException("Connector implementation " + className + " could not be instantiated", e); //$NON-NLS-1$
+			}
+		}
+	}
+
+	/**
+	 * Getter for <code>connector.userFilesPath</code> property
+	 * 
+	 * @return UserFilesPath
+	 * @see PropertiesLoader#getUserFilesPath()
+	 * @deprecated Method will be removed in FCKeditor.Java 2.6, use
+	 *             {@link PropertiesLoader#getUserFilesPath()}.
+	 */
+	@Deprecated
+	public static String getUserFilesPath() {
+		return PropertiesLoader.getProperty("connector.userFilesPath");
+	}
+
+	/**
+	 * Getter for <code>connector.userFilesAbsolutePath</code> property
+	 * 
+	 * @return UserFilesAbsolutePath
+	 * @see PropertiesLoader#getUserFilesAbsolutePath()
+	 * @deprecated Method will be removed in FCKeditor.Java 2.6, use
+	 *             {@link PropertiesLoader#getUserFilesAbsolutePath()}.
+	 */
+	@Deprecated
+	public static String getUserFilesAbsolutePath() {
+		return PropertiesLoader.getProperty("connector.userFilesAbsolutePath");
+	}
+
+	/**
+	 * Getter for <code>connector.forceSingleExtension</code> property
+	 * 
+	 * @return ForceSingleExtension
+	 * @see PropertiesLoader#isForceSingleExtension()
+	 * @deprecated Method will be removed in FCKeditor.Java 2.6, use
+	 *             {@link PropertiesLoader#isForceSingleExtension()}.
+	 */
+	@Deprecated
+	public static boolean isForceSingleExtension() {
+		return Boolean.valueOf(PropertiesLoader
+				.getProperty("connector.forceSingleExtension"));
+	}
+
+	/**
+	 * Getter for <code>connector.secureImageUploads</code> property
+	 * 
+	 * @return SecureImageUploads
+	 * @see PropertiesLoader#isSecureImageUploads()
+	 * @deprecated Method will be removed in FCKeditor.Java 2.6, use
+	 *             {@link PropertiesLoader#isSecureImageUploads()}.
+	 */
+	@Deprecated
+	public static boolean isSecureImageUploads() {
+		return Boolean.valueOf(PropertiesLoader
+				.getProperty("connector.secureImageUploads"));
+	}
+
+	/**
+	 * Getter for the implementation of {@link Connector}.
+	 * 
+	 * @return Implementation of {@link Connector}.
+	 * @deprecated Method will be removed in FCKeditor.Java 2.6, functionality
+	 *             will be merged into {@link Dispatcher}.
+	 */
+	public static Connector getConnector() {
+		return connector;
+	}
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/ExtensionsHandler.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/ExtensionsHandler.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/ExtensionsHandler.java	(revision 4150)
@@ -0,0 +1,152 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.handlers;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import net.fckeditor.tool.Utils;
+
+/**
+ * This handler manages the allowed and denied extensions for each resource
+ * type. The extensions are preset by the properties managed by
+ * {@link PropertiesLoader}.
+ * <p>
+ * <em>Hint</em>: It's recommend to use either allowed or denied extensions for
+ * one file type. <strong>Never</strong> use both at the same time! That's why
+ * denied extensions of a file type will be deleted if you set the allowed one
+ * and vice versa.
+ * </p>
+ * 
+ * @version $Id$
+ * @deprecated Class will be removed in FCKeditor.Java 2.6, functionality merged
+ *             into {@link ResourceType}.
+ * @see ResourceType
+ */
+@Deprecated
+public class ExtensionsHandler {
+
+	private static Map<ResourceType, Set<String>> extensionsAllowed = new HashMap<ResourceType, Set<String>>();
+	private static Map<ResourceType, Set<String>> extensionsDenied = new HashMap<ResourceType, Set<String>>();
+
+	static {
+		// load defaults
+		extensionsAllowed.put(ResourceType.FILE, Utils.getSet(PropertiesLoader
+		    .getProperty("connector.resourceType.file.extensions.allowed")));
+		extensionsDenied.put(ResourceType.FILE, Utils.getSet(PropertiesLoader
+		    .getProperty("connector.resourceType.file.extensions.denied")));
+		extensionsAllowed.put(ResourceType.MEDIA, Utils.getSet(PropertiesLoader
+		    .getProperty("connector.resourceType.media.extensions.allowed")));
+		extensionsDenied.put(ResourceType.MEDIA, Utils.getSet(PropertiesLoader
+		    .getProperty("connector.resourceType.media.extensions.denied")));
+		extensionsAllowed.put(ResourceType.IMAGE, Utils.getSet(PropertiesLoader
+		    .getProperty("connector.resourceType.image.extensions.allowed")));
+		extensionsDenied.put(ResourceType.IMAGE, Utils.getSet(PropertiesLoader
+		    .getProperty("connector.resourceType.image.extensions.denied")));
+		extensionsAllowed.put(ResourceType.FLASH, Utils.getSet(PropertiesLoader
+		    .getProperty("connector.resourceType.flash.extensions.allowed")));
+		extensionsDenied.put(ResourceType.FLASH, Utils.getSet(PropertiesLoader
+		    .getProperty("connector.resourceType.flash.extensions.denied")));
+	}
+
+	/**
+	 * Getter for the allowed extensions of a file type.
+	 * 
+	 * @param type
+	 *          The file type.
+	 * @return Set of allowed extensions or an empty set.
+	 */
+	public static Set<String> getExtensionsAllowed(final ResourceType type) {
+		return extensionsAllowed.get(type);
+	}
+
+	/**
+	 * Setter for the allowed extensions of a file type. The denied extensions
+	 * will be cleared.<br />
+	 * If <code>extensionsList</code> is <code>null</code>, allowed
+	 * extensions are kept untouched.
+	 * 
+	 * @param type
+	 *            The file type.
+	 * @param extensionsList
+	 *            Required format: <code>ext1&#124;ext2&#124;ext3</code>
+	 */
+	public static void setExtensionsAllowed(final ResourceType type, final String extensionsList) {
+		if (extensionsList != null) {
+			extensionsAllowed.put(type, Utils.getSet(extensionsList));
+			extensionsDenied.get(type).clear();
+		}
+	}
+
+	/**
+	 * Getter for the denied extensions of a file type.
+	 * 
+	 * @param type
+	 *            The file type.
+	 * @return Set of denied extensions or an empty set.
+	 */
+	public static Set<String> getExtensionsDenied(final ResourceType type) {
+		return extensionsDenied.get(type);
+	}
+
+	/**
+	 * Setter for the denied extensions of a file type. The allowed extensions
+	 * will be cleared.<br />
+	 * If <code>extensionsList</code> is <code>null</code>, denied
+	 * extensions are kept untouched.
+	 * 
+	 * @param type
+	 *            The file type.
+	 * @param extensionsList
+	 *            Required format: <code>ext1&#124;ext2&#124;ext3</code>
+	 */
+	public static void setExtensionsDenied(final ResourceType type, final String extensionsList) {
+		if (extensionsList != null) {
+			extensionsDenied.put(type, Utils.getSet(extensionsList));
+			extensionsAllowed.get(type).clear();
+		}
+	}
+
+	/**
+	 * Checks if an extension is allowed for a file type.
+	 * 
+	 * @param type
+	 *            The resource type you want to check.
+	 * @param extension
+	 *            The extension you want to check.
+	 * @return <code>true</code> is extension is allowed else
+	 *         <code>false</code>. <em>Attention</em>: <code>false</code>
+	 *         is always returned if 'type' or 'extensions' is <code>null</code>.
+	 */
+	public static boolean isAllowed(final ResourceType type, final String extension) {
+		if (type == null || extension == null)
+			return false;
+		String ext = extension.toLowerCase();
+		Set<String> allowed = extensionsAllowed.get(type);
+		Set<String> denied = extensionsDenied.get(type);
+		if (allowed.isEmpty())
+			return !denied.contains(ext);
+		if (denied.isEmpty())
+			return allowed.contains(ext);
+		return false;
+	}
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/PropertiesLoader.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/PropertiesLoader.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/PropertiesLoader.java	(revision 4150)
@@ -0,0 +1,307 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.handlers;
+
+import java.io.BufferedInputStream;
+import java.io.InputStream;
+import java.util.Properties;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Manages FCKeditor.Java properties files.
+ * <p>
+ * It manages/loads the properties files in the following order:
+ * <ol>
+ * <li>the default properties as defined <a
+ * href="http://java.fckeditor.net/properties.html">here</a>,
+ * <li>the user-defined properties (<code>fckeditor.properties</code>) if
+ * present.
+ * </ol>
+ * This means that user-defined properties <em>override</em> default ones. In
+ * the backend it utilizes the regular {@link Properties} class.
+ * </p>
+ * <p>
+ * Moreover, you can set properties programmatically too but make sure to
+ * override them <em>before</em> the first call of that specific property.
+ * 
+ * @version $Id$
+ */
+public class PropertiesLoader {
+	private static final Logger logger = LoggerFactory
+			.getLogger(PropertiesLoader.class);
+	private static final String DEFAULT_FILENAME = "default.properties";
+	private static final String LOCAL_PROPERTIES = "/fckeditor.properties";
+	private static Properties properties = new Properties();
+
+	static {
+
+		// 1. load library defaults
+		InputStream in = PropertiesLoader.class
+				.getResourceAsStream(DEFAULT_FILENAME);
+
+		if (in == null) {
+			logger.error("{} not found", DEFAULT_FILENAME);
+			throw new RuntimeException(DEFAULT_FILENAME + " not found");
+		} else {
+			if (!(in instanceof BufferedInputStream))
+				in = new BufferedInputStream(in);
+
+			try {
+				properties.load(in);
+				in.close();
+				logger.debug("{} loaded", DEFAULT_FILENAME);
+			} catch (Exception e) {
+				logger.error("Error while processing {}", DEFAULT_FILENAME);
+				throw new RuntimeException("Error while processing "
+						+ DEFAULT_FILENAME, e);
+			}
+		}
+
+		// 2. load user defaults if present
+		InputStream in2 = PropertiesLoader.class
+				.getResourceAsStream(LOCAL_PROPERTIES);
+
+		if (in2 == null) {
+			logger.info("{} not found", LOCAL_PROPERTIES);
+		} else {
+
+			if (!(in2 instanceof BufferedInputStream))
+				in2 = new BufferedInputStream(in2);
+
+			try {
+				properties.load(in2);
+				in2.close();
+				logger.debug("{} loaded", LOCAL_PROPERTIES);
+			} catch (Exception e) {
+				logger.error("Error while processing {}", LOCAL_PROPERTIES);
+				throw new RuntimeException("Error while processing "
+						+ LOCAL_PROPERTIES, e);
+			}
+
+		}
+	}
+
+	/**
+	 * Searches for the property with the specified key in this property list.
+	 * 
+	 * @see Properties#getProperty(String)
+	 */
+	public static String getProperty(final String key) {
+		return properties.getProperty(key);
+	}
+
+	/**
+	 * Sets the property with the specified key in this property list.
+	 * 
+	 * @see Properties#setProperty(String, String)
+	 */
+	public static void setProperty(final String key, final String value) {
+		properties.setProperty(key, value);
+	}
+
+	/**
+	 * Returns <code>fckeditor.toolbarSet</code> property
+	 */
+	public static String getEditorToolbarSet() {
+		return properties.getProperty("fckeditor.toolbarSet");
+	}
+
+	/**
+	 * Returns <code>fckeditor.width</code> property
+	 */
+	public static String getEditorWidth() {
+		return properties.getProperty("fckeditor.width");
+	}
+
+	/**
+	 * Returns <code>fckeditor.height</code> property
+	 */
+	public static String getEditorHeight() {
+		return properties.getProperty("fckeditor.height");
+	}
+
+	/**
+	 * Returns <code>fckeditor.basePath</code> property
+	 */
+	public static String getEditorBasePath() {
+		return properties.getProperty("fckeditor.basePath");
+	}
+
+	/**
+	 * Returns <code>connector.resourceType.file.path</code> property
+	 */
+	public static String getFileResourceTypePath() {
+		return properties.getProperty("connector.resourceType.file.path");
+	}
+
+	/**
+	 * Returns <code>connector.resourceType.flash.path</code> property
+	 */
+	public static String getFlashResourceTypePath() {
+		return properties.getProperty("connector.resourceType.flash.path");
+	}
+
+	/**
+	 * Returns <code>connector.resourceType.image.path</code> property
+	 */
+	public static String getImageResourceTypePath() {
+		return properties.getProperty("connector.resourceType.image.path");
+	}
+
+	/**
+	 * Returns <code>connector.resourceType.media.path</code> property
+	 */
+	public static String getMediaResourceTypePath() {
+		return properties.getProperty("connector.resourceType.media.path");
+	}
+
+	/**
+	 * Returns <code>connector.resourceType.file.extensions.allowed</code>
+	 * property
+	 */
+	public static String getFileResourceTypeAllowedExtensions() {
+		return properties
+				.getProperty("connector.resourceType.file.extensions.allowed");
+	}
+
+	/**
+	 * Returns <code>connector.resourceType.file.extensions.denied</code>
+	 * property
+	 */
+	public static String getFileResourceTypeDeniedExtensions() {
+		return properties
+				.getProperty("connector.resourceType.file.extensions.denied");
+	}
+
+	/**
+	 * Returns <code>connector.resourceType.flash.extensions.allowed</code>
+	 * property
+	 */
+	public static String getFlashResourceTypeAllowedExtensions() {
+		return properties
+				.getProperty("connector.resourceType.flash.extensions.allowed");
+	}
+
+	/**
+	 * Returns <code>connector.resourceType.flash.extensions.denied</code>
+	 * property
+	 */
+	public static String getFlashResourceTypeDeniedExtensions() {
+		return properties
+				.getProperty("connector.resourceType.flash.extensions.denied");
+	}
+
+	/**
+	 * Returns <code>connector.resourceType.image.extensions.allowed</code>
+	 * property
+	 */
+	public static String getImageResourceTypeAllowedExtensions() {
+		return properties
+				.getProperty("connector.resourceType.image.extensions.allowed");
+	}
+
+	/**
+	 * Returns <code>connector.resourceType.image.extensions.denied</code>
+	 * property
+	 */
+	public static String getImageResourceTypeDeniedExtensions() {
+		return properties
+				.getProperty("connector.resourceType.image.extensions.denied");
+	}
+
+	/**
+	 * Returns <code>connector.resourceType.media.extensions.allowed</code>
+	 * property
+	 */
+	public static String getMediaResourceTypeAllowedExtensions() {
+		return properties
+				.getProperty("connector.resourceType.media.extensions.allowed");
+	}
+
+	/**
+	 * Returns <code>connector.resourceType.media.extensions.denied</code>
+	 * property
+	 */
+	public static String getMediaResourceTypeDeniedExtensions() {
+		return properties
+				.getProperty("connector.resourceType.media.extensions.denied");
+	}
+
+	/**
+	 * Returns <code>connector.userFilesPath</code> property
+	 */
+	public static String getUserFilesPath() {
+		return properties.getProperty("connector.userFilesPath");
+	}
+
+	/**
+	 * Returns <code>connector.userFilesAbsolutePath</code> property
+	 */
+	public static String getUserFilesAbsolutePath() {
+		return properties.getProperty("connector.userFilesAbsolutePath");
+	}
+
+	/**
+	 * Returns <code>connector.forceSingleExtension</code> property
+	 */
+	public static boolean isForceSingleExtension() {
+		return Boolean.valueOf(properties
+				.getProperty("connector.forceSingleExtension"));
+	}
+
+	/**
+	 * Returns <code>connector.secureImageUploads</code> property
+	 */
+	public static boolean isSecureImageUploads() {
+		return Boolean.valueOf(properties
+				.getProperty("connector.secureImageUploads"));
+	}
+
+	/**
+	 * Returns <code>connector.impl</code> property
+	 */
+	public static String getConnectorImpl() {
+		return properties.getProperty("connector.impl");
+	}
+
+	/**
+	 * Returns <code>connector.userActionImpl</code> property
+	 */
+	public static String getUserActionImpl() {
+		return properties.getProperty("connector.userActionImpl");
+	}
+
+	/**
+	 * Returns <code>connector.userPathBuilderImpl</code> property
+	 */
+	public static String getUserPathBuilderImpl() {
+		return properties.getProperty("connector.userPathBuilderImpl");
+	}
+
+	/**
+	 * Returns <code>connector.localeResolverImpl</code> property
+	 */
+	public static String getLocaleResolverImpl() {
+		return properties.getProperty("localization.localeResolverImpl");
+	}
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/RequestCycleHandler.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/RequestCycleHandler.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/RequestCycleHandler.java	(revision 4150)
@@ -0,0 +1,180 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.handlers;
+
+import javax.servlet.http.HttpServletRequest;
+
+import net.fckeditor.connector.Connector;
+import net.fckeditor.requestcycle.UserAction;
+import net.fckeditor.requestcycle.UserPathBuilder;
+import net.fckeditor.tool.Utils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Handles the {@link UserAction} and {@link UserPathBuilder} interfaces. <br />
+ * This class instantiates the the chosen implementations and acts as a proxy
+ * for their methods/access.
+ * 
+ * @version $Id$
+ */
+public class RequestCycleHandler {
+	private static final Logger logger = LoggerFactory
+			.getLogger(RequestCycleHandler.class);
+	private static UserAction userAction = null;
+	private static UserPathBuilder userPathBuilder = null;
+
+	static {
+		// If there are more objects to instantiate in future, we could solve
+		// the following by reflection!
+
+		// 1. try to instantiate the UserAction object
+		String className = PropertiesLoader.getUserActionImpl();
+		if (Utils.isEmpty(className))
+			logger.error("Empty UserAction implementation class name provided");
+		else {
+			try {
+				Class<?> clazz = Class.forName(className);
+				userAction = (UserAction) clazz.newInstance();
+				logger.info("UserAction initialized to {}", className);
+			} catch (Throwable e) {
+				logger.error("UserAction implementation {} could not be instantiated", className);
+				throw new RuntimeException("UserAction implementation " + className + " could not be instantiated", e); //$NON-NLS-1$
+			}
+		}
+
+		// 2. try to instantiate the UserPathBuilder object
+		className = PropertiesLoader.getUserPathBuilderImpl();
+		if (Utils.isEmpty(className))
+			logger.error("Empty UserPathBuilder implementation class name provided");
+		else {
+			try {
+				Class<?> clazz = Class.forName(className);
+				userPathBuilder = (UserPathBuilder) clazz.newInstance();
+				logger.info("UserPathBuilder initialized to {}", className);
+			} catch (Throwable e) {
+				logger.error("UserPathBuilder implementation {} could not be instantiated", className);
+				throw new RuntimeException("UserPathBuilder implementation " + className + " could not be instantiated", e); //$NON-NLS-1$
+			}
+		}
+	}
+
+	/**
+	 * Just a wrapper to
+	 * {@link UserAction#isEnabledForFileBrowsing(HttpServletRequest)}.
+	 * 
+	 * @return {@link UserAction#isEnabledForFileBrowsing(HttpServletRequest)}
+	 *         or false if {@link UserAction} isn't set.
+	 * @see #isGetResourcesEnabled(HttpServletRequest)
+	 * @deprecated Method will be removed in FCKeditor.Java 2.6, user
+	 *             {@link #isGetResourcesEnabled(HttpServletRequest)}.
+	 */
+	@Deprecated
+	public static boolean isEnabledForFileBrowsing(
+			final HttpServletRequest request) {
+		return (userAction != null && userAction
+				.isEnabledForFileBrowsing(request));
+	}
+	
+	/**
+	 * Returns <code>true</code> if user is allowed to list resources. The
+	 * behavior is specified by the current UserAction instance.
+	 * 
+	 * @param request
+	 *            current user request instance
+	 * @return true if user is allowed to list resources, false otherwise
+	 * @see UserAction#isEnabledForFileBrowsing(HttpServletRequest)
+	 */
+	public static boolean isGetResourcesEnabled(final HttpServletRequest request) {
+		return userAction.isEnabledForFileBrowsing(request);
+	}
+
+	/**
+	 * Just a wrapper to
+	 * {@link UserAction#isEnabledForFileUpload(HttpServletRequest)}.
+	 * 
+	 * @return {@link UserAction#isEnabledForFileUpload(HttpServletRequest)} or
+	 *         false if {@link UserAction} isn't set.
+	 * @see #isFileUploadEnabled(HttpServletRequest)
+	 * @deprecated Method will be removed in FCKeditor.Java 2.6,
+	 *             {@link #isFileUploadEnabled(HttpServletRequest)}.
+	 */
+	public static boolean isEnabledForFileUpload(
+			final HttpServletRequest request) {
+		return (userAction != null && userAction
+				.isEnabledForFileUpload(request));
+	}
+	
+	/**
+	 * Returns <code>true</code> if user is allowed to upload files. The
+	 * behavior is specified by the current UserAction instance.
+	 * 
+	 * @param request
+	 *            current user request instance
+	 * @return true if user is allowed to upload files, false otherwise
+	 * @see UserAction#isEnabledForFileUpload(HttpServletRequest)
+	 */
+	public static boolean isFileUploadEnabled(HttpServletRequest request) {
+		return userAction.isEnabledForFileUpload(request);
+	}
+
+	/**
+	 * Returns <code>true</code> if user is allowed to create folders. The
+	 * behavior is specified by the current UserAction instance.
+	 * 
+	 * @param request
+	 *            current user request instance
+	 * @return true if user is allowed to create folders, false otherwise
+	 * @see UserAction#isEnabledForFileBrowsing(HttpServletRequest)
+	 */
+	public static boolean isCreateFolderEnabled(final HttpServletRequest request) {
+		return userAction.isCreateFolderEnabled(request);
+	}
+
+	/**
+	 * Returns the current userfiles path. The path is specified by the current
+	 * UserPathBuilder instance.
+	 * 
+	 * @param request
+	 *            current user request instance
+	 * @return current userfiles path
+	 * @see UserPathBuilder#getUserFilesPath(HttpServletRequest)
+	 */
+	public static String getUserFilesPath(final HttpServletRequest request) {
+		return userPathBuilder.getUserFilesPath(request);
+	}
+
+	/**
+	 * Returns the current absolute userfiles path. The path is specified by the
+	 * current UserPathBuilder instance. <br />
+	 * Note that the path is absolute to the underlying system of the current
+	 * {@link Connector} instance.
+	 * 
+	 * @param request
+	 *            current user request instance
+	 * @return current absolute userfiles path
+	 * @see UserPathBuilder#getUserFilesAbsolutePath(HttpServletRequest)
+	 */
+	public static String getUserFilesAbsolutePath(final HttpServletRequest request) {
+		return userPathBuilder.getUserFilesAbsolutePath(request);
+	}
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/ResourceType.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/ResourceType.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/ResourceType.java	(revision 4150)
@@ -0,0 +1,319 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.handlers;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import net.fckeditor.tool.Utils;
+
+/**
+ * File Browser resource types. The File Browser provides a specific resource
+ * type for each and every request. This class is intended to reflect these in
+ * an Enum-like manner.
+ * <p>
+ * The resource types are:
+ * <ul>
+ * <li>File</li>
+ * <li>Flash</li>
+ * <li>Image</li>
+ * <li>Media</li>
+ * </ul>
+ * 
+ * @version $Id$
+ */
+public class ResourceType {
+
+	/** The name of the resource type */
+	private String name;
+	/** The absolute path of the resource type */
+	private String path;
+	/** The allowed extensions */
+	private Set<String> allowedEextensions;
+	/** The denied extensions */
+	private Set<String> deniedExtensions;
+
+	/** Map holding a String to ResourceType reference */
+	private static Map<String, ResourceType> types = new HashMap<String, ResourceType>(
+			4);
+
+	/** Resource type <code>File</code> */
+	public static final ResourceType FILE = new ResourceType("File",
+			PropertiesLoader.getFileResourceTypePath(), Utils
+					.getSet(PropertiesLoader
+							.getFileResourceTypeAllowedExtensions()), Utils
+					.getSet(PropertiesLoader
+							.getFileResourceTypeDeniedExtensions()));
+	/** Resource type <code>Flash</code> */
+	public static final ResourceType FLASH = new ResourceType("Flash",
+			PropertiesLoader.getFlashResourceTypePath(), Utils
+					.getSet(PropertiesLoader
+							.getFlashResourceTypeAllowedExtensions()), Utils
+					.getSet(PropertiesLoader
+							.getFlashResourceTypeDeniedExtensions()));
+	/** Resource type <code>Image</code> */
+	public static final ResourceType IMAGE = new ResourceType("Image",
+			PropertiesLoader.getImageResourceTypePath(), Utils
+					.getSet(PropertiesLoader
+							.getImageResourceTypeAllowedExtensions()), Utils
+					.getSet(PropertiesLoader
+							.getImageResourceTypeDeniedExtensions()));
+	/** Resource type <code>Media</code> */
+	public static final ResourceType MEDIA = new ResourceType("Media",
+			PropertiesLoader.getMediaResourceTypePath(), Utils
+					.getSet(PropertiesLoader
+							.getMediaResourceTypeAllowedExtensions()), Utils
+					.getSet(PropertiesLoader
+							.getMediaResourceTypeDeniedExtensions()));
+
+	static {
+		types.put(FILE.getName(), FILE);
+		types.put(FLASH.getName(), FLASH);
+		types.put(IMAGE.getName(), IMAGE);
+		types.put(MEDIA.getName(), MEDIA);
+	}
+
+	/**
+	 * This constructor has been made intentionally made private to provide
+	 * pre-defined types only.
+	 * 
+	 * @param name
+	 *            the name of the new resource type
+	 * @param path
+	 *            the absolute path of the new resource type
+	 * @param allowedEextensions
+	 *            the allowed extensions set of the new resource type
+	 * @param deniedExtensions
+	 *            the denied extensions set of the new resource type
+	 * @throws IllegalArgumentException
+	 *             if both sets are empty
+	 * @throws IllegalArgumentException
+	 *             if both sets contain extensions
+	 */
+	private ResourceType(final String name, final String path,
+			final Set<String> allowedEextensions,
+			final Set<String> deniedExtensions) {
+		this.name = name;
+		this.path = path;
+
+		if (allowedEextensions.isEmpty() && deniedExtensions.isEmpty())
+			throw new IllegalArgumentException(
+					"Both sets are empty, one has always to be filled");
+
+		if (!allowedEextensions.isEmpty() && !deniedExtensions.isEmpty())
+			throw new IllegalArgumentException(
+					"Both sets contain extensions, only one can be filled at the same time");
+
+		this.allowedEextensions = allowedEextensions;
+		this.deniedExtensions = deniedExtensions;
+	}
+
+	/**
+	 * Returns the name of this resource type.
+	 * 
+	 * @return the name of this resource type
+	 */
+	public String getName() {
+		return name;
+	}
+
+	/**
+	 * Returns the absolute path of this resource type. This path is absolute to
+	 * the userfiles path. To set this path, see the <a
+	 * href="http://java.fckeditor.net/properties.html">configuration</a>.
+	 * 
+	 * @return the absolute path of this resource type
+	 */
+	public String getPath() {
+		return path;
+	}
+
+	/**
+	 * Returns a read-only reference to the allowed extensions set.
+	 * 
+	 * @return the read-only allowed extensions set of this resource type
+	 */
+	public Set<String> getAllowedEextensions() {
+		return Collections.unmodifiableSet(allowedEextensions);
+	}
+
+	/**
+	 * Returns a read-only reference to the denied extensions set.
+	 * 
+	 * @return the read-only denied extensions set of this resource type
+	 */
+	public Set<String> getDeniedExtensions() {
+		return Collections.unmodifiableSet(deniedExtensions);
+	}
+
+	/**
+	 * Returns the resource type constant with the specified name.
+	 * 
+	 * @param name
+	 *            the name of the constant to return
+	 * @return the resource type constant with the specified name
+	 * @throws IllegalArgumentException
+	 *             if this class has no constant with the specified name
+	 * @throws NullPointerException
+	 *             if <code>name</code> is null or empty
+	 */
+	public static ResourceType valueOf(final String name) {
+		if (Utils.isEmpty(name))
+			throw new NullPointerException("Name is null or empty");
+
+		ResourceType rt = types.get(name);
+		if (rt == null)
+			throw new IllegalArgumentException("No resource type const " + name);
+		return rt;
+	}
+
+	/**
+	 * Returns <code>true</code> if name represents a valid resource type
+	 * constant.
+	 * 
+	 * @param name
+	 *            the resource type to check
+	 * @return <code>true</code> if name represents a valid resource type, else
+	 *         <code>false</code>
+	 */
+	public static boolean isValidType(final String name) {
+		// HashMap permits null keys, so it will return false in that case
+		return types.containsKey(name);
+	}
+
+	/**
+	 * Returns the resource type constant with the specified name. In contrast
+	 * to {@link #valueOf(String)} it returns a null instead of throwing an
+	 * exception if a resource type constant was not found.
+	 * 
+	 * @param name
+	 *            the name of the constant to return
+	 * @return the resource type constant with the specified name, else
+	 *         <code>null</code>
+	 */
+	public static ResourceType getResourceType(final String name) {
+		try {
+			return ResourceType.valueOf(name);
+		} catch (Exception e) {
+			return null;
+		}
+	}
+
+	/**
+	 * Returns the resource type constant with the specified name. In contrast
+	 * to {@link #getResourceType(String)} it returns {@link #FILE} instead of
+	 * returning <code>null</code>.
+	 * 
+	 * @param name
+	 *            the name of the constant to return
+	 * @return the resource type constant with the specified name, else
+	 *         <code>FILE</code>
+	 */
+	public static ResourceType getDefaultResourceType(final String name) {
+		ResourceType rt = getResourceType(name);
+		return rt == null ? FILE : rt;
+	}
+
+	/**
+	 * Returns <code>true</code> if extension is allowed. Denied extensions set
+	 * takes precedence over allowed extensions set, in other words a negative
+	 * check is made against denied set and if this fails, allowed set is
+	 * checked.
+	 * 
+	 * @param extension
+	 *            the extension to check, empty will fail
+	 * @return <code>true</code> if extension is allowed, else
+	 *         <code>false</code>
+	 */
+	public boolean isAllowedExtension(final String extension) {
+		if (Utils.isEmpty(extension))
+			return false;
+		String ext = extension.toLowerCase();
+		if (allowedEextensions.isEmpty())
+			return !deniedExtensions.contains(ext);
+		if (deniedExtensions.isEmpty())
+			return allowedEextensions.contains(ext);
+		return false;
+	}
+
+	/**
+	 * This method wraps {@link #isAllowedExtension(String)}. It simply negates
+	 * the return value.
+	 * 
+	 * @deprecated Method will be removed in FCKeditor.Java 2.6, use
+	 *             {@link #isDeniedExtension(String)}.
+	 * @see #isDeniedExtension(String)
+	 * @param extension
+	 *            Extension string.
+	 * @return <code>true</code> if extension is not fails, else
+	 *         <code>false</code>.
+	 */
+	@Deprecated
+	public boolean isNotAllowedExtension(final String extension) {
+		return !isAllowedExtension(extension);
+	}
+
+	/**
+	 * Returns <code>true</code> if extension is denied. This method simply
+	 * negates {@link #isAllowedExtension(String)}.
+	 * 
+	 * @param extension
+	 *            the extension to check, empty will fail
+	 * @return <code>true</code> if extension is denied, else <code>false</code>
+	 */
+	public boolean isDeniedExtension(final String extension) {
+		return !isAllowedExtension(extension);
+	}
+
+	/**
+	 * Compares the specified object with this resource type for equality. The
+	 * comparison is based on class and name only.
+	 * 
+	 * @param obj
+	 *            Object to be compared with this resource type.
+	 * @return <code>true</code> if the specified object is equal to this
+	 *         resource type
+	 */
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+
+		if (obj == null || this.getClass() != obj.getClass())
+			return false;
+
+		final ResourceType rt = (ResourceType) obj;
+		return name.equals(rt.getName());
+	}
+
+	/**
+	 * Returns the hash code value for this resource type. The hash code equals
+	 * the hash code of the name field.
+	 * 
+	 * @return the hash code value for this resource type
+	 */
+	@Override
+	public int hashCode() {
+		return name.hashCode();
+	}
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/package-info.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/package-info.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/handlers/package-info.java	(revision 4150)
@@ -0,0 +1,27 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+
+/**
+ * Different handlers for various purposes used in the entire system.
+ * 
+ * @version $Id$
+ */
+package net.fckeditor.handlers;
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/localization/LocaleResolver.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/localization/LocaleResolver.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/localization/LocaleResolver.java	(revision 4150)
@@ -0,0 +1,48 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.localization;
+
+import java.util.Locale;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * An interface for user locale resolution.
+ * <p>
+ * <strong>Note:</strong> You are free to implement this interface the way you
+ * need it, in other words your return values can be global, regardless of the
+ * request, or on a per-request basis.
+ * </p> 
+ * @version $Id$
+ */
+public interface LocaleResolver {
+
+	/**
+	 * Returns the locale of a given request.
+	 * 
+	 * @param request
+	 *            the current request instance
+	 * @return the locale of the request, <code>null</code> if the locale
+	 *         couldn't be resolved
+	 */
+	public Locale resolveLocale(final HttpServletRequest request);
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/localization/LocalizedMessages.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/localization/LocalizedMessages.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/localization/LocalizedMessages.java	(revision 4150)
@@ -0,0 +1,316 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.localization;
+
+import java.io.BufferedInputStream;
+import java.io.InputStream;
+import java.text.MessageFormat;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Properties;
+import java.util.ResourceBundle;
+
+import javax.servlet.http.HttpServletRequest;
+
+import net.fckeditor.handlers.PropertiesLoader;
+import net.fckeditor.tool.Utils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Provides access to localized messages (properties).
+ * <p>
+ * Localized messages are loaded for a particular locale from a HTTP request.
+ * The locale is resolved by the current {@link LocaleResolver}
+ * instance/singleton. If a locale or a bundle for a locale cannot be found,
+ * default messages are used.
+ * </p>
+ * <p>
+ * Note: Loaded messages are cached per locale, any subsequent call of the same
+ * locale will be served by the cache instead of another resource bundle
+ * retrieval.
+ * </p>
+ * 
+ * @version $Id$
+ */
+public class LocalizedMessages {
+
+	private static final Map<Locale, LocalizedMessages> prototypes = Collections
+			.synchronizedMap(new HashMap<Locale, LocalizedMessages>());
+	private static final String DEFAULT_FILENAME = "default_messages.properties"; //$NON-NLS-1$
+	private static final String LOCAL_PROPERTIES = "fckeditor_messages"; //$NON-NLS-1$
+	private static final Properties defaultProperties = new Properties();
+	
+	private Properties properties;
+	private static LocaleResolver localeResolver;
+	private static final Locale NEUTRAL = new Locale(Utils.EMPTY_STRING); //$NON-NLS-1$
+	private static final Logger logger = LoggerFactory
+			.getLogger(LocalizedMessages.class);
+
+	static {
+
+		InputStream in = LocalizedMessages.class
+				.getResourceAsStream(DEFAULT_FILENAME);
+
+		if (in == null) {
+			logger.error("{} not found", DEFAULT_FILENAME); //$NON-NLS-1$
+			throw new RuntimeException(DEFAULT_FILENAME + " not found"); //$NON-NLS-1$
+		} else {
+			if (!(in instanceof BufferedInputStream))
+				in = new BufferedInputStream(in);
+
+			try {
+				defaultProperties.load(in);
+				in.close();
+				logger.debug("{} loaded", DEFAULT_FILENAME); //$NON-NLS-1$
+			} catch (Exception e) {
+				logger.error("Error while loading {}", DEFAULT_FILENAME); //$NON-NLS-1$
+				throw new RuntimeException(
+						"Error while loading " + DEFAULT_FILENAME, e); //$NON-NLS-1$
+			}
+		}
+	}
+
+	/**
+	 * Returns an instance of <code>LocalizedMessages</code> for a given
+	 * request. This method automatically determines the locale of this request
+	 * and loads the appropriate bundle. If locale is null or not available,
+	 * the default locale will be used.
+	 * 
+	 * @param request
+	 *            the current request instance
+	 * @return instance with localized messages
+	 */
+	public static LocalizedMessages getInstance(HttpServletRequest request) {
+
+		if (request == null)
+			throw new NullPointerException("the request cannot be null");
+		
+		Locale locale = getLocaleResolverInstance().resolveLocale(request);
+		
+		if (locale == null)
+			locale = NEUTRAL;
+		
+		synchronized (LocalizedMessages.class) {
+			if (!prototypes.containsKey(locale))
+				prototypes.put(locale, new LocalizedMessages(locale));
+		}
+		
+		// for now we don't need any cloning since the values are accessed
+		// read-only
+		return prototypes.get(locale);
+
+	}
+
+	/**
+	 * Returns the locale resolver instance. The implementation class name is
+	 * provided by {@link PropertiesLoader#getLocaleResolverImpl()}.
+	 * 
+	 * @return the locale resolver instance
+	 */
+	private synchronized static LocaleResolver getLocaleResolverInstance() {
+
+		if (localeResolver == null) {
+			String className = PropertiesLoader.getLocaleResolverImpl();
+
+			if (Utils.isEmpty(className))
+				logger.error("Empty LocaleResolver implementation class name provided"); //$NON-NLS-1$
+			else
+				try {
+					Class<?> clazz = Class.forName(className);
+					localeResolver = (LocaleResolver) clazz.newInstance();
+					logger.info("LocaleResolver initialized to {}", className); //$NON-NLS-1$
+				} catch (Throwable e) {
+					logger.error("LocaleResolver implementation {} could not be instantiated", className); //$NON-NLS-1$
+					throw new RuntimeException("LocaleResolver implementation " + className + " could not be instantiated", e); //$NON-NLS-1$
+				}
+		}
+
+		return localeResolver;
+	}
+
+	/**
+	 * Loads the localized messages for the given locale. This constructor loads
+	 * the resource bundle for this locale and only for this, in other words it
+	 * short-circuits the default resource bundle load mechanism in order to
+	 * prevent the loading of the system default locale which may result in a
+	 * completely different resource bundle.
+	 * 
+	 * @param locale
+	 *            the locale of the new localized messages
+	 */
+	private LocalizedMessages(Locale locale) {
+
+		properties = new Properties(defaultProperties);
+
+		ResourceBundle localized = null;
+		try {
+			localized = ResourceBundle.getBundle(LOCAL_PROPERTIES, locale,
+					Thread.currentThread().getContextClassLoader());
+		} catch (Exception e) {
+			; // do nothing
+		}
+
+		if (localized != null
+				&& localized.getLocale().getLanguage().equals(
+						locale.getLanguage())) {
+			Enumeration<String> keys = localized.getKeys();
+
+			while (keys.hasMoreElements()) {
+				String key = keys.nextElement();
+				properties.setProperty(key, localized.getString(key));
+			}
+
+			logger.debug("Resource bundle for locale '{}' loaded", locale); //$NON-NLS-1$
+		} else {
+			logger.debug("No resource bundle for locale '{}' found, loading default bundle", locale); //$NON-NLS-1$
+
+			ResourceBundle base = null;
+			try {
+				base = ResourceBundle.getBundle(LOCAL_PROPERTIES, NEUTRAL,
+						Thread.currentThread().getContextClassLoader());
+			} catch (Exception e) {
+				; // do nothing
+			}
+
+			if (base != null && base.getLocale().equals(NEUTRAL)) {
+				Enumeration<String> keys = base.getKeys();
+
+				while (keys.hasMoreElements()) {
+					String key = keys.nextElement();
+					properties.setProperty(key, base.getString(key));
+				}
+			}
+
+		}
+
+	}
+
+	/**
+	 * Searches for the message with the specified key in this message list.
+	 * 
+	 * @see Properties#getProperty(String)
+	 */
+	private String getMessage(String key) {
+		return properties.getProperty(key);
+	}
+
+	/** Returns localized <code>editor.compatibleBrowser.yes</code> property. */
+	public String getCompatibleBrowserYes() {
+		return getMessage("editor.compatibleBrowser.yes"); //$NON-NLS-1$
+	}
+
+	/** Returns localized <code>editor.compatibleBrowser.no</code> property. */
+	public String getCompatibleBrowserNo() {
+		return getMessage("editor.compatibleBrowser.no"); //$NON-NLS-1$
+	}
+
+	/** Returns localized <code>connector.fileUpload.enabled</code> property. */
+	public String getFileUploadEnabled() {
+		return getMessage("connector.fileUpload.enabled"); //$NON-NLS-1$
+	}
+
+	/** Returns localized <code>connector.fileUpload.disabled</code> property. */
+	public String getFileUploadDisabled() {
+		return getMessage("connector.fileUpload.disabled"); //$NON-NLS-1$
+	}
+
+	/**
+	 * Returns localized <code>connector.file_renamed_warning</code> property.
+	 * 
+	 * @param newFileName
+	 *            the new filename of the warning
+	 * @return localized message with new filename
+	 */
+	public String getFileRenamedWarning(String newFileName) {
+		return MessageFormat.format(getMessage("connector.fileUpload.file_renamed_warning"), newFileName); //$NON-NLS-1$
+	}
+
+	/** Returns localized <code>connector.fileUpload.invalid_file_type_specified</code> property. */
+	public String getInvalidFileTypeSpecified() {
+		return getMessage("connector.fileUpload.invalid_file_type_specified"); //$NON-NLS-1$
+	}
+
+	/** Returns localized <code>connector.fileUpload.write_error</code> property. */
+	public String getFileUploadWriteError() {
+		return getMessage("connector.fileUpload.write_error"); //$NON-NLS-1$
+	}
+
+	/** Returns localized <code>connector.getResources.enabled</code> property. */
+	public String getGetResourcesEnabled() {
+		return getMessage("connector.getResources.enabled"); //$NON-NLS-1$
+	}
+
+	/** Returns localized <code>connector.getResources.disabled</code> property. */
+	public String getGetResourcesDisabled() {
+		return getMessage("connector.getResources.disabled"); //$NON-NLS-1$
+	}
+
+	/** Returns localized <code>connector.getResources.read_error</code> property. */
+	public String getGetResourcesReadError() {
+		return getMessage("connector.getResources.read_error"); //$NON-NLS-1$
+	}
+
+	/** Returns localized <code>connector.createFolder.enabled</code> property. */
+	public String getCreateFolderEnabled() {
+		return getMessage("connector.createFolder.enabled"); //$NON-NLS-1$
+	}
+
+	/** Returns localized <code>connector.createFolder.disabled</code> property. */
+	public String getCreateFolderDisabled() {
+		return getMessage("connector.createFolder.disabled"); //$NON-NLS-1$
+	}
+
+	/** Returns localized <code>connector.invalid_command_specified</code> property. */
+	public String getInvalidCommandSpecified() {
+		return getMessage("connector.invalid_command_specified"); //$NON-NLS-1$
+	}
+
+	/** Returns localized <code>connector.createFolder.folder_already_exists_error</code> property. */
+	public String getFolderAlreadyExistsError() {
+		return getMessage("connector.createFolder.folder_already_exists_error"); //$NON-NLS-1$
+	}
+
+	/** Returns localized <code>connector.createFolder.invalid_new_folder_name_specified</code> property. */
+	public String getInvalidNewFolderNameSpecified() {
+		return getMessage("connector.createFolder.invalid_new_folder_name_specified"); //$NON-NLS-1$
+	}
+
+	/** Returns localized <code>connector.createFolder.write_error</code> property. */
+	public String getCreateFolderWriteError() {
+		return getMessage("connector.createFolder.write_error"); //$NON-NLS-1$
+	}
+
+	/** Returns localized <code>connector.invalid_resource_type_specified</code> property. */
+	public String getInvalidResouceTypeSpecified() {
+		return getMessage("connector.invalid_resource_type_specified"); //$NON-NLS-1$
+	}
+
+	/** Returns localized <code>connector.invalid_current_folder_specified</code> property. */
+	public String getInvalidCurrentFolderSpecified() {
+		return getMessage("connector.invalid_current_folder_specified"); //$NON-NLS-1$
+	}
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/localization/impl/AcceptLanguageHeaderResolver.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/localization/impl/AcceptLanguageHeaderResolver.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/localization/impl/AcceptLanguageHeaderResolver.java	(revision 4150)
@@ -0,0 +1,48 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.localization.impl;
+
+import java.util.Locale;
+
+import javax.servlet.ServletRequest;
+import javax.servlet.http.HttpServletRequest;
+
+import net.fckeditor.localization.LocaleResolver;
+import net.fckeditor.tool.Utils;
+
+/**
+ * HTTP header implementation of the locale resolver. It resolves the current
+ * user locale by calling {@link ServletRequest#getLocale()} if and only if the
+ * <code>Accept-Language</code> header is not empty.
+ * 
+ * @version $Id$
+ */
+public class AcceptLanguageHeaderResolver implements LocaleResolver {
+
+	public Locale resolveLocale(final HttpServletRequest request) {
+
+		if (Utils.isNotEmpty(request.getHeader("Accept-Language")))
+			return request.getLocale();
+		else
+			return null;
+	}
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/localization/impl/JstlResolver.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/localization/impl/JstlResolver.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/localization/impl/JstlResolver.java	(revision 4150)
@@ -0,0 +1,47 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.localization.impl;
+
+import java.util.Locale;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.jstl.core.Config;
+
+import net.fckeditor.localization.LocaleResolver;
+
+/**
+ * JSTL implementation of the locale resolver. It resolves the locale against
+ * the user session.
+ * 
+ * @version $Id$
+ */
+public class JstlResolver implements LocaleResolver {
+
+	public JstlResolver() {
+		Config.class.hashCode();
+	}
+
+	public Locale resolveLocale(final HttpServletRequest request) {
+
+		return (Locale) Config.get(request.getSession(), Config.FMT_LOCALE);
+	}
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/localization/impl/package-info.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/localization/impl/package-info.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/localization/impl/package-info.java	(revision 4150)
@@ -0,0 +1,27 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+
+/**
+ * Default implementations for the locale resolver interface.
+ * 
+ * @version $Id$
+ */
+package net.fckeditor.localization.impl;
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/localization/package-info.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/localization/package-info.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/localization/package-info.java	(revision 4150)
@@ -0,0 +1,27 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+
+/**
+ * Interfaces and classes for the locale resolution and localized messages.
+ * 
+ * @version $Id$
+ */
+package net.fckeditor.localization;
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/package-info.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/package-info.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/package-info.java	(revision 4150)
@@ -0,0 +1,27 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+
+/**
+ * Core objects to manage the FCKeditor text input form.
+ * 
+ * @version $Id$
+ */
+package net.fckeditor;
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/Context.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/Context.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/Context.java	(revision 4150)
@@ -0,0 +1,142 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.requestcycle;
+
+import javax.servlet.http.HttpServletRequest;
+
+import net.fckeditor.connector.Dispatcher;
+import net.fckeditor.handlers.Command;
+import net.fckeditor.handlers.ResourceType;
+import net.fckeditor.tool.Utils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Maintains base/common request parameters from the File Browser. The gain of
+ * this class is to provide abstracted and pre-processed access to common
+ * request parameters.
+ * <p>
+ * In the regular case, you will use an already created instance of this class.
+ * </p>
+ * 
+ * @version $Id$
+ */
+public class Context {
+	// This is just a helper class which has no relevance for the logger
+	private static final Logger logger = LoggerFactory.getLogger(Dispatcher.class);
+	
+	private String typeStr;
+	private String commandStr;
+	private String currentFolderStr;
+	
+	/**
+	 * Sole class constructor. Takes in a request instance, processes parameters
+	 * and populates private fields which can be accessed through getters.<br />
+	 * This class will only be instantiated in {@link ThreadLocalData}.
+	 * 
+	 * @param request
+	 *            current user request instance
+	 */
+	protected Context(final HttpServletRequest request) {
+		commandStr = request.getParameter("Command");
+		typeStr = request.getParameter("Type");
+		currentFolderStr = request.getParameter("CurrentFolder");
+		
+		// if this is a QuickUpload request, 'commandStr', 'currentFolderStr'
+		// are empty and 'typeStr' maybe empty too
+		if (Utils.isEmpty(commandStr) && Utils.isEmpty(currentFolderStr)) {
+			commandStr = "QuickUpload";
+			currentFolderStr = "/";
+			if (Utils.isEmpty(typeStr))
+				typeStr = "File";
+		}
+		
+		// checks to meet specs in http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Server_Side_Integration#File_Browser_Requests
+		if (currentFolderStr != null && !currentFolderStr.startsWith("/"))
+			currentFolderStr = "/".concat(currentFolderStr);
+	}
+	
+	/**
+	 * Returns the type parameter of this context.
+	 * 
+	 * @return the type parameter of this context
+	 */
+	public String getTypeStr() {
+		return typeStr;
+	}
+	
+	/**
+	 * Returns a default resource type instance for the type parameter.
+	 * 
+	 * @see ResourceType#getDefaultResourceType(String)
+	 * @return default resource type instance
+	 */
+	public ResourceType getDefaultResourceType() {
+		return ResourceType.getDefaultResourceType(typeStr);
+	}
+
+	/**
+	 * Returns a resource type instance for the type parameter.
+	 * 
+	 * @see ResourceType#getResourceType(String)
+	 * @return resource type instance
+	 */
+	public ResourceType getResourceType() {
+		return ResourceType.getResourceType(typeStr);
+	}
+
+	/**
+	 * Returns the command parameter of this context.
+	 * 
+	 * @return the command parameter of this context
+	 */
+	public String getCommandStr() {
+		return commandStr;
+	}
+
+	/**
+	 * Returns a command instance for the command parameter.
+	 * 
+	 * @see Command#getCommand(String)
+	 * @return command instance
+	 */
+	public Command getCommand() {
+		return Command.getCommand(commandStr);
+	}
+	
+	/**
+	 * Returns the current folder parameter of this context.
+	 * 
+	 * @return the current folder parameter of this context
+	 */
+	public String getCurrentFolderStr() {
+		return currentFolderStr;
+	}
+	
+	/** Logs base/common request parameters. */
+	public void logBaseParameters() {
+		logger.debug("Parameter Command: {}", commandStr);
+		logger.debug("Parameter Type: {}", typeStr);
+		logger.debug("Parameter CurrentFolder: {}", currentFolderStr);
+	}
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/ThreadLocalData.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/ThreadLocalData.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/ThreadLocalData.java	(revision 4150)
@@ -0,0 +1,78 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.requestcycle;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * Maintains current {@link Context context} and {@link HttpServletRequest
+ * request} instances. This container relies on {@link ThreadLocal} and provides
+ * static access to the aforementioned objects for the current File Browse
+ * request. This means that this class is thread-safe.
+ * 
+ * @version $Id$
+ */
+public class ThreadLocalData {
+	private static ThreadLocal<HttpServletRequest> request = new ThreadLocal<HttpServletRequest>();
+	private static ThreadLocal<Context> context = new ThreadLocal<Context>();
+	
+	/**
+	 * Initializes the current request cycle.
+	 * 
+	 * @param request
+	 *            current user request instance
+	 */
+	public static void beginRequest(final HttpServletRequest request) {
+		if (request == null)
+			throw new NullPointerException("the request cannot be null");
+		ThreadLocalData.request.set(request);
+		ThreadLocalData.context.set(new Context(request));
+	}
+	
+	/**
+	 * Returns the current user request instance.
+	 * 
+	 * @return the current user request instance
+	 */
+	public static HttpServletRequest getRequest() {
+		return request.get();
+	}
+
+	/**
+	 * Returns the current context instance.
+	 * 
+	 * @return the current context instance
+	 */
+	public static Context getContext() {
+		return context.get();
+	}
+	
+	/**
+	 * Terminates the current request cycle. <br />
+	 * <strong>Important: To prevent memory leaks, make sure that this
+	 * method is called at the end of the current request cycle!</strong>
+	 */
+	public static void endRequest() {
+		// ThreadLocal#remove is not available in Java 1.4
+		request.set(null);
+		context.set(null);
+	}
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/UserAction.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/UserAction.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/UserAction.java	(revision 4150)
@@ -0,0 +1,79 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.requestcycle;
+
+import javax.servlet.http.HttpServletRequest;
+
+import net.fckeditor.handlers.Command;
+
+/**
+ * An interface for user action control. In particular, this interface gives
+ * you fine-grained control over the File Browser {@link Command commands}.
+ * <p>
+ * <strong>Note:</strong> You are free to implement this interface the way you
+ * need it, in other words your return values can be global, regardless of the
+ * request, or on a per-request basis.
+ * </p>
+ * 
+ * @version $Id$
+ */
+public interface UserAction {
+
+	/**
+	 * Checks if file upload is enabled/allowed. This method maps to
+	 * {@link Command#FILE_UPLOAD FileUpload} and {@link Command#QUICK_UPLOAD
+	 * QuickUpload}.<br />
+	 * <strong>Note:</strong> This method may be renamed to {@code
+	 * isFileUploadEnabled} in future versions.
+	 * 
+	 * @param request
+	 *            current user request instance
+	 * @return {@code true} if file upload is enabled/allowed, else {@code
+	 *         false}
+	 */
+	public boolean isEnabledForFileUpload(final HttpServletRequest request);
+
+	/**
+	 * Checks if resource retrieval/listing is enabled/allowed. This method maps
+	 * to {@link Command#GET_FOLDERS GetFolders} and
+	 * {@link Command#GET_FOLDERS_AND_FILES GetFoldersAndFiles}.<br />
+	 * <strong>Note:</strong> This method may be renamed to {@code
+	 * isGetResourcesEnabled} in future versions.
+	 * 
+	 * @param request
+	 *            current user request instance
+	 * @return {@code true} if resource retrieval/listing is enabled/allowed,
+	 *         else {@code false}
+	 */
+	public boolean isEnabledForFileBrowsing(final HttpServletRequest request);
+
+	/**
+	 * Checks if folder creation is enabled/allowed. This method maps to
+	 * {@link Command#CREATE_FOLDER CreateFolder}.
+	 * 
+	 * @param request
+	 *            current user request instance
+	 * @return {@code true} if folder creation is enabled/allowed, else {@code
+	 *         false}
+	 */
+	public boolean isCreateFolderEnabled(final HttpServletRequest request);
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/UserPathBuilder.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/UserPathBuilder.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/UserPathBuilder.java	(revision 4150)
@@ -0,0 +1,64 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.requestcycle;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * An interface for userfiles path construction. In particular, this interface
+ * gives you the ability to construct the {@code connector.userFilesPath} and
+ * {@code connector.userFilesAbsolutePath} properties dynamically. See <a
+ * href="http://java.fckeditor.net/properties.html">configuration</a> for more
+ * details.
+ * <p>
+ * <strong>Note:</strong> You are free to implement this interface the way you
+ * need it, in other words your return values can be global, regardless of the
+ * request, or on a per-request basis.
+ * </p>
+ * 
+ * @version $Id$
+ */
+public interface UserPathBuilder {
+
+	/**
+	 * Returns the constructed server-side userfiles absolute path. This method
+	 * is the dynamic constructor of the {@code connector.userFilesAbsolutePath}
+	 * property. A concrete connector implementation will use this value to
+	 * resolve the server-side location of resources.
+	 * 
+	 * @param request
+	 *            current user request instance
+	 * @return the constructed server-side userfiles absolute path
+	 */
+	public String getUserFilesAbsolutePath(final HttpServletRequest request);
+
+	/**
+	 * Returns the constructed client-side userfiles path. This method is the
+	 * dynamic constructor of the {@code connector.userFilesPath} property. A
+	 * browser will use this value to resolve the url-side location of resources
+	 * on the server.
+	 * 
+	 * @param request
+	 *            current user request instance
+	 * @return the constructed client-side userfiles path
+	 */
+	public String getUserFilesPath(final HttpServletRequest request);
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/impl/ContextPathBuilder.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/impl/ContextPathBuilder.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/impl/ContextPathBuilder.java	(revision 4150)
@@ -0,0 +1,40 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.requestcycle.impl;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * UserPathBuilder implementation which always returns static userfiles paths
+ * with prepended context path. In particular it returns the {@code
+ * connector.userFiles*Path} properties and prepend the current context path to
+ * {@link #getUserFilesPath(HttpServletRequest)} only.
+ * 
+ * @version $Id$
+ */
+public class ContextPathBuilder extends ServerRootPathBuilder {
+
+	@Override
+	public String getUserFilesPath(final HttpServletRequest request) {
+		return request.getContextPath().concat(super.getUserFilesPath(request));
+	}
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/impl/DisabledUserAction.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/impl/DisabledUserAction.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/impl/DisabledUserAction.java	(revision 4150)
@@ -0,0 +1,45 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.requestcycle.impl;
+
+import javax.servlet.http.HttpServletRequest;
+
+import net.fckeditor.requestcycle.UserAction;
+
+/**
+ * UserAction implementation which always returns {@code false}.
+ * 
+ * @version $Id$
+ */
+public class DisabledUserAction implements UserAction {
+
+	public boolean isEnabledForFileBrowsing(final HttpServletRequest request) {
+		return false;
+	}
+
+	public boolean isEnabledForFileUpload(final HttpServletRequest request) {
+		return false;
+	}
+
+	public boolean isCreateFolderEnabled(final HttpServletRequest request) {
+		return false;
+	}
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/impl/EnabledUserAction.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/impl/EnabledUserAction.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/impl/EnabledUserAction.java	(revision 4150)
@@ -0,0 +1,45 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.requestcycle.impl;
+
+import javax.servlet.http.HttpServletRequest;
+
+import net.fckeditor.requestcycle.UserAction;
+
+/**
+ * UserAction implementation which always returns {@code true}.
+ * 
+ * @version $Id$
+ */
+public class EnabledUserAction implements UserAction {
+
+	public boolean isEnabledForFileBrowsing(final HttpServletRequest request) {
+		return true;
+	}
+
+	public boolean isEnabledForFileUpload(final HttpServletRequest request) {
+		return true;
+	}
+
+	public boolean isCreateFolderEnabled(final HttpServletRequest request) {
+		return true;
+	}
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/impl/ServerRootPathBuilder.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/impl/ServerRootPathBuilder.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/impl/ServerRootPathBuilder.java	(revision 4150)
@@ -0,0 +1,45 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.requestcycle.impl;
+
+import javax.servlet.http.HttpServletRequest;
+
+import net.fckeditor.handlers.PropertiesLoader;
+import net.fckeditor.requestcycle.UserPathBuilder;
+
+/**
+ * UserPathBuilder implementation which always returns static userfiles paths.
+ * In particular it returns the {@code connector.userFiles*Path} properties
+ * as-is.
+ * 
+ * @version $Id$
+ */
+public class ServerRootPathBuilder implements UserPathBuilder {
+
+	public String getUserFilesAbsolutePath(final HttpServletRequest request) {
+		return PropertiesLoader.getUserFilesAbsolutePath();
+	}
+
+	public String getUserFilesPath(final HttpServletRequest request) {
+		return PropertiesLoader.getUserFilesPath();
+	}
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/impl/UserActionImpl.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/impl/UserActionImpl.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/impl/UserActionImpl.java	(revision 4150)
@@ -0,0 +1,60 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.requestcycle.impl;
+
+import javax.servlet.http.HttpServletRequest;
+
+import net.fckeditor.requestcycle.UserAction;
+
+/**
+ * Standard implementation for {@link UserAction}. It always returns
+ * <code>true</code>.<br/>
+ * 
+ * @see EnabledUserAction
+ * @version $Id$
+ * @deprecated Class will be removed in FCKeditor.Java 2.6, functionality now
+ *             served by {@link EnabledUserAction}.
+ */
+@Deprecated
+public class UserActionImpl implements UserAction {
+
+	/* (non-Javadoc)
+	 * @see net.fckeditor.requestcycle.UserAction#isEnabledForFileBrowsing(javax.servlet.http.HttpServletRequest)
+	 */
+	public boolean isEnabledForFileBrowsing(final HttpServletRequest request) {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see net.fckeditor.requestcycle.UserAction#isEnabledForFileUpload(javax.servlet.http.HttpServletRequest)
+	 */
+	public boolean isEnabledForFileUpload(final HttpServletRequest request) {
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see net.fckeditor.requestcycle.UserAction#isEnabledForFolderCreation(javax.servlet.http.HttpServletRequest)
+	 */
+	public boolean isCreateFolderEnabled(final HttpServletRequest request) {
+		return true;
+	}
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/impl/package-info.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/impl/package-info.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/impl/package-info.java	(revision 4150)
@@ -0,0 +1,27 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+
+/**
+ * Default implementations for the request life cycle interfaces.
+ * 
+ * @version $Id$
+ */
+package net.fckeditor.requestcycle.impl;
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/package-info.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/package-info.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/requestcycle/package-info.java	(revision 4150)
@@ -0,0 +1,34 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+
+/**
+ * Supplemental request life cycle interfaces and classes for the 
+ * {@link net.fckeditor.connector connector} package. They are essential to 
+ * control user actions and userfiles path.
+ * <p>
+ * The sequence diagram below depicts the interaction between interfaces and
+ * classes:<br />
+ * <img src="doc-files/sequence-diagram.png" alt="Request Life Cycle Diagram"
+ * title="Request Life Cycle Diagram" />
+ * </p>
+ * @version $Id$
+ */
+package net.fckeditor.requestcycle;
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/response/GetResponse.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/response/GetResponse.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/response/GetResponse.java	(revision 4150)
@@ -0,0 +1,345 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.response;
+
+import java.io.StringWriter;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import net.fckeditor.connector.Connector;
+import net.fckeditor.handlers.Command;
+import net.fckeditor.handlers.ResourceType;
+import net.fckeditor.localization.LocalizedMessages;
+import net.fckeditor.requestcycle.ThreadLocalData;
+import net.fckeditor.tool.Utils;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Represents the <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Server_Side_Integration#The_Commands"
+ * target="_blank">XML response</a> for the File Browser <code>GET</code>
+ * requests.
+ * 
+ * @version $Id$
+ */
+public class GetResponse {
+
+	/** Underlying DOM document */
+	protected Document document;
+	/** Error element, in case of an invalid request */
+	protected Element errorElement;
+	/** Folders element, in case of a <code>GetResources</code> request */
+	protected Element foldersElement;
+	/** Files element, in case of a <code>GetResources</code> request */
+	protected Element filesElement;
+
+	/** Error number OK */
+	public static final int EN_OK = 0;
+
+	/** Error number CUSTOM ERROR */
+	public static final int EN_CUSTOM_ERROR = 1;
+
+	/** Error number FOLDER ALREADY EXISTS */
+	public static final int EN_FOLDER_ALREADY_EXISTS_ERROR = 101;
+
+	/** Error number INVALID NEW FOLDER NAME */
+	public static final int EN_INVALID_NEW_FOLDER_NAME_ERROR = 102;
+
+	/** Error number SECURITY ERROR */
+	public static final int EN_CREATE_FOLDER_SECURITY_ERROR = 103;
+
+	/** Error number UNKNOWN ERROR */
+	public static final int EN_UKNOWN_CREATE_FOLDER_ERROR = 110;
+
+	/**
+	 * Constructs a response with a specific error number and message.
+	 * 
+	 * @param number
+	 *            the error number of the new get response
+	 * @param message
+	 *            the specific message of the new get response
+	 * @throws RuntimeException
+	 *             if creation of the underlying DOM document failed
+	 */
+	public GetResponse(int number, String message) {
+		try {
+			DocumentBuilderFactory factory = DocumentBuilderFactory
+					.newInstance();
+			DocumentBuilder builder = factory.newDocumentBuilder();
+			document = builder.newDocument();
+		} catch (ParserConfigurationException e) {
+			throw new RuntimeException(e);
+		}
+
+		Element root = document.createElement("Connector");
+		document.appendChild(root);
+		setError(number, message);
+	}
+
+	/**
+	 * Constructs a successful response for a specific command and resource
+	 * type.
+	 * 
+	 * @param command
+	 *            the current command of the new get response
+	 * @param type
+	 *            the current resource type of the new get response
+	 * @param currentFolder
+	 *            the current folder of the new get response
+	 * @param constructedUrl
+	 *            the final URL of the new get response
+	 * @throws RuntimeException
+	 *             if creation of the underlying DOM document failed
+	 */
+	public GetResponse(Command command, ResourceType type,
+			String currentFolder, String constructedUrl) {
+
+		try {
+			DocumentBuilderFactory factory = DocumentBuilderFactory
+					.newInstance();
+			DocumentBuilder builder = factory.newDocumentBuilder();
+			document = builder.newDocument();
+		} catch (ParserConfigurationException e) {
+			throw new RuntimeException(e);
+		}
+
+		Element root = document.createElement("Connector");
+		document.appendChild(root);
+		root.setAttribute("command", command.getName());
+		root.setAttribute("resourceType", type.getName());
+
+		Element currentFolderElement = document.createElement("CurrentFolder");
+		currentFolderElement.setAttribute("path", currentFolder);
+
+		currentFolderElement.setAttribute("url", constructedUrl);
+		root.appendChild(currentFolderElement);
+
+	}
+
+	/**
+	 * Constructs a response with a specific error number only.
+	 * 
+	 * @param number
+	 *            the error number of the new get response
+	 * @throws RuntimeException
+	 *             if creation of the underlying DOM document failed
+	 */
+	public GetResponse(int number) {
+		this(number, null);
+	}
+
+	/**
+	 * Sets the error number and specific message of this get response.
+	 * 
+	 * @param number
+	 *            the error number of this get response
+	 * @param message
+	 *            the specific message of this get response
+	 */
+	public void setError(int number, String message) {
+
+		if (errorElement == null) {
+			errorElement = document.createElement("Error");
+			document.getDocumentElement().appendChild(errorElement);
+		}
+
+		errorElement.setAttribute("number", String.valueOf(number));
+		if (Utils.isNotEmpty(message))
+			errorElement.setAttribute("text", message);
+
+	}
+
+	/**
+	 * Sets the error number of this get response.
+	 * 
+	 * @param number
+	 *            the error number of this get response
+	 */
+	public void setError(int number) {
+		setError(number, null);
+	}
+
+	/**
+	 * Sets the folders of this get response.
+	 * 
+	 * @see Connector#getFolders(ResourceType, String)
+	 * @param folders
+	 *            the folders of this get response
+	 */
+	public void setFolders(final List<String> folders) {
+		if (foldersElement != null) {
+			Element parent = (Element) foldersElement.getParentNode();
+			parent.removeChild(foldersElement);
+		}
+
+		foldersElement = document.createElement("Folders");
+		document.getDocumentElement().appendChild(foldersElement);
+
+		for (String folder : folders) {
+			Element folderElement = document.createElement("Folder");
+			folderElement.setAttribute("name", folder);
+			foldersElement.appendChild(folderElement);
+		}
+	}
+
+	/**
+	 * Sets the folders of this get response.
+	 * 
+	 * @see Connector#getFiles(ResourceType, String)
+	 * @param files
+	 *            the files of this get response
+	 */
+	public void setFiles(final List<Map<String, Object>> files) {
+		if (filesElement != null) {
+			Element parent = (Element) filesElement.getParentNode();
+			parent.removeChild(filesElement);
+		}
+
+		filesElement = document.createElement("Files");
+		document.getDocumentElement().appendChild(filesElement);
+
+		long length = 1L;
+		long tempLength;
+
+		for (Map<String, Object> file : files) {
+			Element fileElement = document.createElement("File");
+			fileElement.setAttribute("name", (String) file
+					.get(Connector.KEY_NAME));
+			tempLength = ((Number) file.get(Connector.KEY_SIZE)).longValue();
+			if (tempLength > 1024L)
+				length = tempLength / 1024L;
+			fileElement.setAttribute("size", String.valueOf(length));
+			filesElement.appendChild(fileElement);
+		}
+	}
+
+	/**
+	 * Creates the XML representation of this get response. The underlying DOM
+	 * document will transformed to a string.
+	 * 
+	 * @throws RuntimeException
+	 *             if creation failed
+	 * @return XML representation of this get response
+	 */
+	@Override
+	public String toString() {
+		document.getDocumentElement().normalize();
+		TransformerFactory factory = TransformerFactory.newInstance();
+
+		StringWriter sw = new StringWriter();
+
+		try {
+			Transformer transformer = factory.newTransformer();
+
+			DOMSource source = new DOMSource(document);
+			StreamResult result = new StreamResult(sw);
+
+			transformer.transform(source, result);
+		} catch (TransformerException e) {
+			throw new RuntimeException(e);
+		}
+
+		return sw.toString();
+	}
+
+	/** Creates an <code>OK</code> response. */
+	public static GetResponse getOK() {
+		return new GetResponse(EN_OK);
+	}
+
+	/** Creates an <code>INVALID COMMAND</code> error. */
+	public static GetResponse getInvalidCommandError() {
+		LocalizedMessages lm = LocalizedMessages.getInstance(ThreadLocalData
+				.getRequest());
+		return new GetResponse(EN_CUSTOM_ERROR, lm.getInvalidCommandSpecified());
+	}
+
+	/** Creates an <code>INVALID RESOURCE TYPE</code> error. */
+	public static GetResponse getInvalidResourceTypeError() {
+		LocalizedMessages lm = LocalizedMessages.getInstance(ThreadLocalData
+				.getRequest());
+		return new GetResponse(EN_CUSTOM_ERROR, lm
+				.getInvalidResouceTypeSpecified());
+	}
+
+	/** Creates an <code>INVALID CURRENT FOLDER</code> error. */
+	public static GetResponse getInvalidCurrentFolderError() {
+		LocalizedMessages lm = LocalizedMessages.getInstance(ThreadLocalData
+				.getRequest());
+		return new GetResponse(EN_CUSTOM_ERROR, lm
+				.getInvalidCurrentFolderSpecified());
+	}
+
+	/** Creates a <code>GET RESOURCES DISABLED</code> error. */
+	public static GetResponse getGetResourcesDisabledError() {
+		LocalizedMessages lm = LocalizedMessages.getInstance(ThreadLocalData
+				.getRequest());
+		return new GetResponse(EN_CUSTOM_ERROR, lm.getGetResourcesDisabled());
+	}
+
+	/** Creates a <code>GET RESOURCES READ</code> error. */
+	public static GetResponse getGetResourcesReadError() {
+		LocalizedMessages lm = LocalizedMessages.getInstance(ThreadLocalData
+				.getRequest());
+		return new GetResponse(EN_CUSTOM_ERROR, lm.getGetResourcesReadError());
+	}
+
+	/** Creates a <code>CREATE FOLDER DISABLED</code> error. */
+	public static GetResponse getCreateFolderDisabledError() {
+		LocalizedMessages lm = LocalizedMessages.getInstance(ThreadLocalData
+				.getRequest());
+		return new GetResponse(EN_CUSTOM_ERROR, lm.getCreateFolderDisabled());
+	}
+
+	/** Creates an <code>INVALID NEW FOLDER NAME</code> error. */
+	public static GetResponse getInvalidNewFolderNameError() {
+		LocalizedMessages lm = LocalizedMessages.getInstance(ThreadLocalData
+				.getRequest());
+		return new GetResponse(EN_INVALID_NEW_FOLDER_NAME_ERROR, lm
+				.getInvalidNewFolderNameSpecified());
+	}
+
+	/** Creates a <code>FOLDER ALREADY EXISTS</code> error. */
+	public static GetResponse getFolderAlreadyExistsError() {
+		LocalizedMessages lm = LocalizedMessages.getInstance(ThreadLocalData
+				.getRequest());
+		return new GetResponse(EN_FOLDER_ALREADY_EXISTS_ERROR, lm
+				.getFolderAlreadyExistsError());
+	}
+
+	/** Creates a <code>CREATE FOLDER WRITE</code> error. */
+	public static GetResponse getCreateFolderWriteError() {
+		LocalizedMessages lm = LocalizedMessages.getInstance(ThreadLocalData
+				.getRequest());
+		return new GetResponse(EN_UKNOWN_CREATE_FOLDER_ERROR, lm
+				.getCreateFolderWriteError());
+	}
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/response/UploadResponse.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/response/UploadResponse.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/response/UploadResponse.java	(revision 4150)
@@ -0,0 +1,222 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.response;
+
+import net.fckeditor.localization.LocalizedMessages;
+import net.fckeditor.requestcycle.ThreadLocalData;
+import net.fckeditor.tool.Utils;
+
+/**
+ * Represents the <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Server_Side_Integration#FileUpload_.28HTML.29"
+ * target="_blank">HTML/JS response</a> for the File Browser <code>POST</code>
+ * requests.
+ * <p>
+ * This class utilizes varags to reflect the JavaScript callback function in an
+ * optimal way. However, varargs can be tricky. You can always omit passed
+ * parameters from right to left but any violation may result in an exception or
+ * a failed callback.
+ * </p>
+ * <p>
+ * For example: <code>window.parent.OnUploadCompleted(101,'some/url/file.img','file.img','no error')</code> can be mapped with
+ * 
+ * <code>UploadResponse ur = new UploadResponse(SC_SOME_ERROR,"/some/url/file.img","file.img","no error")</code>
+ * .
+ * </p>
+ * <p>
+ * But <code>window.parent.OnUploadCompleted(101,'some/url/file.img','no error')</code> is an illegal callback and
+ * will fail.
+ * </p>
+ * 
+ * @version $Id$
+ */
+public class UploadResponse {
+
+	/** JavaScript callback parameters */
+	protected Object[] parameters;
+
+	/** Error number OK */
+	public static final int EN_OK = 0;
+
+	/** Error number CUSTOM ERROR */
+	public static final int EN_CUSTOM_ERROR = 1;
+
+	/** Error number CUSTOM WARNING */
+	public static final int EN_CUSTOM_WARNING = 101;
+
+	/** Error number FILE RENAMED WARNING */
+	public static final int EN_FILE_RENAMED_WARNING = 201;
+
+	/** Error number INVALID FILE TYPE */
+	public static final int EN_INVALID_FILE_TYPE_ERROR = 202;
+
+	/** Error number SECURITY ERROR */
+	public static final int EN_SECURITY_ERROR = 203;
+
+	/**
+	 * Constructs a response with a varying amount of arguments.
+	 * <p>
+	 * Use the predefined error numbers or upload responses, if possible. If you
+	 * need to set error number and message only, use this constructor with the
+	 * first argument only and call
+	 * {@link UploadResponse#setCustomMessage(String)}.
+	 * </p>
+	 * 
+	 * @param arguments
+	 *            possible argument order:
+	 *            <code>int errorNumber, String fileUrl, String filename, String customMessage</code>
+	 *            . Omit from right to left.
+	 * @throws IllegalArgumentException
+	 *             if amount of arguments is less than 1 and above 4
+	 * @throws IllegalArgumentException
+	 *             if the first argument is not an error number (int)
+	 */
+	public UploadResponse(Object... arguments) {
+		if (arguments.length < 1 || arguments.length > 4)
+			throw new IllegalArgumentException(
+					"The amount of arguments has to be between 1 and 4");
+
+		parameters = new Object[arguments.length];
+
+		if (!(arguments[0] instanceof Integer))
+			throw new IllegalArgumentException(
+					"The first argument has to be an error number (int)");
+
+		System.arraycopy(arguments, 0, parameters, 0, arguments.length);
+	}
+
+	/**
+	 * Sets the custom message of this upload response.
+	 * 
+	 * Methods automatically determines how many arguments are set and puts the
+	 * message at the end.
+	 * 
+	 * @param customMassage
+	 *            the custom message of this upload response
+	 */
+	public void setCustomMessage(final String customMassage) {
+		if (Utils.isNotEmpty(customMassage)) {
+			if (parameters.length == 1) {
+				Object errorNumber = parameters[0];
+				parameters = new Object[4];
+				parameters[0] = errorNumber;
+				parameters[1] = null;
+				parameters[2] = null;
+			}
+			parameters[3] = customMassage;
+		}
+	}
+
+	/** Creates an <code>OK</code> response. */
+	public static UploadResponse getOK(String fileUrl) {
+		return new UploadResponse(EN_OK, fileUrl);
+	}
+
+	/** Creates a <code>FILE RENAMED</code> warning. */
+	public static UploadResponse getFileRenamedWarning(String fileUrl,
+			String newFileName) {
+		LocalizedMessages lm = LocalizedMessages.getInstance(ThreadLocalData
+				.getRequest());
+		return new UploadResponse(EN_FILE_RENAMED_WARNING, fileUrl,
+				newFileName, lm.getFileRenamedWarning(newFileName));
+	}
+
+	/** Creates a <code>INVALID FILE TYPE</code> error. */
+	public static UploadResponse getInvalidFileTypeError() {
+		LocalizedMessages lm = LocalizedMessages.getInstance(ThreadLocalData
+				.getRequest());
+		return new UploadResponse(EN_INVALID_FILE_TYPE_ERROR, lm
+				.getInvalidFileTypeSpecified());
+	}
+
+	/** Creates a <code>INVALID COMMAND</code> error. */
+	public static UploadResponse getInvalidCommandError() {
+		LocalizedMessages lm = LocalizedMessages.getInstance(ThreadLocalData
+				.getRequest());
+		return new UploadResponse(EN_CUSTOM_ERROR, null, null, lm
+				.getInvalidCommandSpecified());
+	}
+
+	/** Creates a <code>INVALID RESOURCE TYPE</code> error. */
+	public static UploadResponse getInvalidResourceTypeError() {
+		LocalizedMessages lm = LocalizedMessages.getInstance(ThreadLocalData
+				.getRequest());
+		return new UploadResponse(EN_CUSTOM_ERROR, null, null, lm
+				.getInvalidResouceTypeSpecified());
+	}
+
+	/** Creates a <code>INVALID CURRENT FOLDER</code> error. */
+	public static UploadResponse getInvalidCurrentFolderError() {
+		LocalizedMessages lm = LocalizedMessages.getInstance(ThreadLocalData
+				.getRequest());
+		return new UploadResponse(EN_CUSTOM_ERROR, null, null, lm
+				.getInvalidCurrentFolderSpecified());
+	}
+
+	/** Creates a <code>FILE UPLOAD DISABLED</code> error. */
+	public static UploadResponse getFileUploadDisabledError() {
+		LocalizedMessages lm = LocalizedMessages.getInstance(ThreadLocalData
+				.getRequest());
+		return new UploadResponse(EN_SECURITY_ERROR, null, null, lm
+				.getFileUploadDisabled());
+	}
+
+	/** Creates a <code>FILE UPLOAD WRITE</code> error. */
+	public static UploadResponse getFileUploadWriteError() {
+		LocalizedMessages lm = LocalizedMessages.getInstance(ThreadLocalData
+				.getRequest());
+		return new UploadResponse(EN_CUSTOM_ERROR, null, null, lm
+				.getFileUploadWriteError());
+	}
+
+	/**
+	 * Creates the HTML/JS representation of this upload response.
+	 * 
+	 * @return HTML/JS representation of this upload response
+	 */
+	@Override
+	public String toString() {
+		StringBuffer sb = new StringBuffer(400);
+		sb.append("<script type=\"text/javascript\">\n");
+		// Compressed version of the document.domain automatic fix script.
+		// The original script can be found at
+		// [fckeditor_dir]/_dev/domain_fix_template.js
+		sb.append("(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();\n");
+		sb.append("window.parent.OnUploadCompleted(");
+
+		for (Object parameter : parameters) {
+			if (parameter instanceof Integer) {
+				sb.append(parameter);
+			} else {
+				sb.append("'");
+				if (parameter != null)
+					sb.append(parameter);
+				sb.append("'");
+			}
+			sb.append(",");
+		}
+
+		sb.deleteCharAt(sb.length() - 1);
+		sb.append(");\n");
+		sb.append("</script>");
+
+		return sb.toString();
+	}
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/response/package-info.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/response/package-info.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/response/package-info.java	(revision 4150)
@@ -0,0 +1,27 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+
+/**
+ * Response objects for {@code GET} and {@code POST} requests.
+ * 
+ * @version $Id$
+ */
+package net.fckeditor.response;
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tags/CheckTag.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tags/CheckTag.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tags/CheckTag.java	(revision 4150)
@@ -0,0 +1,145 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.tags;
+
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspTagException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.tagext.TagSupport;
+
+/*import org.slf4j.Logger;
+ import org.slf4j.LoggerFactory;*/
+
+import net.fckeditor.handlers.RequestCycleHandler;
+import net.fckeditor.localization.LocalizedMessages;
+import net.fckeditor.tool.Compatibility;
+
+/**
+ * Displays information about browser and user capabilities.
+ * <p>
+ * There are four available commands:
+ * <ol>
+ * <li><code>CompatibleBrowser</code></li>
+ * <li><code>CreateFolder</code></li>
+ * <li><code>FileUpload</code></li>
+ * <li><code>GetResources</code></li>
+ * </ol>
+ * </p>
+ * Each call will emit a localized message (if available) about the command's
+ * status.
+ * 
+ * @version $Id$
+ */
+public class CheckTag extends TagSupport {
+
+	private static final long serialVersionUID = -6834095891675681686L;
+
+	private static final String FILE_UPLOAD = "FileUpload";
+	@Deprecated
+	private static final String FILE_BROWSING = "FileBrowsing";
+	private static final String GET_RESOURCES = "GetResources";
+	@Deprecated
+	private static final String FOLDER_CREATION = "FolderCreation";
+	private static final String CREATE_FOLDER = "CreateFolder";
+	private static final String COMPATIBLE_BROWSER = "CompatibleBrowser";
+
+	private static final Set<String> commands = new HashSet<String>(6);
+
+	static {
+		commands.add(FILE_UPLOAD);
+		commands.add(FILE_BROWSING);
+		commands.add(FOLDER_CREATION);
+		commands.add(COMPATIBLE_BROWSER);
+		commands.add(GET_RESOURCES);
+		commands.add(CREATE_FOLDER);
+	}
+
+	private String command;
+
+	/**
+	 * Sets the desired command.
+	 * 
+	 * @param command
+	 *            a command to check
+	 * @throws JspTagException
+	 *             if the provided command does not exist
+	 */
+	public void setCommand(String command) throws JspTagException {
+		if (!commands.contains(command))
+			throw new JspTagException(
+					"You have to provide one of the following commands: "
+							+ commands);
+		this.command = command;
+	}
+
+	@Override
+	public int doStartTag() throws JspException {
+		JspWriter out = pageContext.getOut();
+
+		HttpServletRequest request = (HttpServletRequest) pageContext
+				.getRequest();
+		LocalizedMessages lm = LocalizedMessages.getInstance(request);
+		String response = null;
+
+		if (command.equals(FILE_UPLOAD)) {
+			if (RequestCycleHandler.isEnabledForFileUpload(request))
+				response = lm.getFileUploadEnabled();
+			else
+				response = lm.getFileUploadDisabled();
+		}
+
+		if (command.equals(FILE_BROWSING) || command.equals(GET_RESOURCES)) {
+			if (RequestCycleHandler.isEnabledForFileBrowsing(request))
+				response = lm.getGetResourcesEnabled();
+			else
+				response = lm.getGetResourcesDisabled();
+		}
+
+		if (command.equals(FOLDER_CREATION) || command.equals(CREATE_FOLDER)) {
+			if (RequestCycleHandler.isCreateFolderEnabled(request))
+				response = lm.getCreateFolderEnabled();
+			else
+				response = lm.getCreateFolderDisabled();
+		}
+
+		if (command.equals(COMPATIBLE_BROWSER)) {
+			if (Compatibility.isCompatibleBrowser(request))
+				response = lm.getCompatibleBrowserYes();
+			else
+				response = lm.getCompatibleBrowserNo();
+		}
+
+		try {
+			out.print(response);
+		} catch (IOException e) {
+			throw new JspException(
+					"Tag response could not be written to the user!", e);
+		}
+
+		return SKIP_BODY;
+	}
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tags/ConfigTag.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tags/ConfigTag.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tags/ConfigTag.java	(revision 4150)
@@ -0,0 +1,69 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.tags;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.DynamicAttributes;
+import javax.servlet.jsp.tagext.Tag;
+import javax.servlet.jsp.tagext.TagSupport;
+
+import net.fckeditor.FCKeditorConfig;
+
+/**
+ * Sets {@link FCKeditorConfig configuration options} in the surrounding editor
+ * tag only.
+ * 
+ * @version $Id$
+ */
+public class ConfigTag extends TagSupport implements DynamicAttributes {
+
+	private Map<String, String> params = new HashMap<String, String>();
+
+	private static final long serialVersionUID = -5282810094404700422L;
+
+	@Override
+	public int doStartTag() throws JspException {
+
+		Tag ancestor = findAncestorWithClass(this, EditorTag.class);
+		if (ancestor == null)
+			throw new JspException(
+					"the config tag can only be nested within an editor tag");
+		EditorTag editorTag = (EditorTag) ancestor;
+
+		for (Map.Entry<String, String> option : params.entrySet())
+			editorTag.setConfig(option.getKey(), option.getValue());
+
+		return SKIP_BODY;
+	}
+
+	/**
+	 * Sets a configuration option.
+	 */
+	public void setDynamicAttribute(String arg0, String name, Object value)
+			throws JspException {
+		if (value != null)
+			params.put(name, value.toString());
+	}
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tags/EditorTag.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tags/EditorTag.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tags/EditorTag.java	(revision 4150)
@@ -0,0 +1,153 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.tags;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.tagext.TagSupport;
+
+import net.fckeditor.FCKeditor;
+import net.fckeditor.tool.Utils;
+
+/**
+ * Tag creates and configures a {@link FCKeditor} instance. The setter methods
+ * are the same as in the FCKeditor class itself.
+ * 
+ * @version $Id$
+ */
+public class EditorTag extends TagSupport {
+
+	private static final long serialVersionUID = -173091731589866140L;
+
+	private String instanceName;
+	private String width;
+	private String height;
+	private String toolbarSet;
+	private String value;
+	private String basePath;
+
+	/** The underlying FCKeditor instance */
+	private transient FCKeditor fckEditor;
+
+	/**
+	 * @see FCKeditor#setInstanceName(String)
+	 */
+	public void setInstanceName(String instanceName) {
+		this.instanceName = instanceName;
+	}
+
+	/**
+	 * @see FCKeditor#setWidth(String)
+	 */
+	public void setWidth(String width) {
+		this.width = width;
+	}
+
+	/**
+	 * @see FCKeditor#setHeight(String)
+	 */
+	public void setHeight(String height) {
+		this.height = height;
+	}
+
+	/**
+	 * @see FCKeditor#setToolbarSet(String)
+	 */
+	public void setToolbarSet(String toolbarSet) {
+		this.toolbarSet = toolbarSet;
+	}
+
+	/**
+	 * @see FCKeditor#setValue(String)
+	 */
+	public void setValue(String value) {
+		this.value = value;
+	}
+
+	/**
+	 * @see FCKeditor#setBasePath(String)
+	 */
+	public void setBasePath(String basePath) {
+		this.basePath = basePath;
+	}
+
+	/**
+	 * @see FCKeditor#setConfig(String, String)
+	 * @deprecated method will be removed in FCKeditor.Java 2.6, use
+	 *             {@link #setConfig(String, String)}
+	 */
+	@Deprecated
+	void setConfigParamAll(Map<String, String> map) {
+		fckEditor.getConfig().putAll(map);
+	}
+
+	/**
+	 * @see FCKeditor#setConfig(String, String)
+	 */
+	void setConfig(String name, String value) {
+		fckEditor.setConfig(name, value);
+	}
+
+	@Override
+	public int doStartTag() throws JspException {
+
+		try {
+			fckEditor = new FCKeditor((HttpServletRequest) pageContext
+					.getRequest(), instanceName);
+
+			if (Utils.isNotEmpty(width))
+				fckEditor.setWidth(width);
+			if (Utils.isNotEmpty(height))
+				fckEditor.setHeight(height);
+			if (Utils.isNotEmpty(toolbarSet))
+				fckEditor.setToolbarSet(toolbarSet);
+			if (Utils.isNotEmpty(value))
+				fckEditor.setValue(value);
+			if (Utils.isNotEmpty(basePath))
+				fckEditor.setBasePath(basePath);
+
+		} catch (Exception e) {
+			throw new JspException(e);
+		}
+
+		return EVAL_BODY_INCLUDE;
+	}
+
+	@Override
+	public int doEndTag() throws JspException {
+
+		JspWriter out = pageContext.getOut();
+
+		try {
+			out.println(fckEditor);
+		} catch (IOException e) {
+			throw new JspException(
+					"Tag response could not be written to the user!", e);
+		}
+
+		return EVAL_PAGE;
+	}
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tags/package-info.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tags/package-info.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tags/package-info.java	(revision 4150)
@@ -0,0 +1,28 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+
+/**
+ * 	JSP tags to create and configure the {@link net.fckeditor.FCKeditor FCKeditor}
+ * object.
+ * 
+ * @version $Id$
+ */
+package net.fckeditor.tags;
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tool/Compatibility.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tool/Compatibility.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tool/Compatibility.java	(revision 4150)
@@ -0,0 +1,113 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.tool;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.servlet.http.HttpServletRequest;
+
+import net.fckeditor.FCKeditor;
+
+/**
+ * Checks browser compatibility with the {@link FCKeditor editor}.
+ * 
+ * @version $Id$
+ */
+public class Compatibility {
+
+	/**
+	 * Checks if a browser's user agent string is compatible with the FCKeditor.
+	 * 
+	 * @param userAgentString
+	 *            the user agent string of a browser
+	 * @return <code>true</code> if compatible, else <code>false</code>
+	 */
+	public static boolean check(final String userAgentString) {
+		if (Utils.isEmpty(userAgentString))
+			return false;
+
+		String userAgentStr = userAgentString.toLowerCase();
+
+		// IE 5.5+, check special keys like 'Opera' and 'mac', because there are
+		// some
+		// other browsers, containing 'MSIE' in there agent string!
+		if (userAgentStr.indexOf("opera") < 0
+				&& userAgentStr.indexOf("mac") < 0
+				&& getBrowserVersion(userAgentStr, ".*msie ([\\d]+.[\\d]+).*") >= 5.5f)
+			return true;
+
+		// for all gecko based browsers
+		if (getBrowserVersion(userAgentStr, ".*rv:([\\d]+.[\\d]+).*") > 1.7f)
+			return true;
+
+		// Opera 9.5+
+		if (getBrowserVersion(userAgentStr, "opera/([\\d]+.[\\d]+).*") >= 9.5f
+				|| getBrowserVersion(userAgentStr, ".*opera ([\\d]+.[\\d]+)") >= 9.5f)
+			return true;
+
+		// Safari 3+
+		if (getBrowserVersion(userAgentStr, ".*applewebkit/([\\d]+).*") >= 522f)
+			return true;
+
+		return false;
+	}
+
+	/**
+	 * Returns <code>true</code> if a browser is compatible by its request
+	 * user-agent header.
+	 * 
+	 * @see #check(String)
+	 * @param request
+	 *            current user request instance
+	 * @return <code>true</code> if a browser is compatible, else
+	 *         <code>false</code>
+	 */
+	public static boolean isCompatibleBrowser(final HttpServletRequest request) {
+		return (request == null) ? false : check(request
+				.getHeader("user-agent"));
+	}
+
+	/**
+	 * Helper method to get the browser version from 'userAgent' with regex. The
+	 * first matching group has to be the version number!
+	 * 
+	 * @param userAgentString
+	 *            the user agent string of a browser
+	 * @param regex
+	 *            the pattern to retrieve the browser version
+	 * @return the browser version, or -1f if version can't be determined
+	 */
+	private static float getBrowserVersion(final String userAgentString,
+			final String regex) {
+		Pattern pattern = Pattern.compile(regex);
+		Matcher matcher = pattern.matcher(userAgentString);
+		if (matcher.matches()) {
+			try {
+				return Float.parseFloat(matcher.group(1));
+			} catch (NumberFormatException e) {
+				return -1f;
+			}
+		}
+		return -1f;
+	}
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tool/Utils.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tool/Utils.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tool/Utils.java	(revision 4150)
@@ -0,0 +1,139 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.tool;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.StringTokenizer;
+
+/**
+ * Static helper methods for strings.
+ * 
+ * @version $Id$
+ */
+public class Utils {
+
+	/** The empty string {@code ""}. */
+	public static final String EMPTY_STRING = "";
+	
+	/**
+	 * Constructs a set of lower-cased strings from a delimiter-separated
+	 * string.
+	 * 
+	 * @param stringList
+	 *            strings separated with a delimiter
+	 * @param delimiter
+	 *            separating delimiter
+	 * @return a lower-cased set, empty set if stringList is empty
+	 * @throws IllegalArgumentException
+	 *             if <code>delimiter</code> is empty
+	 */
+	public static Set<String> getSet(final String stringList,
+			final String delimiter) {
+		if (isEmpty(delimiter))
+			throw new IllegalArgumentException(
+					"Argument 'delimiter' shouldn't be empty!");
+		if (isEmpty(stringList))
+			return new HashSet<String>();
+
+		Set<String> set = new HashSet<String>();
+		StringTokenizer st = new StringTokenizer(stringList, delimiter);
+		while (st.hasMoreTokens()) {
+			String tmp = st.nextToken();
+			if (isNotEmpty(tmp)) // simple empty filter
+				set.add(tmp.toLowerCase());
+		}
+		return set;
+	}
+
+	/**
+	 * Constructs a set of lower-cased strings from a <code>|</code> (pipe)
+	 * delimited string.
+	 * 
+	 * @see #getSet(String, String)
+	 * @param stringList
+	 *            strings separated with a delimiter
+	 * @return a lower-cased set, empty set if stringList is empty
+	 * @throws IllegalArgumentException
+	 *             if <code>delimiter</code> is empty
+	 */
+	public static Set<String> getSet(final String stringList) {
+		return getSet(stringList, "|");
+	}
+
+	/**
+	 * Checks if a string is empty ("") or null.
+	 * 
+	 * @param str
+	 *            string to check, may be null
+	 * @return <code>true</code> if the string is <code>null</code> or empty,
+	 *         else <code>false</code>
+	 */
+	public static boolean isEmpty(final String str) {
+		return str == null || str.length() == 0;
+	}
+
+	/**
+	 * Checks if a string is not empty ("") and not null.
+	 * 
+	 * @param str
+	 *            string to check, may be null
+	 * @return <code>true</code> if the string is not empty and not
+	 *         <code>null</code>, else <code>false</code>
+	 */
+	public static boolean isNotEmpty(final String str) {
+		return !isEmpty(str);
+	}
+
+	/**
+	 * Checks if a string is whitespace, empty ("") or null. Whitespace is
+	 * checked by {@link Character#isWhitespace(char)}.
+	 * 
+	 * @param str
+	 *            string to check, may be null
+	 * @return <code>true</code> if the string is <code>null</code>, empty or
+	 *         whitespace
+	 */
+	public static boolean isBlank(final String str) {
+
+		if (isEmpty(str))
+			return true;
+
+		for (char c : str.toCharArray()) {
+			if (!Character.isWhitespace(c))
+				return false;
+		}
+
+		return true;
+	}
+
+	/**
+	 * Checks if a string is not empty (""), not null and not whitespace.
+	 * 
+	 * @param str
+	 *            string to check, may be null
+	 * @return <code>true</code> if the string is not <code>null</code>, not
+	 *         empty and not whitespace.
+	 */
+	public static boolean isNotBlank(final String str) {
+		return !isBlank(str);
+	}
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tool/UtilsFile.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tool/UtilsFile.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tool/UtilsFile.java	(revision 4150)
@@ -0,0 +1,177 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.tool;
+
+import java.io.File;
+import java.io.InputStream;
+import java.util.regex.Pattern;
+
+import net.fckeditor.handlers.PropertiesLoader;
+
+import org.apache.commons.io.FilenameUtils;
+import org.devlib.schmidt.imageinfo.ImageInfo;
+
+/**
+ * Static helper methods for files.
+ * 
+ * @version $Id$
+ */
+public class UtilsFile {
+	
+	protected static final Pattern ILLEGAL_CURRENT_FOLDER_PATTERN = Pattern
+			.compile("^[^/]|[^/]$|/\\.{1,2}|\\\\|\\||:|\\?|\\*|\"|<|>|\\p{Cntrl}");
+
+	/**
+	 * Sanitizes a filename from certain chars.<br />
+	 * 
+	 * This method enforces the <code>forceSingleExtension</code> property and
+	 * then replaces all occurrences of \, /, |, :, ?, *, &quot;, &lt;, &gt;,
+	 * control chars by _ (underscore).
+	 * 
+	 * @param filename
+	 *            a potentially 'malicious' filename
+	 * @return sanitized filename
+	 */
+	public static String sanitizeFileName(final String filename) {
+
+		if (Utils.isEmpty(filename))
+			return filename;
+
+		String name = (PropertiesLoader.isForceSingleExtension()) ? UtilsFile
+				.forceSingleExtension(filename) : filename;
+
+		// Remove \ / | : ? * " < > 'Control Chars' with _
+		return name.replaceAll("\\\\|/|\\||:|\\?|\\*|\"|<|>|\\p{Cntrl}", "_");
+	}
+
+	/**
+	 * Sanitizes a folder name from certain chars.<br />
+	 * 
+	 * This method replaces all occurrences of \, /, |, :, ?, *, &quot;, &lt;,
+	 * &gt;, control chars by _ (underscore).
+	 * 
+	 * @param folderName
+	 *            a potentially 'malicious' folder name
+	 * @return sanitized folder name
+	 */
+	public static String sanitizeFolderName(final String folderName) {
+
+		if (Utils.isEmpty(folderName))
+			return folderName;
+
+		// Remove . \ / | : ? * " < > 'Control Chars' with _
+		return folderName.replaceAll(
+				"\\.|\\\\|/|\\||:|\\?|\\*|\"|<|>|\\p{Cntrl}", "_");
+	}
+
+	/**
+	 * Checks if the underlying input stream contains an image.
+	 * 
+	 * @param in
+	 *            input stream of an image
+	 * @return <code>true</code> if the underlying input stream contains an
+	 *         image, else <code>false</code>
+	 */
+	public static boolean isImage(final InputStream in) {
+		ImageInfo ii = new ImageInfo();
+		ii.setInput(in);
+		return ii.check();
+	}
+
+	/**
+	 * Checks whether a path complies with the FCKeditor File Browser <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Server_Side_Integration#File_Browser_Requests"
+	 * target="_blank">rules</a>.
+	 * 
+	 * @param path
+	 *            a potentially 'malicious' path
+	 * @return <code>true</code> if path complies with the rules, else
+	 *         <code>false</code>
+	 */
+	public static boolean isValidPath(final String path) {
+		if (Utils.isEmpty(path))
+			return false;
+
+		if (ILLEGAL_CURRENT_FOLDER_PATTERN.matcher(path).find())
+			return false;
+		
+		return true;
+	}
+
+	/**
+	 * Replaces all dots in a filename with underscores except the last one.
+	 * 
+	 * @param filename
+	 *            filename to sanitize
+	 * @return string with a single dot only
+	 */
+	public static String forceSingleExtension(final String filename) {
+		return filename.replaceAll("\\.(?![^.]+$)", "_");
+	}
+
+	/**
+	 * Checks if a filename contains more than one dot.
+	 * 
+	 * @param filename
+	 *            filename to check
+	 * @return <code>true</code> if filename contains severals dots, else
+	 *         <code>false</code>
+	 */
+	public static boolean isSingleExtension(final String filename) {
+		return filename.matches("[^\\.]+\\.[^\\.]+");
+	}
+
+	/**
+	 * Checks a directory for existence and creates it if non-existent.
+	 * 
+	 * @param dir
+	 *            directory to check/create
+	 */
+	public static void checkDirAndCreate(File dir) {
+		if (!dir.exists())
+			dir.mkdirs();
+	}
+
+	/**
+	 * Iterates over a base name and returns the first non-existent file.<br />
+	 * This method extracts a file's base name, iterates over it until the first
+	 * non-existent appearance with <code>basename(n).ext</code>. Where n is a
+	 * positive integer starting from one.
+	 * 
+	 * @param file
+	 *            base file
+	 * @return first non-existent file
+	 */
+	public static File getUniqueFile(final File file) {
+		if (!file.exists())
+			return file;
+
+		File tmpFile = new File(file.getAbsolutePath());
+		File parentDir = tmpFile.getParentFile();
+		int count = 1;
+		String extension = FilenameUtils.getExtension(tmpFile.getName());
+		String baseName = FilenameUtils.getBaseName(tmpFile.getName());
+		do {
+			tmpFile = new File(parentDir, baseName + "(" + count++ + ")."
+					+ extension);
+		} while (tmpFile.exists());
+		return tmpFile;
+	}
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tool/UtilsResponse.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tool/UtilsResponse.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tool/UtilsResponse.java	(revision 4150)
@@ -0,0 +1,71 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.tool;
+
+import net.fckeditor.handlers.ResourceType;
+
+/**
+ * Static helper methods for the servlet response.
+ * 
+ * @version $Id$
+ */
+public class UtilsResponse {
+
+	/**
+	 * Assembles a URL with omitted filename.
+	 * 
+	 * @see #fileUrl(String, ResourceType, String, String)
+	 */
+	public static String getUrl(String userFilesPath, ResourceType type,
+			String currentFolder) {
+		return fileUrl(userFilesPath, type, currentFolder, null);
+	}
+
+	/**
+	 * 
+	 * Assembles a file URL for the File Browser. Simply appends parameters to a
+	 * string buffer with reasonable parameter checking.
+	 * 
+	 * @param userFilesPath
+	 *            the current userfiles path (may be null)
+	 * @param type
+	 *            the current resource type
+	 * @param currentFolder
+	 *            the selected current folder
+	 * @param filename
+	 *            the current chosen file (may be null)
+	 * @return assembled url for the File Browser
+	 */
+	public static String fileUrl(String userFilesPath, ResourceType type,
+			String currentFolder, String filename) {
+
+		StringBuffer sb = new StringBuffer();
+		if (Utils.isNotEmpty(userFilesPath))
+			sb.append(userFilesPath);
+		sb.append(type.getPath());
+		sb.append(currentFolder);
+		if (Utils.isNotEmpty(filename))
+			sb.append(filename);
+
+		return sb.toString();
+	}
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tool/XHtmlTagTool.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tool/XHtmlTagTool.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tool/XHtmlTagTool.java	(revision 4150)
@@ -0,0 +1,144 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.tool;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Java representation of an XHTML tag.
+ * <p>
+ * Usage:
+ * <pre>
+ * XHtmlTagTool tag = XHtmlTagTool(&quot;a&quot;, &quot;link&quot;);
+ * tag.addAttribute(&quot;href&quot;, &quot;http://google.com&quot;);
+ * tag.toString();: &lt;a href=&quot;http://google.com&quot;&gt;link&lt;/a&gt;
+ * </pre>
+ * </p>
+ * <em>Note</em>:
+ * <ul>
+ * <li>Attributes are not ordered.</li>
+ * <li>If you want to avoid self-closing tags without supplying a value, set
+ * {@link #SPACE} as the tag's value.</li>
+ * </ul>
+ * 
+ * @version $Id$
+ */
+public class XHtmlTagTool {
+
+	/** Name of the tag. */
+	private String name;
+
+	/** Container for the attributes. */
+	private Map<String, String> attributes = new HashMap<String, String>();
+
+	/** Value of the tag. */
+	private String value;
+
+	/** Indicator to uses non self-closing tag. */
+	public static final String SPACE = " ";
+
+	/**
+	 * Class constructor with tag name.
+	 * 
+	 * @param name
+	 *            the tag name of the new XHtmlTagTool
+	 * @throws IllegalArgumentException
+	 *             if <code>name</code> is empty
+	 */
+	public XHtmlTagTool(final String name) {
+		if (Utils.isEmpty(name))
+			throw new IllegalArgumentException(
+					"Parameter 'name' shouldn't be empty!");
+		this.name = name;
+	}
+
+	/**
+	 * Class constructor with name and value.
+	 * 
+	 * @param name
+	 *             the tag name of the new XHtmlTagTool
+	 * @param value
+	 *            the tag value of the new XHtmlTagTool which is the tag body
+	 * @throws IllegalArgumentException
+	 *             if <code>name</code> is empty
+	 */
+	public XHtmlTagTool(final String name, final String value) {
+		this(name);
+		this.value = value;
+	}
+
+	/**
+	 * Sets the tag value.
+	 * 
+	 * @param value
+	 *            the tag value which is the tag body
+	 */
+	public void setValue(final String value) {
+		this.value = value;
+	}
+
+	/**
+	 * Adds an attribute to this tag.
+	 * 
+	 * @param name
+	 *            attribute name
+	 * @param value
+	 *            attribute value
+	 * @throws IllegalArgumentException
+	 *             if <code>name</code> is empty
+	 */
+	public void addAttribute(final String name, final String value) {
+		if (Utils.isEmpty(name))
+			throw new IllegalArgumentException("Name is null or empty");
+		attributes.put(name, value);
+	}
+
+	/**
+	 * Creates the HTML representation of this tag. It follows the XHTML
+	 * standard.
+	 * 
+	 * @return HTML representation of this tag
+	 */
+	@Override
+	public String toString() {
+		StringBuffer tag = new StringBuffer();
+
+		// open tag
+		tag.append("<").append(name);
+
+		// add attributes
+		for (String key : attributes.keySet()) {
+			String val = attributes.get(key);
+			tag.append(' ').append(key).append('=').append('\"').append(val)
+					.append('\"');
+		}
+
+		// close the tag
+		if (Utils.isNotEmpty(value)) {
+			tag.append(">").append(value).append("</").append(name).append('>');
+		} else
+			tag.append(" />");
+
+		return tag.toString();
+	}
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tool/package-info.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tool/package-info.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/java/net/fckeditor/tool/package-info.java	(revision 4150)
@@ -0,0 +1,27 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+
+/**
+ * Various tool classes.
+ * 
+ * @version $Id$
+ */
+package net.fckeditor.tool;
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/javadoc/net/fckeditor/connector/sequence-diagram.src
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/javadoc/net/fckeditor/connector/sequence-diagram.src	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/javadoc/net/fckeditor/connector/sequence-diagram.src	(revision 4150)
@@ -0,0 +1,28 @@
+Generated with http://www.websequencediagrams.com/
+
+participant Request as R
+participant ConnectorServlet as CS
+participant ThreadLocalData as TLD
+participant Dispatcher as D
+participant Connector as C
+
+R -> CS: do*(request, response)
+note right of R: * (asterisk) denotes\n'Get' or 'Post'
+activate CS
+CS -> TLD: beginRequest(request)
+activate TLD
+CS -> D: do*(request)
+activate D
+D -> C: call method
+activate C
+C --> D: response (if any) or\nraise exception
+deactivate C
+D --> CS: response
+deactivate D
+note over TLD: End the request to\nprevent memory leaks
+TLD --> CS: "endRequest()  "
+destroy TLD
+CS --> R: response
+deactivate CS
+
+Style 'qsd', Scale 100 %
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/javadoc/net/fckeditor/requestcycle/sequence-diagram.src
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/javadoc/net/fckeditor/requestcycle/sequence-diagram.src	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/javadoc/net/fckeditor/requestcycle/sequence-diagram.src	(revision 4150)
@@ -0,0 +1,35 @@
+Generated with http://www.websequencediagrams.com/
+
+participant Dispatcher as D
+participant ThreadLocalData as TLD
+participant UserAction as UA
+participant UserPathBuilder as UPB
+participant Connector as C
+
+D -> TLD: getContext()
+activate TLD
+TLD -> D: context
+deactivate TLD
+D -> UA: is*Enabled(request)
+note right of D: * (asterisk) denotes\n'CreateFolder',\n'FileBrowsing' or 'FileUpload'
+activate UA
+UA -> D: boolean value
+deactivate UA
+D --> C: requested connector method
+activate C
+C --> TLD: getRequest()
+activate TLD
+TLD --> C: request
+deactivate TLD
+C --> UPB: getUserFilesAbsolutePath(request)
+activate UPB
+UPB --> C: path
+deactivate UPB
+C --> D: response (if any) or\nraise exception
+deactivate C
+D --> UPB: getUserFilesPath(request)
+activate UPB
+UPB --> D: path
+deactivate UPB
+
+Style 'qsd', Scale 100 %
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/resources/META-INF/FCKeditor.tld
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/resources/META-INF/FCKeditor.tld	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/resources/META-INF/FCKeditor.tld	(revision 4150)
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ * @version: $Id$
+-->
+<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
+	http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+	version="2.0">
+	<description>
+		The FCKeditor Tag Library offers a very convenient way to create
+		several FCKeditor instances with different configurations.
+		Additionally, you can check for user-based capabilities.
+	</description>
+	<display-name>FCKeditor Tag Library</display-name>
+	<tlib-version>2.6</tlib-version>
+	<short-name>FCK</short-name>
+	<uri>http://java.fckeditor.net</uri>
+	<tag>
+		<description>
+			Creates a FCKeditor instance with the given parameters. Any
+			parameter except instanceName which is empty or contains
+			whitespace only will be ignored.
+		</description>
+		<display-name>editor</display-name>
+		<name>editor</name>
+		<tag-class>net.fckeditor.tags.EditorTag</tag-class>
+		<body-content>JSP</body-content>
+		<attribute>
+			<description>
+				The unique instance name under which the editor can be
+				retrieved through the API.
+			</description>
+			<name>instanceName</name>
+			<required>true</required>
+			<rtexprvalue>true</rtexprvalue>
+			<type>java.lang.String</type>
+		</attribute>
+		<attribute>
+			<description>
+				Width of the FCKeditor instance in the browser window.
+			</description>
+			<name>width</name>
+			<rtexprvalue>true</rtexprvalue>
+			<type>java.lang.String</type>
+		</attribute>
+		<attribute>
+			<description>
+				Height of the FCKeditor instance in the browser window.
+			</description>
+			<name>height</name>
+			<rtexprvalue>true</rtexprvalue>
+			<type>java.lang.String</type>
+		</attribute>
+		<attribute>
+			<description>
+				The toolbar set which shall be displayed to the user.
+			</description>
+			<name>toolbarSet</name>
+			<rtexprvalue>true</rtexprvalue>
+			<type>java.lang.String</type>
+		</attribute>
+		<attribute>
+			<description>
+				The path/folder in which the editor is deployed under
+				the given context (e.g. '/fckeditor'). The context path will be
+				attached automatically.
+			</description>
+			<name>basePath</name>
+			<rtexprvalue>true</rtexprvalue>
+			<type>java.lang.String</type>
+		</attribute>
+		<attribute>
+			<description>
+				Passes any content as-is to the FCKeditor document. Use the
+				jsp:attribute tag for large inline content.
+			</description>
+			<name>value</name>
+			<rtexprvalue>true</rtexprvalue>
+			<type>java.lang.String</type>
+		</attribute>
+		<example><![CDATA[
+<FCK:editor instanceName="editorDefault" height="500px" />]]>
+		</example>
+	</tag>
+	<tag>
+		<description>
+			Sets a config property of the editor to the supplied value.
+			You may provide any attribute you want for the editor. Set
+			at least one attribute per tag or several attributes with
+			one tag. This tag can only be nested within an editor tag.
+			For all configuration options click
+			<![CDATA[<a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options">here</a>]]>.
+		</description>
+		<display-name>config</display-name>
+		<name>config</name>
+		<tag-class>net.fckeditor.tags.ConfigTag</tag-class>
+		<body-content>empty</body-content>
+		<dynamic-attributes>true</dynamic-attributes>
+		<example>
+			<![CDATA[
+<FCK:config SkinPath="/skins/silver/" AutoDetectLanguage="true" />]]>
+		</example>
+	</tag>
+	<tag>
+		<description>
+			Displays session-dependent and compatibility-related
+			information. The messages can be localized.
+		</description>
+		<display-name>check</display-name>
+		<name>check</name>
+		<tag-class>net.fckeditor.tags.CheckTag</tag-class>
+		<body-content>empty</body-content>
+		<attribute>
+			<description>
+				Provide the feature name you want to check. Valid
+				features are [FileUpload, GetResources, FileBrowsing (deprecated),
+				CompatibleBrowser, CreateFolder, FolderCreation (deprecated)]
+			</description>
+			<name>command</name>
+			<required>true</required>
+			<type>java.lang.String</type>
+		</attribute>
+		<example><![CDATA[
+<FCK:check command="FileUpload" />
+<FCK:check command="CompatibleBrowser" />]]>
+		</example>
+	</tag>
+</taglib>
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/resources/net/fckeditor/handlers/default.properties
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/resources/net/fckeditor/handlers/default.properties	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/resources/net/fckeditor/handlers/default.properties	(revision 4150)
@@ -0,0 +1,66 @@
+#
+# FCKeditor - The text editor for Internet - http://www.fckeditor.net
+# Copyright (C) 2004-2009 Frederico Caldeira Knabben
+#
+# == BEGIN LICENSE ==
+#
+# Licensed under the terms of any of the following licenses at your
+# choice:
+#
+#  - GNU General Public License Version 2 or later (the "GPL")
+#    http://www.gnu.org/licenses/gpl.html
+#
+#  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+#    http://www.gnu.org/licenses/lgpl.html
+#
+#  - Mozilla Public License Version 1.1 or later (the "MPL")
+#    http://www.mozilla.org/MPL/MPL-1.1.html
+#
+# == END LICENSE ==
+#
+# Default properties for FCKeditor.Java
+#
+# @version $Id$ 
+
+# default allowed extensions settings
+connector.resourceType.file.extensions.allowed = 7z|aiff|asf|avi|bmp|csv|doc|fla|flv|gif|gz|gzip|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|ods|odt|pdf|png|ppt|pxd|qt|ram|rar|rm|rmi|rmvb|rtf|sdc|sitd|swf|sxc|sxw|tar|tgz|tif|tiff|txt|vsd|wav|wma|wmv|xls|xml|zip
+connector.resourceType.image.extensions.allowed = bmp|gif|jpeg|jpg|png
+connector.resourceType.flash.extensions.allowed = swf|fla
+connector.resourceType.media.extensions.allowed = aiff|asf|avi|bmp|fla|flv|gif|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|png|qt|ram|rm|rmi|rmvb|swf|tif|tiff|wav|wma|wmv
+
+# default resource type paths
+connector.resourceType.file.path = /file
+connector.resourceType.image.path = /image
+connector.resourceType.flash.path = /flash
+connector.resourceType.media.path = /media
+
+# Due to security issues with Apache modules, it is recommended to leave this 
+# setting enabled.
+connector.forceSingleExtension = true
+
+# base URL path for the userfiles
+connector.userFilesPath = /userfiles
+
+# base system path on the backend for the userfiles
+connector.userFilesAbsolutePath = /userfiles
+
+# Instructs the Connector to check, if the uploaded image is really one
+connector.secureImageUploads = true
+
+# directory of the editor relative to the context root
+fckeditor.basePath = /fckeditor
+
+# default height of the editor
+fckeditor.height = 200
+
+# default toolbar set of the editor
+fckeditor.toolbarSet = Default
+
+# default width of the editor
+fckeditor.width = 100%
+
+# default implementations
+connector.impl = net.fckeditor.connector.impl.ContextConnector
+connector.userActionImpl = net.fckeditor.requestcycle.impl.DisabledUserAction
+connector.userPathBuilderImpl = net.fckeditor.requestcycle.impl.ContextPathBuilder
+localization.localeResolverImpl = net.fckeditor.localization.impl.AcceptLanguageHeaderResolver
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/main/resources/net/fckeditor/localization/default_messages.properties
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/main/resources/net/fckeditor/localization/default_messages.properties	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/main/resources/net/fckeditor/localization/default_messages.properties	(revision 4150)
@@ -0,0 +1,43 @@
+#
+# FCKeditor - The text editor for Internet - http://www.fckeditor.net
+# Copyright (C) 2004-2009 Frederico Caldeira Knabben
+#
+# == BEGIN LICENSE ==
+#
+# Licensed under the terms of any of the following licenses at your
+# choice:
+#
+#  - GNU General Public License Version 2 or later (the "GPL")
+#    http://www.gnu.org/licenses/gpl.html
+#
+#  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+#    http://www.gnu.org/licenses/lgpl.html
+#
+#  - Mozilla Public License Version 1.1 or later (the "MPL")
+#    http://www.mozilla.org/MPL/MPL-1.1.html
+#
+# == END LICENSE ==
+#
+# Default messages for FCKeditor.Java
+#
+# @version $Id$
+
+editor.compatibleBrowser.no = Your browser is not compatible
+editor.compatibleBrowser.yes = Your browser is fully compatible
+
+connector.fileUpload.disabled = You are not authorized to upload files!
+connector.fileUpload.enabled = You are authorized to upload files!
+connector.fileUpload.file_renamed_warning = Your file was uploaded successfully but has been renamed to \\''{0}\\''.
+connector.fileUpload.invalid_file_type_specified = The uploaded has a wrong file type (extension).
+connector.fileUpload.write_error = The specified file could not be uploaded successfully, please try again!
+connector.getResources.disabled = You are not authorized to browse/list files and/or folders!
+connector.getResources.enabled = You are authorized to browse/list files and/or folders!
+connector.getResources.read_error = The selected resources could not be read successfully, please try again!
+connector.createFolder.disabled = You are not authorized to create folders!
+connector.createFolder.enabled = You are authorized to create folders!
+connector.createFolder.invalid_new_folder_name_specified = Invalid new folder name specified
+connector.createFolder.folder_already_exists_error = The specified folder already exists
+connector.createFolder.write_error = The specified folder could not be created successfully, please try again!
+connector.invalid_command_specified = Invalid command specified
+connector.invalid_resource_type_specified = Invalid resource type specified
+connector.invalid_current_folder_specified = Invalid current folder specified
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/site/resources/css/site.css
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/site/resources/css/site.css	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/site/resources/css/site.css	(revision 4150)
@@ -0,0 +1,1 @@
+@import url(../../css/site.css);
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/FCKeditorTest.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/FCKeditorTest.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/FCKeditorTest.java	(revision 4150)
@@ -0,0 +1,73 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.junit.Test;
+import static org.mockito.Mockito.*;
+
+/**
+ * @version $Id$
+ */
+public class FCKeditorTest {
+	
+	@Test(expected = NullPointerException.class)
+	public void testNullRequest() {
+		new FCKeditor(null, "name");
+	}
+	
+	@Test(expected = IllegalArgumentException.class)
+	public void testEmptyInstanceName() {
+		HttpServletRequest request = mock(HttpServletRequest.class);
+		
+		new FCKeditor(request, null);
+	}
+	
+	@Test(expected = IllegalArgumentException.class)
+	public void testEmptyInstanceName02() {
+		HttpServletRequest request = mock(HttpServletRequest.class);
+		
+		new FCKeditor(request, "");
+	}
+	
+	@Test(expected = IllegalArgumentException.class)
+	public void testIllegalInstanceName() {
+		HttpServletRequest request = mock(HttpServletRequest.class);
+		
+		new FCKeditor(request, "my instance");
+	}
+	
+	@Test(expected = IllegalArgumentException.class)
+	public void testIllegalInstanceName02() {
+		HttpServletRequest request = mock(HttpServletRequest.class);
+		
+		new FCKeditor(request, "01_instance");
+	}
+	
+	@Test
+	public void testValidInstanceName() {
+		HttpServletRequest request = mock(HttpServletRequest.class);
+		
+		new FCKeditor(request, "myInstance");
+	}
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/handlers/CommandTest.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/handlers/CommandTest.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/handlers/CommandTest.java	(revision 4150)
@@ -0,0 +1,119 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.handlers;
+
+import static org.junit.Assert.*;
+import org.junit.Test;
+
+/**
+ * Tests for {@link Command}.
+ * 
+ * @version $Id$
+ */
+public class CommandTest {
+
+	@Test
+	public void valueOf01() {
+		assertEquals(Command.FILE_UPLOAD, Command
+				.valueOf("FileUpload"));
+	}
+
+	@Test
+	public void valueOf02() {
+		assertEquals(Command.QUICK_UPLOAD, Command
+				.valueOf("QuickUpload"));
+	}
+
+	@Test
+	public void valueOf03() {
+		assertEquals(Command.CREATE_FOLDER, Command
+				.valueOf("CreateFolder"));
+	}
+
+	@Test
+	public void valueOf04() {
+		assertEquals(Command.GET_FOLDERS, Command
+				.valueOf("GetFolders"));
+	}
+
+	@Test
+	public void valueOf05() {
+		assertEquals(Command.GET_FOLDERS_AND_FILES, Command
+				.valueOf("GetFoldersAndFiles"));
+	}
+
+	@Test(expected = NullPointerException.class)
+	public void valueOfStringNull() {
+		Command.valueOf(null);
+	}
+
+	@Test(expected = IllegalArgumentException.class)
+	public void valueOfInvalidCommand() {
+		Command.valueOf("GetAll");
+	}
+
+	@Test
+	public void getCommandNull() {
+		Command command = Command.getCommand(null);
+		assertNull(command);
+	}
+
+	@Test
+	public void getCommandInvalid() {
+		Command command = Command.getCommand("DeleteFolders");
+		assertNull(command);
+	}
+
+	@Test
+	public void getCommandValid() {
+		Command actual = Command.getCommand("FileUpload");
+		assertEquals(Command.FILE_UPLOAD, actual);
+	}
+
+	@Test
+	public void equalsNot01() {
+		assertFalse(Command.GET_FOLDERS
+				.equals(Command.FILE_UPLOAD));
+	}
+
+	@Test
+	public void equalsNot02() {
+		assertFalse(Command.GET_FOLDERS.equals(new Object()));
+	}
+
+	@Test
+	public void hashCode01() {
+		assertEquals("GetFoldersAndFiles".hashCode(),
+				Command.GET_FOLDERS_AND_FILES.hashCode());
+	}
+
+	@Test
+	public void hashCode02() {
+		assertNotSame(-1, Command.FILE_UPLOAD.hashCode());
+	}
+
+	@Test
+	public void toString01() {
+		assertEquals("GetFoldersAndFiles", Command.GET_FOLDERS_AND_FILES
+				.toString());
+	}
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/handlers/ExtensionsHandlerTest.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/handlers/ExtensionsHandlerTest.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/handlers/ExtensionsHandlerTest.java	(revision 4150)
@@ -0,0 +1,60 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.handlers;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+/**
+ * Tests for {@link ExtensionsHandler}.
+ *
+ * @version $Id$
+ * @see {@link ResourceTypeTest}
+ * @deprecated same reason as in {@link ExtensionsHandler}
+ */
+@Deprecated
+public class ExtensionsHandlerTest {
+	
+	@Test
+	public void testIsAllowed01() {
+		ResourceType type = ResourceType.FILE;
+		ExtensionsHandler.setExtensionsAllowed(type, "a");
+		ExtensionsHandler.setExtensionsDenied(type, "b");
+		assertTrue(ExtensionsHandler.getExtensionsAllowed(type).isEmpty());
+		assertTrue(ExtensionsHandler.getExtensionsDenied(type).contains("b"));
+		assertFalse(ExtensionsHandler.isAllowed(type, "b"));
+		assertTrue(ExtensionsHandler.isAllowed(type, "a"));
+		assertTrue(ExtensionsHandler.isAllowed(type, "c"));
+	}
+	
+	@Test
+	public void testIsAllowed02() {
+		ResourceType type = ResourceType.FILE;
+		ExtensionsHandler.setExtensionsAllowed(type, "a|b|c");
+		assertTrue(ExtensionsHandler.isAllowed(type, "a"));
+		assertTrue(ExtensionsHandler.isAllowed(type, "b"));
+		assertTrue(ExtensionsHandler.isAllowed(type, "c"));
+		assertFalse(ExtensionsHandler.isAllowed(type, "d"));
+	}
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/handlers/ResourceTypeTest.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/handlers/ResourceTypeTest.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/handlers/ResourceTypeTest.java	(revision 4150)
@@ -0,0 +1,106 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.handlers;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertNull;
+
+import org.junit.Test;
+
+/**
+ * Tests for {@link ResourceTypeHandler}.
+ * 
+ * @version $Id: ResourceTypeTest.java 1585 2008-02-21 18:13:09Z th-schwarz $
+ */
+public class ResourceTypeTest {
+
+	@Test
+	public void getType01() throws Exception {
+		assertNull(ResourceType.getResourceType("xyz"));
+	}
+
+	@Test
+	public void getType02() throws Exception {
+		assertEquals(ResourceType.FILE, ResourceType.getResourceType("File"));
+	}
+
+	@Test
+	public void getType03() throws Exception {
+		assertNotSame(ResourceType.IMAGE, ResourceType.getResourceType("ImaGe"));
+	}
+	
+	@Test
+	public void getType04() throws Exception {
+		assertNull(ResourceType.getResourceType(null));
+	}
+	
+	@Test
+	public void getType05() throws Exception {
+		assertNull(ResourceType.getResourceType(""));
+	}
+	
+	@Test
+	public void isValid01() throws Exception {
+		assertFalse(ResourceType.isValidType("1234"));
+	}
+
+	@Test
+	public void isValid02() throws Exception {
+		assertFalse(ResourceType.isValidType("fLash"));
+	}
+
+	@Test
+	public void isValid03() throws Exception {
+		assertFalse(ResourceType.isValidType("MeDiA"));
+	}
+
+	@Test
+	public void getDefaultType01() throws Exception {
+		assertEquals(ResourceType.FILE, ResourceType
+				.getDefaultResourceType("wrong-type"));
+	}
+
+	@Test
+	public void getDefaultType02() throws Exception {
+		assertNotSame(ResourceType.FLASH, ResourceType
+				.getDefaultResourceType("flAsh"));
+	}
+	
+	@Test
+	public void getDefaultType03() throws Exception {
+		assertEquals(ResourceType.FILE, ResourceType
+				.getDefaultResourceType(null));
+	}
+	
+	@Test
+	public void getDefaultType04() throws Exception {
+		assertEquals(ResourceType.FILE, ResourceType
+				.getDefaultResourceType(""));
+	}
+	
+	@Test
+	public void getDefaultType05() throws Exception {
+		assertNotSame(ResourceType.FILE, ResourceType
+				.getDefaultResourceType("Image"));
+	}
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/response/UploadResponseTest.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/response/UploadResponseTest.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/response/UploadResponseTest.java	(revision 4150)
@@ -0,0 +1,98 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.response;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+/**
+ * Tests for {@link UploadResponse}.
+ * 
+ * @version: $Id$
+ */
+public class UploadResponseTest {
+
+	@Test(expected = IllegalArgumentException.class)
+	public void noArguments() throws Exception {
+		new UploadResponse();
+	}
+
+	@Test(expected = IllegalArgumentException.class)
+	public void tooManyArguments() throws Exception {
+		new UploadResponse(101, "/some/url/file.txt", "file.txt",
+				"something's wrong", "arg no. 5");
+	}
+
+	@Test(expected = IllegalArgumentException.class)
+	public void notANumber() throws Exception {
+		new UploadResponse("1");
+	}
+
+	@Test
+	public void onlyErrorNumber() throws Exception {
+		UploadResponse actual = new UploadResponse(
+				UploadResponse.EN_INVALID_FILE_TYPE_ERROR);
+		String expected = "<script type=\"text/javascript\">\n"
+				+ "(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();\n"
+				+ "window.parent.OnUploadCompleted(202);\n</script>";
+		assertEquals(expected, actual.toString());
+	}
+	
+	@Test
+	public void fourArguments() throws Exception {
+		UploadResponse actual = new UploadResponse(UploadResponse.EN_OK,"/fckeditor-java/userfiles/image/fredck.jpg");
+		String expected = "<script type=\"text/javascript\">\n"
+				+ "(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();\n"
+				+ "window.parent.OnUploadCompleted(0,'/fckeditor-java/userfiles/image/fredck.jpg');\n</script>";
+		assertEquals(expected, actual.toString());
+	}
+	
+	@Test
+	public void renamedFile() throws Exception {
+		UploadResponse actual = new UploadResponse(UploadResponse.EN_FILE_RENAMED_WARNING,"/fckeditor-java/userfiles/image/hacked_php.txt","hacked_php.txt");
+		String expected = "<script type=\"text/javascript\">\n"
+				+ "(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();\n"
+				+ "window.parent.OnUploadCompleted(201,'/fckeditor-java/userfiles/image/hacked_php.txt','hacked_php.txt');\n</script>";
+		assertEquals(expected, actual.toString());
+	}
+
+	@Test
+	public void customMessage() throws Exception {
+		UploadResponse actual = new UploadResponse(UploadResponse.EN_CUSTOM_ERROR);
+		actual.setCustomMessage("some error");
+		String expected = "<script type=\"text/javascript\">\n"
+				+ "(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();\n"
+				+ "window.parent.OnUploadCompleted(1,'','','some error');\n</script>";
+		assertEquals(expected, actual.toString());
+	}
+
+
+	@Test
+	public void nullArguments() throws Exception {
+		UploadResponse actual = new UploadResponse(UploadResponse.EN_CUSTOM_ERROR,null,null,null);
+		String expected = "<script type=\"text/javascript\">\n"
+				+ "(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();\n"
+				+ "window.parent.OnUploadCompleted(1,'','','');\n</script>";
+		assertEquals(expected, actual.toString());
+	}
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/tool/CompatibilityTest.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/tool/CompatibilityTest.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/tool/CompatibilityTest.java	(revision 4150)
@@ -0,0 +1,123 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.tool;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+/**
+ * Tests for {@link Compatibility}.<br />
+ * User-Agent-Strings are taken from: http://www.useragentstring.com/pages/useragentstring.php <br>
+ * 
+ * @version $Id$
+ */
+public class CompatibilityTest {
+
+	@Test
+	public void testIE4Win() throws Exception {
+	    assertFalse(Compatibility.check("Mozilla/4.0 (compatible; MSIE 4.01; Windows NT 5.0)"));
+    }
+	
+	@Test
+	public void testIE522Mac() throws Exception {
+	    assertFalse(Compatibility.check("Mozilla/4.0 (compatible; MSIE 5.22; Mac_PowerPC)"));
+    }
+	
+	@Test
+	public void testIE55Win98() throws Exception {
+	    assertTrue(Compatibility.check("Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)"));
+    }
+
+	@Test
+	public void testIE60WinNT() throws Exception {
+	    assertTrue(Compatibility.check("Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1)"));
+    }
+	
+	@Test
+	public void testIE70WinVista() throws Exception {
+	    assertTrue(Compatibility.check("Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0;)"));
+    }
+
+	@Test
+	public void testIE70bWinVista() throws Exception {
+	    assertTrue(Compatibility.check("Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0)"));
+    }
+	
+	@Test
+	public void testSafari204OSX() throws Exception {
+	    assertFalse(Compatibility.check("Mozilla/5.0 (Macintosh; U; PPC Mac OS X; sv-se) AppleWebKit/419 (KHTML, like Gecko) Safari/419.3"));
+    }
+
+	@Test
+	public void testSafari30WinXP() throws Exception {
+	    assertTrue(Compatibility.check("Mozilla/5.0 (Windows; U; Windows NT 5.2; pt) AppleWebKit/522.11.3 (KHTML, like Gecko) Version/3.0 Safari/522.11.3"));
+    }
+
+	@Test
+	public void testSafari302OSX() throws Exception {
+	    assertTrue(Compatibility.check("Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/522+ (KHTML, like Gecko) Version/3.0.2 Safari/522.12"));
+    }
+
+	@Test
+	public void testSafari31OSX() throws Exception {
+	    assertTrue(Compatibility.check("Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_2; en-au) AppleWebKit/525.8+ (KHTML, like Gecko) Version/3.1 Safari/525.6"));
+    }
+
+	@Test
+	public void testFirefox200112OSX() throws Exception {
+	    assertTrue(Compatibility.check("Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12"));
+    }
+	
+	@Test
+	public void testFirefox30Linux() throws Exception {
+		assertTrue(Compatibility.check("Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9pre) Gecko/2008040318 Firefox/3.0pre (Swiftfox)"));
+	}
+
+	@Test
+	public void testFirefox1509LinuxDebian() throws Exception {
+	    assertTrue(Compatibility.check("Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/1.5.0.9 (Debian-2.0.0.9-2)"));
+    }
+	
+	@Test
+	public void testOper925Win2k() throws Exception {
+	    assertFalse(Compatibility.check("Opera/9.25 (Windows NT 5.0; U; en)"));
+    }
+	
+	@Test
+	public void testOpera854WinNT() throws Exception {
+	    assertFalse(Compatibility.check("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; de) Opera 8.54"));
+    }
+	
+	@Test
+	public void testOpera95OSX() throws Exception {
+		assertTrue(Compatibility.check("Opera/9.50 (Macintosh; Intel Mac OS X; U; en)"));   
+    }
+	
+	@Test
+	public void testOpera95WinVista() throws Exception {
+		assertTrue(Compatibility.check("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 6.0; en) Opera 9.50"));   
+    }
+	
+	@Test
+	public void testEpaphany220Linux() throws Exception {
+		assertTrue(Compatibility.check("Mozilla/5.0 (X11; U; Linux i686; en; rv:1.9b3) Gecko Epiphany/2.20"));
+	}
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/tool/UtilsFileTest.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/tool/UtilsFileTest.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/tool/UtilsFileTest.java	(revision 4150)
@@ -0,0 +1,213 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.tool;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+
+/**
+ * Tests for {@link UtilsFile}.
+ *
+ * @version $Id$
+ */
+public class UtilsFileTest {
+
+	@Test
+    public void isSingleExtension01() {
+    	boolean condition = UtilsFile.isSingleExtension("hacked.txt");
+    	assertTrue(condition);
+    }
+
+	@Test
+    public void isSingleExtension02() {
+    	boolean condition = UtilsFile.isSingleExtension("hacked.php_txt");
+    	assertTrue(condition);
+    }
+
+	@Test
+    public void isSingleExtension03() {
+    	boolean condition = UtilsFile.isSingleExtension("hacked.php.txt");
+    	assertFalse(condition);
+    }
+
+	@Test
+    public void isSingleExtension04() {
+    	boolean condition = UtilsFile.isSingleExtension("hacked.txt.");
+    	assertFalse(condition);
+    }
+
+	@Test
+    public void isSingleExtension05() {
+    	boolean condition = UtilsFile.isSingleExtension("hacked..txt");
+    	assertFalse(condition);
+    }
+
+	@Test
+    public void forceSingleExtension01() {
+    	String actual = UtilsFile.forceSingleExtension("hacked.txt");
+    	assertEquals("hacked.txt", actual);
+    }
+
+	@Test
+    public void forceSingleExtension02() {
+    	String actual = UtilsFile.forceSingleExtension("hacked.php_txt");
+    	assertEquals("hacked.php_txt", actual);
+    }
+
+	@Test
+    public void forceSingleExtension03() {
+    	String actual = UtilsFile.forceSingleExtension("hacked.php.txt");
+    	assertEquals("hacked_php.txt", actual);
+    }
+
+	@Test
+    public void forceSingleExtension04() {
+    	String actual = UtilsFile.forceSingleExtension("hacked..txt");
+    	assertEquals("hacked_.txt", actual);
+    }
+
+	@Test
+    public void isValidPath00() {
+    	String path = null;
+    	boolean condition = UtilsFile.isValidPath(path);
+    	assertFalse(condition);
+    }
+	
+	@Test
+    public void isValidPath01() {
+    	String path = "";
+    	boolean condition = UtilsFile.isValidPath(path);
+    	assertFalse(condition);
+    }
+
+	@Test
+    public void isValidPath02() {
+    	String path = "/";
+    	boolean condition = UtilsFile.isValidPath(path);
+    	assertTrue(condition);
+    }
+
+	@Test
+    public void isValidPath03() {
+    	String path = "/./";
+    	boolean condition = UtilsFile.isValidPath(path);
+    	assertFalse(condition);
+    }
+
+	@Test
+    public void isValidPath04() {
+    	String path = "/newf/..";
+    	boolean condition = UtilsFile.isValidPath(path);
+    	assertFalse(condition);
+    }
+
+	@Test
+    public void isValidPath05() {
+    	String path = "/../";
+    	boolean condition = UtilsFile.isValidPath(path);
+    	assertFalse(condition);
+    }
+
+	@Test
+    public void isValidPath06() {
+    	String path = "/stuff/../..";
+    	boolean condition = UtilsFile.isValidPath(path);
+    	assertFalse(condition);
+    }
+
+	@Test
+    public void isValidPath07() {
+    	String path = "/my/stuff/../";
+    	boolean condition = UtilsFile.isValidPath(path);
+    	assertFalse(condition);
+    }
+
+	@Test
+    public void isValidPath08() {
+    	String path = "/my/stuff/";
+    	boolean condition = UtilsFile.isValidPath(path);
+    	assertTrue(condition);
+    }
+
+	@Test
+    public void isValidPath09() {
+    	String path = "/my/stuff";
+    	boolean condition = UtilsFile.isValidPath(path);
+    	assertFalse(condition);
+    }
+
+	@Test
+    public void isValidPath10() {
+    	String path = "my/stuff/";
+    	boolean condition = UtilsFile.isValidPath(path);
+    	assertFalse(condition);
+    }
+	
+	@Test
+    public void isValidPath11() {
+    	String path = "/some/pa\\th/";
+    	boolean condition = UtilsFile.isValidPath(path);
+    	assertFalse(condition);
+    }
+	
+	@Test
+    public void isValidPath12() {
+    	String path = "/\\/";
+    	boolean condition = UtilsFile.isValidPath(path);
+    	assertFalse(condition);
+    }
+	
+	@Test
+    public void isValidPath13() {
+    	String path = "/.hidden/";
+    	boolean condition = UtilsFile.isValidPath(path);
+    	assertFalse(condition);
+    }
+
+	@Test
+    public void sanitizeFolder01() {
+    	assertEquals("a_b_c_d_e_f_g_h_i_", UtilsFile.sanitizeFolderName("a.b|c<d>e:f?g*h<i>"));
+    }
+	
+	@Test
+	public void sanitizeFolder02() {
+		assertEquals("a_b_c_d_e_f_g_h_i_", UtilsFile.sanitizeFolderName("a.b|c\u007Fd>e:f\u0005g*h<i>"));
+	}
+
+	@Test
+    public void sanitizeFile01() {
+    	assertEquals("b_c_d_e_f_g_h_i_", UtilsFile.sanitizeFileName("b|c<d>e:f?g*h<i>"));
+    }
+
+	@Test
+    public void sanitizeFile02() {
+    	assertEquals("name_ext1.ext2", UtilsFile.sanitizeFileName("name.ext1.ext2"));
+    }
+
+	@Test
+	public void sanitizeFile03() {
+		assertEquals("b_c_d_e_f_g_h_i_", UtilsFile.sanitizeFileName("b|c\u007Fd>e:f\u0005g*h<i>"));
+	}
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/tool/UtilsTest.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/tool/UtilsTest.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/tool/UtilsTest.java	(revision 4150)
@@ -0,0 +1,132 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.tool;
+
+import static org.junit.Assert.*;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.junit.Test;
+
+/**
+ * Tests for {@link Utils}.
+ * 
+ * @version $Id$
+ */
+public class UtilsTest {
+
+	@Test
+	public void getSet01() {
+		Set<String> set = new HashSet<String>();
+		set.add("a");
+		set.add("ab");
+		set.add("c");
+
+		Set<String> newSet = Utils.getSet("a|Ab|c", "|");
+		assertArrayEquals(set.toArray(), newSet.toArray());
+	}
+
+	@Test
+	public void getSet02() {
+		Set<String> set = new HashSet<String>();
+		set.add("png");
+		set.add("jpg");
+		set.add("gif");
+
+		Set<String> newSet = Utils.getSet("png|jpg|gif");
+		assertArrayEquals(set.toArray(), newSet.toArray());
+	}
+
+	@Test
+	public void getSet03() {
+		Set<String> set = Utils.getSet(null);
+		assertTrue(set != null);
+		assertTrue(set.isEmpty());
+	}
+
+	@Test
+	public void getSet04() {
+		Set<String> set = Utils.getSet("");
+		assertTrue(set != null);
+		assertTrue(set.isEmpty());
+	}
+
+	@Test
+	public void isBlank01() {
+		assertTrue(Utils.isBlank(null));
+	}
+
+	@Test
+	public void isBlank02() {
+		assertTrue(Utils.isBlank(""));
+	}
+
+	@Test
+	public void isBlank03() {
+		assertTrue(Utils.isBlank("   "));
+	}
+
+	@Test
+	public void isBlank04() {
+		assertTrue(Utils.isBlank("  \t  \n \r"));
+	}
+
+	@Test
+	public void isBlank05() {
+		assertFalse(Utils.isBlank(" h "));
+	}
+
+	@Test
+	public void isBlank06() {
+		assertFalse(Utils.isBlank("\t n "));
+	}
+
+	@Test
+	public void isNotBlank01() {
+		assertTrue(Utils.isNotBlank(" h "));
+	}
+
+	@Test
+	public void isNotBlank02() {
+		assertTrue(Utils.isNotBlank(" h \t "));
+	}
+
+	@Test
+	public void isNotBlank03() {
+		assertFalse(Utils.isNotBlank("  \t  \n \r"));
+	}
+
+	@Test
+	public void isNotBlank04() {
+		assertFalse(Utils.isNotBlank(null));
+	}
+
+	@Test
+	public void isNotBlank05() {
+		assertFalse(Utils.isNotBlank(""));
+	}
+
+	@Test
+	public void isNotBlank06() {
+		assertFalse(Utils.isNotBlank("  "));
+	}
+
+}
Index: /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/tool/XHtmlTagToolTest.java
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/tool/XHtmlTagToolTest.java	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-core/src/test/java/net/fckeditor/tool/XHtmlTagToolTest.java	(revision 4150)
@@ -0,0 +1,57 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ */
+package net.fckeditor.tool;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+/**
+ * Tests for {@link XHtmlTagTool}.
+ *
+ * @version $Id$
+ */
+public class XHtmlTagToolTest {
+
+	@Test
+	public void testClosingTag01() throws Exception {
+	    XHtmlTagTool tag = new XHtmlTagTool("test");
+	    assertEquals("<test />", tag.toString());
+    }
+	
+	@Test
+	public void testClosingTag02() throws Exception {
+	    XHtmlTagTool tag = new XHtmlTagTool("test", "");
+	    assertEquals("<test />", tag.toString());
+    }
+
+	@Test
+	public void testClosingTag03() throws Exception {
+	    XHtmlTagTool tag = new XHtmlTagTool("test", "val");
+	    assertEquals("<test>val</test>", tag.toString());
+    }
+	
+	@Test
+	public void testClosingTag04() throws Exception {
+	    XHtmlTagTool tag = new XHtmlTagTool("test", XHtmlTagTool.SPACE);
+	    assertEquals("<test> </test>", tag.toString());
+    }
+}
Index: /FCKeditor.Java/branches/2.6.x/java-demo/pom.xml
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-demo/pom.xml	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-demo/pom.xml	(revision 4150)
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ * @version: $Id$
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>java-demo</artifactId>
+	<packaging>war</packaging>
+	<dependencies>
+		<dependency>
+			<groupId>net.fckeditor</groupId>
+			<artifactId>java-core</artifactId>
+			<version>2.6-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-simple</artifactId>
+			<version>${slf4j.version}</version>
+			<scope>runtime</scope>
+		</dependency>
+	</dependencies>
+	<parent>
+		<groupId>net.fckeditor</groupId>
+		<artifactId>fckeditor-java</artifactId>
+		<version>2.6-SNAPSHOT</version>
+	</parent>
+
+	<build>
+		<finalName>fckeditor-${artifactId}-${version}</finalName>
+		<plugins>
+			<plugin>
+				<groupId>org.mortbay.jetty</groupId>
+				<artifactId>maven-jetty-plugin</artifactId>
+				<version>6.1.19</version>
+				<configuration>
+					<contextPath>/${build.finalName}</contextPath>
+					<scanIntervalSeconds>3</scanIntervalSeconds>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-war-plugin</artifactId>
+				<configuration>
+					<webResources>
+						<resource>
+							<directory>..</directory>
+							<filtering>false</filtering>
+							<includes>
+								<include>LICENSE.txt</include>
+							</includes>
+						</resource>
+					</webResources>
+					<warSourceIncludes>
+						fckeditor/editor/,fckeditor/_samples/_plugins/,fckeditor/fckconfig.js,fckeditor/*.xml,WEB-INF/,jsp/,sample*,index.jsp,fckeditor.gif
+					</warSourceIncludes>
+					<warSourceExcludes>
+						fckeditor/editor/filemanager/connectors/
+					</warSourceExcludes>
+					<archive>
+						<addMavenDescriptor>false</addMavenDescriptor>
+						<manifest>
+							<addDefaultImplementationEntries>
+								true
+							</addDefaultImplementationEntries>
+						</manifest>
+						<manifestEntries>
+							<Implementation-URL>
+								${project.url}
+							</Implementation-URL>
+							<Built-By>${organization.name}</Built-By>
+						</manifestEntries>
+					</archive>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-clean-plugin</artifactId>
+				<configuration>
+					<filesets>
+						<fileset>
+							<directory>src/main/webapp</directory>
+							<includes>
+								<include>userfiles/</include>
+							</includes>
+						</fileset>
+					</filesets>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-deploy-plugin</artifactId>
+				<configuration>
+					<skip>true</skip>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+	<reporting>
+		<plugins>
+			<plugin>
+				<artifactId>
+					maven-project-info-reports-plugin
+				</artifactId>
+				<reportSets>
+					<reportSet>
+						<reports>
+							<report>dependencies</report>
+							<report>summary</report>
+						</reports>
+					</reportSet>
+				</reportSets>
+			</plugin>
+		</plugins>
+	</reporting>
+	<name>FCKeditor.Java Integration Demo Webapp</name>
+	<description>
+		This is a drop-in demo of the FCKeditor.Java Integration. It's
+		preconfigured with the Java library and a recent FCKeditor
+		version.
+	</description>
+	<url>http://java.fckeditor.net</url>
+</project>
Index: /FCKeditor.Java/branches/2.6.x/java-demo/src/main/resources/fckeditor.properties
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-demo/src/main/resources/fckeditor.properties	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-demo/src/main/resources/fckeditor.properties	(revision 4150)
@@ -0,0 +1,23 @@
+#
+# FCKeditor - The text editor for Internet - http://www.fckeditor.net
+# Copyright (C) 2004-2009 Frederico Caldeira Knabben
+#
+# == BEGIN LICENSE ==
+#
+# Licensed under the terms of any of the following licenses at your
+# choice:
+#
+#  - GNU General Public License Version 2 or later (the "GPL")
+#    http://www.gnu.org/licenses/gpl.html
+#
+#  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+#    http://www.gnu.org/licenses/lgpl.html
+#
+#  - Mozilla Public License Version 1.1 or later (the "MPL")
+#    http://www.mozilla.org/MPL/MPL-1.1.html
+#
+# == END LICENSE ==
+#
+# @version $Id$
+
+connector.userActionImpl=net.fckeditor.requestcycle.impl.EnabledUserAction
Index: /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/WEB-INF/web.xml	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/WEB-INF/web.xml	(revision 4150)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ * @version: $Id$
+-->
+<web-app version="2.4" id="fckeditor-java" xmlns="http://java.sun.com/xml/ns/j2ee"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+>
+<display-name>FCKeditor.Java Sample Web Application</display-name>
+	<description>FCKeditor.Java Sample Web Application</description>
+
+	<servlet>
+		<servlet-name>ConnectorServlet</servlet-name>
+		<servlet-class>
+			net.fckeditor.connector.ConnectorServlet
+		</servlet-class>
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>ConnectorServlet</servlet-name>
+		<!-- Do not wrap this line otherwise Glassfish will fail to load this file -->
+		<url-pattern>/fckeditor/editor/filemanager/connectors/*</url-pattern>
+	</servlet-mapping>
+</web-app>
Index: /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/index.jsp
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/index.jsp	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/index.jsp	(revision 4150)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+	pageEncoding="UTF-8"%>
+<%--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ * @version: $Id$
+--%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" 
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+	<head>
+		<title>FCKeditor - Samples</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+		<meta name="robots" content="noindex, nofollow" />
+		<link rel="shortcut icon" href="fckeditor.gif"
+				type="image/x-icon" />
+	</head>
+	<frameset rows="60,*">
+		<frame src="sampleslist.jsp" noresize ="noresize" scrolling="no" />
+		<frame name="Sample" src="jsp/sample01.jsp" noresize="noresize" />
+	</frameset>
+</html>
Index: /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample01.jsp
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample01.jsp	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample01.jsp	(revision 4150)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+	pageEncoding="UTF-8" import="net.fckeditor.*" %>
+<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
+<%--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ * @version: $Id$
+--%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+	<head>
+		<title>FCKeditor - JSP Sample</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+		<meta name="robots" content="noindex, nofollow" />
+		<link href="../sample.css" rel="stylesheet" type="text/css" />
+		<link rel="shortcut icon" href="../fckeditor.gif"
+				type="image/x-icon" />
+		<script type="text/javascript">
+			function FCKeditor_OnComplete(editorInstance) {
+				window.status = editorInstance.Description;
+			}
+		</script>
+	</head>
+	<%
+		FCKeditor fckEditor = new FCKeditor(request, "EditorDefault");
+	%>
+	<body>
+		<h1>FCKeditor - JSP - Sample 1</h1>
+		<p>This sample displays a normal HTML form with an FCKeditor with
+		full features enabled.</p>
+		<p>Basic FCKeditor information:</p>
+		<ul>
+			<li><FCK:check command="CompatibleBrowser" /></li>
+			<li><FCK:check command="GetResources" /></li>
+			<li><FCK:check command="FileUpload" /></li>
+			<li><FCK:check command="CreateFolder" /></li>
+		</ul>
+		<hr />
+		<form action="sampleposteddata.jsp" method="post" target="_blank">
+		<%
+			fckEditor.setValue("This is some <strong>sample text</strong>. You are using <a href=\"http://www.fckeditor.net\">FCKeditor</a>.");
+			out.println(fckEditor);
+		%>
+		<br />
+		<input type="submit" value="Submit" /></form>
+	</body>
+</html>
Index: /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample02.jsp
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample02.jsp	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample02.jsp	(revision 4150)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+	pageEncoding="UTF-8" %>
+<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
+<%--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ * @version: $Id$
+--%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+	<head>
+		<title>FCKeditor - JSP Sample</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+		<meta name="robots" content="noindex, nofollow" />
+		<link href="../sample.css" rel="stylesheet" type="text/css" />
+		<link rel="shortcut icon" href="../fckeditor.gif"
+				type="image/x-icon" />
+		<script type="text/javascript">
+			function FCKeditor_OnComplete(editorInstance) {
+				window.status = editorInstance.Description;
+			}
+		</script>
+	</head>
+	<body>
+		<h1>FCKeditor - JSP - Sample 2</h1>
+		This sample displays a normal HTML form with an FCKeditor with full 
+		features enabled.<br />
+		This sample uses the FCKeditor Taglib: this method is preferred to 
+		<a href="sample01.jsp">the API version</a><br />
+		All other sample pages will use this method.
+		<hr />
+		<form action="sampleposteddata.jsp" method="post" target="_blank">
+			<FCK:editor instanceName="EditorDefault">
+				<jsp:attribute name="value">This is some <strong>sample text
+					</strong>. You are using <a href="http://www.fckeditor.net">
+					FCKeditor</a>.
+				</jsp:attribute>
+			</FCK:editor>
+			<br />
+			<input type="submit" value="Submit" />
+		</form>
+	</body>
+</html>
Index: /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample03.jsp
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample03.jsp	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample03.jsp	(revision 4150)
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+	pageEncoding="UTF-8" %>
+<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
+<%--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ * @version: $Id$
+--%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+	<head>
+		<title>FCKeditor - JSP Sample</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+		<meta name="robots" content="noindex, nofollow" />
+		<link href="../sample.css" rel="stylesheet" type="text/css" />
+		<link rel="shortcut icon" href="../fckeditor.gif"
+				type="image/x-icon" />
+		<script type="text/javascript">
+			function FCKeditor_OnComplete(editorInstance) {
+				var oCombo = document.getElementById( 'cmbLanguages' );
+				for (code in editorInstance.Language.AvailableLanguages) {
+					AddComboOption( oCombo,	editorInstance.Language.AvailableLanguages[code] + '(' + code + ')', code);
+				}
+
+				oCombo.value = editorInstance.Language.ActiveLanguage.Code;
+			}
+
+			function AddComboOption(combo, optionText, optionValue) {
+				var oOption = document.createElement("OPTION");
+				combo.options.add(oOption);
+
+				oOption.innerHTML = optionText;
+				oOption.value = optionValue;
+	
+				return oOption;
+			}
+
+			function ChangeLanguage(languageCode) {
+				if (languageCode != "-1")
+					window.location.href = window.location.pathname + "?code=" + languageCode;
+			}
+		</script>
+	</head>
+	<body>
+		<h1>FCKeditor - JSP - Sample 3</h1>
+		This sample shows the editor in all it's available languages.<br />
+		The Language dropdown is populated with JavaScript API.
+		<hr />
+		<table cellpadding="0" cellspacing="0" border="0">
+			<tr>
+				<td>
+					Select a language:&nbsp;
+				</td>
+				<td>
+					<select id="cmbLanguages" onchange="ChangeLanguage(this.value);" >
+						<option value="-1">none selected</option>
+					</select>
+				</td>
+			</tr>
+		</table>
+		<br />
+		<form action="sampleposteddata.jsp" method="post" target="_blank">
+			<FCK:editor instanceName="EditorDefault">
+				<jsp:attribute name="value">This is some <strong>sample text
+					</strong>. You are using <a href="http://www.fckeditor.net">
+					FCKeditor</a>.
+				</jsp:attribute>
+				<jsp:body>
+					<FCK:config AutoDetectLanguage="${empty param.code ? true : false}"
+						DefaultLanguage="${empty param.code ? 'en' : param.code}" />
+				</jsp:body>
+			</FCK:editor>
+			<br />
+			<input type="submit" value="Submit" />
+		</form>
+	</body>
+</html>
Index: /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample04.jsp
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample04.jsp	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample04.jsp	(revision 4150)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+	pageEncoding="UTF-8" %>
+<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
+<%--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ * @version: $Id$
+--%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+	<head>
+		<title>FCKeditor - JSP Sample</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+		<meta name="robots" content="noindex, nofollow" />
+		<link href="../sample.css" rel="stylesheet" type="text/css" />
+		<link rel="shortcut icon" href="../fckeditor.gif"
+				type="image/x-icon" />
+		<script type="text/javascript">
+			function FCKeditor_OnComplete(editorInstance) {
+				var oCombo = document.getElementById('cmbToolbars');
+				oCombo.value = editorInstance.ToolbarSet.Name;
+				oCombo.style.visibility = '';
+			}
+
+			function ChangeToolbarSet(toolbarSet) {
+				window.location.href = window.location.pathname + "?toolbar=" + toolbarSet;
+			}
+			</script>
+	</head>
+	<body>
+		<h1>FCKeditor - JSP - Sample 4</h1>
+		This sample shows how to change the editor toolbar.
+		<hr />
+		<table cellpadding="0" cellspacing="0" border="0">
+			<tr>
+				<td>
+					Select the toolbar to load:&nbsp;
+				</td>
+				<td>
+					<select id="cmbToolbars" onchange="ChangeToolbarSet(this.value);" style="visibility: hidden">
+						<option value="Default" selected="selected">Default</option>
+						<option value="Basic">Basic</option>
+					</select>
+				</td>
+			</tr>
+		</table>
+		<br />
+		<form action="sampleposteddata.jsp" method="post" target="_blank">
+			<FCK:editor instanceName="EditorDefault" toolbarSet="${param.toolbar}">
+				<jsp:attribute name="value">This is some <strong>sample text
+					</strong>. You are using <a href="http://www.fckeditor.net">
+					FCKeditor</a>.
+				</jsp:attribute>
+			</FCK:editor>
+			<br />
+			<input type="submit" value="Submit" />
+		</form>
+	</body>
+</html>
Index: /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample05.jsp
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample05.jsp	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample05.jsp	(revision 4150)
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+	pageEncoding="UTF-8" %>
+<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
+<%--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ * @version: $Id$
+--%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+	<head>
+		<title>FCKeditor - JSP Sample</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+		<meta name="robots" content="noindex, nofollow" />
+		<link href="../sample.css" rel="stylesheet" type="text/css" />
+		<link rel="shortcut icon" href="../fckeditor.gif"
+				type="image/x-icon" />
+		<script type="text/javascript">
+			function FCKeditor_OnComplete(editorInstance) {
+				var oCombo = document.getElementById('cmbSkins') ;
+	
+				// Get the active skin.
+				var sSkin = editorInstance.Config['SkinPath'] ;
+				sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
+	
+				oCombo.value = sSkin ;
+				oCombo.style.visibility = '' ;
+			}
+
+			function ChangeSkin(skinName) {
+				window.location.href = window.location.pathname + "?skin=" + skinName ;
+			}
+		</script>
+	</head>
+	<%
+		String skinStr=request.getParameter("skin");
+		if(skinStr!=null) 
+			skinStr= "skins/" + skinStr + "/"; 	//basePath +  constant relative skin path + skinName
+		pageContext.setAttribute("skin",skinStr);
+	%>	
+	<body>
+		<h1>FCKeditor - JSP - Sample 5</h1>
+		This sample shows how to change the editor skin.
+		<hr />
+		<table cellpadding="0" cellspacing="0" border="0">
+			<tr>
+				<td>
+					Select the skin to load:&nbsp;
+				</td>
+				<td>
+					<select id="cmbSkins" onchange="ChangeSkin(this.value);" style="visibility: hidden">
+						<option value="default" selected="selected">Default</option>
+						<option value="office2003">Office 2003</option>
+						<option value="silver">Silver</option>
+					</select>
+				</td>
+			</tr>
+		</table>
+		<br />
+		<form action="sampleposteddata.jsp" method="post" target="_blank">
+			<FCK:editor instanceName="EditorDefault">
+				<jsp:attribute name="value">This is some <strong>sample text
+					</strong>. You are using <a href="http://www.fckeditor.net">
+					FCKeditor</a>.
+				</jsp:attribute>
+				<jsp:body>
+					<FCK:config SkinPath="${skin}"/>
+				</jsp:body>
+			</FCK:editor>
+			<br />
+			<input type="submit" value="Submit" />
+		</form>
+	</body>
+</html>
Index: /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample06.config.js
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample06.config.js	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample06.config.js	(revision 4150)
@@ -0,0 +1,43 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ * @version: $Id$
+ */
+
+// Set our sample toolbar.
+FCKConfig.ToolbarSets['PluginTest'] = [
+	['Source'],
+	['My_Find','My_Replace','-','Placeholder'],
+	//['Table','-','TableInsertRow','TableDeleteRows','TableInsertColumn','TableDeleteColumns','TableInsertCell','TableDeleteCells','TableMergeCells','TableSplitCell'],
+	['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About']
+] ;
+
+// Change the default plugin path.
+FCKConfig.PluginsPath = FCKConfig.BasePath.substr(0, FCKConfig.BasePath.length - 7) + '_samples/_plugins/' ;
+
+// Add our plugin to the plugins list.
+//		FCKConfig.Plugins.Add( pluginName, availableLanguages )
+//			pluginName: The plugin name. The plugin directory must match this name.
+//			availableLanguages: a list of available language files for the plugin (separated by a comma).
+FCKConfig.Plugins.Add( 'findreplace', 'en,it' ) ;
+
+// If you want to use plugins found on other directories, just use the third parameter.
+var sOtherPluginPath = FCKConfig.BasePath.substr(0, FCKConfig.BasePath.length - 7) + 'editor/plugins/' ;
+FCKConfig.Plugins.Add( 'placeholder', 'en,it', sOtherPluginPath ) ;
+//FCKConfig.Plugins.Add( 'tablecommands', 'en,it', sOtherPluginPath ) ;
Index: /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample06.jsp
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample06.jsp	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample06.jsp	(revision 4150)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+	pageEncoding="UTF-8" %>
+<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
+<%--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ * @version: $Id$
+--%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+	<head>
+		<title>FCKeditor - Sample</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+		<meta name="robots" content="noindex, nofollow" />
+		<link href="../sample.css" rel="stylesheet" type="text/css" />
+		<link rel="shortcut icon" href="../fckeditor.gif"
+				type="image/x-icon" />
+		<script type="text/javascript">
+			function FCKeditor_OnComplete(editorInstance) {
+				window.status = editorInstance.Description;
+			}
+		</script>
+	</head>
+	<body>
+		<h1>FCKeditor - JSP - Sample 6</h1>
+		This sample shows a sample plugin implementation.
+		<br />
+		These are sample "Find" and "Replace" plugin that do exactly the same 
+		thing that the built in ones do. Use the green toolbar buttons the test then.
+		<br />
+		There is also another sample plugin that is available in the package: 
+		the "Placeholder" command (use the yellow icon).
+		<hr />
+		<form action="sampleposteddata.jsp" method="post" target="_blank">
+			<FCK:editor instanceName="EditorDefault" toolbarSet="PluginTest">
+				<jsp:attribute name="value">This is some <strong>sample text
+					</strong>. You are using <a href="http://www.fckeditor.net">
+					FCKeditor</a>.
+				</jsp:attribute>
+				<jsp:body>
+					<FCK:config CustomConfigurationsPath="${pageContext.request.contextPath}/jsp/sample06.config.js" />
+				</jsp:body>
+			</FCK:editor>
+			<br />
+			<input type="submit" value="Submit" />
+		</form>
+	</body>
+</html>
Index: /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample07.jsp
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample07.jsp	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sample07.jsp	(revision 4150)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+	pageEncoding="UTF-8" %>
+<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
+<%--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ * @version: $Id$
+--%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+	<head>
+		<title>FCKeditor - Sample</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+		<meta name="robots" content="noindex, nofollow" />
+		<link href="../sample.css" rel="stylesheet" type="text/css" />
+		<link rel="shortcut icon" href="../fckeditor.gif"
+				type="image/x-icon" />
+		<script type="text/javascript">
+			function FCKeditor_OnComplete(editorInstance) {
+				window.status = editorInstance.Description;
+			}
+		</script>
+	</head><body>
+		<h1>FCKeditor - JSP - Sample 7</h1>
+		In this sample the user can edit the complete page contents and header (from 
+		&lt;HTML&gt; to &lt;/HTML&gt;).
+		<hr />
+		<form action="sampleposteddata.jsp" method="post" target="_blank">
+			<FCK:editor instanceName="EditorDefault">
+				<jsp:attribute name="value">
+					<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+						<html>
+							<head>
+								<title>Full Page Test</title>
+								<meta content="text/html; charset=utf-8" 
+									http-equiv="Content-Type"/>
+							</head>
+							<body>This is some <strong>sample text</strong>. You are 
+								using <a href="http://www.fckeditor.net/">FCKeditor
+								</a>.
+							</body>
+						</html>
+				</jsp:attribute>
+				<jsp:body>
+					<FCK:config FullPage="true"/>
+				</jsp:body>
+			</FCK:editor>
+			<br />
+			<input type="submit" value="Submit" />
+		</form>
+	</body>
+</html>
Index: /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sampleposteddata.jsp
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sampleposteddata.jsp	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/jsp/sampleposteddata.jsp	(revision 4150)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+	pageEncoding="UTF-8" import="java.util.Enumeration;"%>
+<%--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ * @version: $Id$
+--%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+	<head>
+		<title>FCKeditor - Samples - Posted Data</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+		<meta name="robots" content="noindex, nofollow" />
+		<link href="../sample.css" rel="stylesheet" type="text/css" />
+		<link rel="shortcut icon" href="../fckeditor.gif"
+				type="image/x-icon" />
+	</head>
+	<%
+		Enumeration<String> params = (Enumeration<String>) request.getParameterNames();
+	%>
+	<body>
+		<h1>FCKeditor - Samples - Posted Data</h1>
+		This page lists all data posted by the form.
+		<hr />
+		<table width="100%" border="1" cellspacing="0">
+			<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
+				<td nowrap="nowrap">Field Name&nbsp;&nbsp;</td>
+				<td>Value</td>
+			</tr>
+			<%
+				String parameter;
+				while(params.hasMoreElements()) {
+					parameter = params.nextElement();
+			%>
+			<tr>
+				<td nowrap="nowrap"><b><%=parameter%></b></td>
+				<td width="100%"><%=request.getParameter(parameter)%></td>
+			</tr>
+			<%
+				}
+			%>
+		</table>
+	</body>
+</html>
Index: /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/sample.css
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/sample.css	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/sample.css	(revision 4150)
@@ -0,0 +1,37 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ * @version $Id$
+ */
+
+body, td, input, select, textarea {
+	font-size: 12px;
+	font-family: Arial, Verdana, Sans-Serif;
+}
+
+h1 {
+	font-weight: bold;
+	font-size: 180%;
+	margin-bottom: 10px;
+}
+
+form {
+	margin: 0px 0px 0px 0px;
+	padding: 0px 0px 0px 0px;
+}
Index: /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/sampleslist.jsp
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/sampleslist.jsp	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-demo/src/main/webapp/sampleslist.jsp	(revision 4150)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+	pageEncoding="UTF-8"%>
+<%--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ * @version: $Id$
+--%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+	<head>
+		<title>FCKeditor - Sample Selection</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+		<meta name="robots" content="noindex, nofollow" />
+		<link href="sample.css" rel="stylesheet" type="text/css" />
+		<script type="text/javascript">
+			if (window.top == window)
+				document.location = 'index.jsp' ;
+
+			function OpenSample(sample) {
+				if (sample.length > 0)
+					window.open( sample, 'Sample' );
+			}
+		</script>
+	</head>
+	<body>
+		<table border="0" cellpadding="0" cellspacing="0">
+			<tr>
+				<td>Please select the sample you want to view: <br />
+				<select onchange="OpenSample(this.value);">
+					<option value="jsp/sample01.jsp" selected="selected">
+					Sample 01: Editor with all features generated via API</option>
+					<option value="jsp/sample02.jsp">Sample 02: Editor with all 
+					features generated with JSP Taglib</option>
+					<option value="jsp/sample03.jsp">Sample 03:	Multi-language 
+					support</option>
+					<option value="jsp/sample04.jsp">Sample 04: Toolbar
+					selection</option>
+					<option value="jsp/sample05.jsp">Sample 05: Skins
+					support</option>
+					<option value="jsp/sample06.jsp">Sample 06: Plugins
+					support</option>
+					<option value="jsp/sample07.jsp">Sample 07: Full Page
+					editing</option>
+				</select></td>
+			</tr>
+		</table>
+	</body>
+</html>
Index: /FCKeditor.Java/branches/2.6.x/java-demo/src/site/resources/css/site.css
===================================================================
--- /FCKeditor.Java/branches/2.6.x/java-demo/src/site/resources/css/site.css	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/java-demo/src/site/resources/css/site.css	(revision 4150)
@@ -0,0 +1,1 @@
+@import url(../../css/site.css);
Index: /FCKeditor.Java/branches/2.6.x/pom.xml
===================================================================
--- /FCKeditor.Java/branches/2.6.x/pom.xml	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/pom.xml	(revision 4150)
@@ -0,0 +1,408 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ * @version: $Id$
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>net.fckeditor</groupId>
+	<artifactId>fckeditor-java</artifactId>
+	<version>2.6-SNAPSHOT</version>
+	<packaging>pom</packaging>
+	<modules>
+		<module>java-core</module>
+		<module>java-demo</module>
+	</modules>
+	<properties>
+		<project.build.sourceEncoding>
+			UTF-8
+		</project.build.sourceEncoding>
+		<project.reporting.outputEncoding>
+			UTF-8
+		</project.reporting.outputEncoding>
+		<!-- SLF4J version range [1.5.5,1.6) won't work due to http://jira.codehaus.org/browse/MNG-3806 -->
+		<slf4j.version>1.5.8</slf4j.version>
+		<!-- site plugin properties for Velocity -->
+		<slf4jVersion>${slf4j.version}</slf4jVersion>
+		<currentVersion>${version}</currentVersion>
+		<FCKeditorVersion>2.6.4.1</FCKeditorVersion>
+		<ticketUrl>${issueManagement.url}ticket</ticketUrl>
+		<minMavenVersion>${prerequisites.maven}</minMavenVersion>
+	</properties>
+	<build>
+		<defaultGoal>package</defaultGoal>
+		<!-- for future Maven 2.1 use -->
+		<!--<sourceEncoding>UTF-8</sourceEncoding>-->
+		<pluginManagement>
+			<plugins>
+				<plugin>
+					<artifactId>maven-site-plugin</artifactId>
+					<version>2.0.1</version>
+				</plugin>
+				<plugin>
+					<artifactId>maven-javadoc-plugin</artifactId>
+					<version>2.6</version>
+					<configuration>
+					<archive>
+						<manifest>
+							<addDefaultImplementationEntries>
+								true
+							</addDefaultImplementationEntries>
+						</manifest>
+						<manifestEntries>
+							<Implementation-URL>
+								${project.url}
+							</Implementation-URL>
+							<Built-By>${organization.name}</Built-By>
+						</manifestEntries>
+					</archive>
+					<show>package</show>
+					<docfilessubdirs>true</docfilessubdirs>
+					<keywords>true</keywords>
+				</configuration>
+				</plugin>
+				<plugin>
+					<artifactId>maven-source-plugin</artifactId>
+					<version>2.1</version>
+					<configuration>
+					<archive>
+						<manifest>
+							<addDefaultImplementationEntries>
+								true
+							</addDefaultImplementationEntries>
+						</manifest>
+						<manifestEntries>
+							<Implementation-URL>
+								${project.url}
+							</Implementation-URL>
+							<Built-By>${organization.name}</Built-By>
+						</manifestEntries>
+					</archive>
+					<excludes>
+						<exclude>**/package-info.java</exclude>
+					</excludes>
+					<excludeResources>true</excludeResources>
+				</configuration>
+				</plugin>
+				<plugin>
+					<artifactId>maven-deploy-plugin</artifactId>
+					<version>2.4</version>
+				</plugin>
+				<plugin>
+					<artifactId>maven-release-plugin</artifactId>
+					<version>2.0-beta-9</version>
+				</plugin>
+				<plugin>
+					<artifactId>maven-resources-plugin</artifactId>
+					<version>2.3</version>
+				</plugin>
+				<plugin>
+					<artifactId>maven-surefire-plugin</artifactId>
+					<version>2.4.3</version>
+				</plugin>
+				<plugin>
+					<artifactId>maven-war-plugin</artifactId>
+					<version>2.1-beta-1</version>
+				</plugin>
+				<plugin>
+					<artifactId>maven-install-plugin</artifactId>
+					<version>2.3</version>
+				</plugin>
+				<plugin>
+					<artifactId>maven-assembly-plugin</artifactId>
+					<version>2.2-beta-4</version>
+				</plugin>
+				<plugin>
+					<artifactId>maven-jar-plugin</artifactId>
+					<configuration>
+						<archive>
+							<manifest>
+								<addDefaultImplementationEntries>
+									true
+								</addDefaultImplementationEntries>
+							</manifest>
+							<manifestEntries>
+								<Implementation-URL>
+									${project.url}
+								</Implementation-URL>
+								<Built-By>${organization.name}</Built-By>
+							</manifestEntries>
+						</archive>
+					</configuration>
+				</plugin>
+			</plugins>
+		</pluginManagement>
+		<plugins>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>1.5</source>
+					<target>jsr14</target>
+					<excludes>
+						<exclude>**/package-info.java</exclude>
+					</excludes>
+				</configuration>
+				<executions>
+					<execution>
+						<id>test-compiler</id>
+						<phase>process-test-sources</phase>
+						<goals>
+							<goal>testCompile</goal>
+						</goals>
+						<configuration>
+							<source>1.5</source>
+							<target>1.5</target>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<artifactId>maven-assembly-plugin</artifactId>
+				<configuration>
+					<descriptors>
+						<descriptor>
+							src/main/assembly/src.xml
+						</descriptor>
+						<descriptor>
+							src/main/assembly/bin.xml
+						</descriptor>
+					</descriptors>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-antrun-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>rewrite-site-links</id>
+						<phase>pre-site</phase>
+						<goals>
+							<goal>run</goal>
+						</goals>
+						<configuration>
+							<tasks>
+								<copy overwrite="true" todir="src/site" flatten="true">
+									<fileset dir="..">
+										<include name="src/site/site.xml" />
+									</fileset>
+								</copy>
+								<replace value="&lt;src&gt;../" token="&lt;src&gt;/" dir="..">
+									<include name="${pom.artifactId}/src/site/site.xml" />
+									<exclude name="fckeditor-java/src/site/site.xml" />
+								</replace>
+								<replace value="href=&quot;../" token="href=&quot;/" dir="..">
+									<include name="${pom.artifactId}/src/site/site.xml" />
+									<exclude name="fckeditor-java/src/site/site.xml" />
+								</replace>
+								<replace value="href=&quot;" token="href=&quot;../${pom.artifactId}/" dir="..">
+									<include name="${pom.artifactId}/src/site/site.xml" />
+									<exclude name="fckeditor-java/src/site/site.xml" />
+								</replace>
+								<replace value="href=&quot;../images" token="href=&quot;images" dir="..">
+									<include name="${pom.artifactId}/src/site/site.xml" />
+									<exclude name="fckeditor-java/src/site/site.xml" />
+								</replace>
+							</tasks>
+						</configuration>
+					</execution>
+				</executions>
+				<dependencies>
+					<dependency>
+						<groupId>ant</groupId>
+						<artifactId>ant-nodeps</artifactId>
+						<version>1.6.5</version>
+					</dependency>
+				</dependencies>
+			</plugin>
+		</plugins>
+	</build>
+
+	<reporting>
+		<!-- for future Maven 2.1 use -->
+		<!-- <outputEncoding>UTF-8</outputEncoding> -->
+		<plugins>
+			<plugin>
+				<artifactId>
+					maven-project-info-reports-plugin
+				</artifactId>
+				<version>2.1.2</version>
+				<inherited>false</inherited>
+				<reportSets>
+					<reportSet>
+						<reports>
+							<report>issue-tracking</report>
+							<report>mailing-list</report>
+							<report>license</report>
+							<report>summary</report>
+							<report>project-team</report>
+							<report>scm</report>
+						</reports>
+					</reportSet>
+				</reportSets>
+			</plugin>
+			<plugin>
+				<artifactId>maven-changes-plugin</artifactId>
+				<!-- Version 2.1 fails due to MCHANGES-137 -->
+				<version>2.0</version>
+				<configuration>
+					<issueLinkTemplate>
+						%URL%/ticket/%ISSUE%
+					</issueLinkTemplate>
+				</configuration>
+				<reportSets>
+					<reportSet>
+						<reports>
+							<report>changes-report</report>
+						</reports>
+					</reportSet>
+				</reportSets>
+			</plugin>
+		</plugins>
+	</reporting>
+
+	<name>FCKeditor.Java Integration</name>
+	<description>
+		The FCKeditor.Java Integration fosters the entire project
+		documentation, the Java library, and a drop-in demo webapp. All
+		three depict and enable you to learn and to integrate the
+		FCKeditor in your web environment.
+	</description>
+	<url>http://java.fckeditor.net</url>
+	<inceptionYear>2004</inceptionYear>
+	<licenses>
+		<license>
+			<name>GPL, LGPL, MPL</name>
+			<url>LICENSE.txt</url>
+		</license>
+	</licenses>
+	<organization>
+		<name>Frederico Caldeira Knabben</name>
+		<url>http://www.fredck.com</url>
+	</organization>
+	<developers>
+		<developer>
+			<id>fredck</id>
+			<name>Frederico Caldeira Knabben</name>
+			<url>http://www.fredck.com</url>
+			<organization>FredCK.com</organization>
+			<organizationUrl>http://www.fredck.com</organizationUrl>
+			<roles>
+				<role>Head Project Manager</role>
+			</roles>
+			<timezone>+1</timezone>
+		</developer>
+		<developer>
+			<id>th-schwarz</id>
+			<name>Thilo Schwarz</name>
+			<email>thilo.schwarz AT gmail.com</email>
+			<url>http://www.s-th.info</url>
+			<organization>Poor Man's CMS</organization>
+			<organizationUrl>http://poormans.sf.net</organizationUrl>
+			<roles>
+				<role>Project Manager</role>
+				<role>Developer</role>
+			</roles>
+			<timezone>+1</timezone>
+		</developer>
+		<developer>
+			<id>mosipov</id>
+			<name>Michael Osipov</name>
+			<email>michael-o AT users.sourceforge.net</email>
+			<roles>
+				<role>Project Manager</role>
+				<role>Developer</role>
+			</roles>
+			<timezone>+1</timezone>
+		</developer>
+	</developers>
+	<issueManagement>
+		<system>Trac</system>
+		<url>http://dev.fckeditor.net/</url>
+	</issueManagement>
+	<mailingLists>
+		<mailingList>
+			<name>FCKeditor Developers List</name>
+			<subscribe>
+				https://lists.sourceforge.net/lists/listinfo/fckeditor-developers
+			</subscribe>
+			<unsubscribe>
+				https://lists.sourceforge.net/lists/listinfo/fckeditor-developers
+			</unsubscribe>
+			<archive>
+				http://sourceforge.net/mailarchive/forum.php?forum_name=fckeditor-developers
+			</archive>
+		</mailingList>
+		<mailingList>
+			<name>FCKeditor Testers List</name>
+			<subscribe>
+				https://lists.sourceforge.net/lists/listinfo/fckeditor-testers
+			</subscribe>
+			<unsubscribe>
+				https://lists.sourceforge.net/lists/listinfo/fckeditor-testers
+			</unsubscribe>
+			<archive>
+				http://sourceforge.net/mailarchive/forum.php?forum_name=fckeditor-testers
+			</archive>
+		</mailingList>
+		<mailingList>
+			<name>FCKeditor Trac Activity</name>
+			<subscribe>
+				https://lists.sourceforge.net/lists/listinfo/fckeditor-trac
+			</subscribe>
+			<unsubscribe>
+				https://lists.sourceforge.net/lists/listinfo/fckeditor-trac
+			</unsubscribe>
+		</mailingList>
+		<mailingList>
+			<name>FCKeditor Commits List</name>
+			<subscribe>
+				https://lists.sourceforge.net/lists/listinfo/fckeditor-commits
+			</subscribe>
+			<unsubscribe>
+				https://lists.sourceforge.net/lists/listinfo/fckeditor-commits
+			</unsubscribe>
+		</mailingList>
+	</mailingLists>
+	<scm>
+		<connection>
+			scm:svn:http://svn.fckeditor.net/FCKeditor.Java/trunk
+		</connection>
+		<developerConnection>
+			scm:svn:https://svn.fckeditor.net/FCKeditor.Java/trunk
+		</developerConnection>
+		<url>http://dev.fckeditor.net/browser/FCKeditor.Java/trunk</url>
+	</scm>
+	<prerequisites>
+		<maven>2.0.10</maven>
+	</prerequisites>
+	<distributionManagement>
+		<repository>
+			<id>local</id>
+			<url>file:///home/mosipov/public_html/m2repo</url>
+		</repository>
+		<snapshotRepository>
+			<id>local</id>
+			<url>file:///home/mosipov/public_html/m2repo-snapshots</url>
+		</snapshotRepository>
+		<site>
+			<id>local</id>
+			<url>file:///home/mosipov/public_html/docs</url>
+		</site>
+	</distributionManagement>
+</project>
Index: /FCKeditor.Java/branches/2.6.x/src/changes/changes.xml
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/changes/changes.xml	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/changes/changes.xml	(revision 4150)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ * @version: $Id$
+-->
+<document>
+
+	<properties>
+		<title>Release Notes</title>
+	</properties>
+
+	<body>
+		<release version="2.6-SNAPSHOT" date="in SVN" description="Deprecated code removal.">
+			<action dev="mosipov" type="update" issue="3889">Bump Maven requirement to 2.0.10</action>
+		</release>
+		<release version="2.5" date="2009-08-10" description="Decoupling of the server-side storage, localization of user responses and other minor enhancements.">
+			<action dev="mosipov" type="fix" issue="3911">Regression: Null value is transformed to null and not to an empty string</action>
+			<action dev="mosipov" type="add" issue="2743">Add getUserFilesAbsolutePath to UserPathBuilder interface</action>
+			<action dev="mosipov" type="remove" issue="2618">Extract ImageInfo from java-core.jar</action>
+			<action dev="mosipov" type="update" issue="2605">Move escapeXml method to a StringBuffer</action>
+			<action dev="mosipov" type="add" issue="2592">Add more logging statements</action>
+			<action dev="mosipov" type="update" issue="2583">ConnectorServlet#init fails on some application servers</action>
+			<action dev="mosipov" type="update" issue="2582">Rework *Path and fullUrl properties</action>
+			<action dev="mosipov" type="remove" issue="2580">Deprecate UserActionImpl in favor of EnabledUserAction</action>
+			<action dev="mosipov" type="add" issue="2383">set defaults in default.properties for all interfaces</action>
+			<action dev="mosipov" type="add" issue="2382">add method isCreateFolderEnabled to UserAction interface</action>
+			<action dev="mosipov" type="add" issue="2361">Provide interface for locale resolution</action>
+			<action dev="th-schwarz" type="add" issue="28">Implement Interface for File Browser Connector and Quick Uploader</action>
+		</release>
+		<release version="2.4.2" date="2009-07-15" description="Security and bugfixes.">
+			<action dev="mosipov" type="fix" issue="3902">Unsanitized request parameters may cause the request loop endlessly</action>
+			<action dev="mosipov" type="fix" issue="2608">Removing carriage return invalidates JavaScript</action>
+		</release>
+		<release version="2.4.1" date="2008-10-13"
+			description="Minor bugfixes and enhancements.">
+			<action dev="mosipov" type="fix" issue="2372">Empty/non-set FCK:editor value causes NullPointerException</action>
+			<action dev="mosipov" type="fix" issue="2359">fckeditor-java-demo fails in Glassfish</action>
+			<action dev="mosipov" type="fix" issue="2357">PropertiesLoader Exception when undeploying a webapp using FCKeditor.Java Integration</action>
+			<action dev="mosipov" type="fix" issue="2355">FCK:editor output is not XHTML 1.0 compliant</action>
+		</release>
+	</body>
+
+</document>
Index: /FCKeditor.Java/branches/2.6.x/src/main/assembly/bin.xml
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/main/assembly/bin.xml	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/main/assembly/bin.xml	(revision 4150)
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ * @version: $Id$
+-->
+<assembly>
+	<id>bin</id>
+	<formats>
+		<format>zip</format>
+		<format>tar.gz</format>
+	</formats>
+	<includeSiteDirectory>true</includeSiteDirectory>
+	<moduleSets>
+		<moduleSet>
+			<includes>
+				<include>*:jar</include>
+			</includes>
+			<binaries>
+				<dependencySets>
+					<dependencySet>
+						<outputDirectory>lib</outputDirectory>
+					</dependencySet>
+				</dependencySets>
+				<outputFileNameMapping>
+					${module.build.finalName}.${module.extension}
+				</outputFileNameMapping>
+				<unpack>false</unpack>
+			</binaries>
+		</moduleSet>
+		<moduleSet>
+			<includes>
+				<include>*:jar</include>
+			</includes>
+			<binaries>
+				<attachmentClassifier>javadoc</attachmentClassifier>
+				<includeDependencies>false</includeDependencies>
+				<outputFileNameMapping>
+					${module.build.finalName}${dashClassifier?}.${module.extension}
+				</outputFileNameMapping>
+				<unpack>false</unpack>
+			</binaries>
+		</moduleSet>
+		<moduleSet>
+			<includes>
+				<include>*:jar</include>
+			</includes>
+			<binaries>
+				<attachmentClassifier>sources</attachmentClassifier>
+				<includeDependencies>false</includeDependencies>
+				<outputFileNameMapping>
+					${module.build.finalName}${dashClassifier?}.${module.extension}
+				</outputFileNameMapping>
+				<unpack>false</unpack>
+			</binaries>
+		</moduleSet>
+		<moduleSet>
+			<sources>
+				<includeModuleDirectory>false</includeModuleDirectory>
+				<fileSets>
+					<fileSet>
+						<outputDirectory>
+							site/${module.artifactId}
+						</outputDirectory>
+						<directory>target/site</directory>
+					</fileSet>
+				</fileSets>
+			</sources>
+		</moduleSet>
+	</moduleSets>
+	<fileSets>
+		<fileSet>
+			<includes>
+				<include>*.txt</include>
+			</includes>
+		</fileSet>
+	</fileSets>
+</assembly>
Index: /FCKeditor.Java/branches/2.6.x/src/main/assembly/src.xml
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/main/assembly/src.xml	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/main/assembly/src.xml	(revision 4150)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ * @version: $Id$
+-->
+<assembly>
+	<id>src</id>
+	<formats>
+		<format>zip</format>
+		<format>tar.gz</format>
+	</formats>
+	<fileSets>
+		<fileSet>
+			<excludes>
+				<exclude>**/target/**</exclude>
+				<exclude>**/.settings/**</exclude>
+				<exclude>**/.*/**</exclude>
+			</excludes>
+		</fileSet>
+	</fileSets>
+</assembly>
Index: /FCKeditor.Java/branches/2.6.x/src/site/apt/connector.apt
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/site/apt/connector.apt	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/site/apt/connector.apt	(revision 4150)
@@ -0,0 +1,86 @@
+~~ FCKeditor - The text editor for Internet - http://www.fckeditor.net
+~~ Copyright (C) 2004-2009 Frederico Caldeira Knabben
+~~
+~~ == BEGIN LICENSE ==
+~~
+~~ Licensed under the terms of any of the following licenses at your
+~~ choice:
+~~
+~~  - GNU General Public License Version 2 or later (the "GPL")
+~~    http://www.gnu.org/licenses/gpl.html
+~~
+~~  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+~~    http://www.gnu.org/licenses/lgpl.html
+~~
+~~  - Mozilla Public License Version 1.1 or later (the "MPL")
+~~    http://www.mozilla.org/MPL/MPL-1.1.html
+~~
+~~ == END LICENSE ==
+~~ @version $Id$
+				-------------------------
+					Connector Interface
+				-------------------------
+
+Connector
+
+  The integration pack offers you to provide an arbitrary file storage location
+  for files accessed/stored from the File Browser.
+
+  Read on to see how you can refit the system to your needs:
+
+* Rationale
+
+  In many situations it is not enough or not possible at all to store files within
+  the context. A connector establishes a bridge between the File Browser and a
+  storage backend, it works as a transparent VFS or proxy which allows you to serve
+  from an arbitrary location like context, local FS, DB, NFS/SMB share, FTP and
+  so on.
+
+* The interface
+
+  Consult the JavaDocs of the interface {{{java-core/apidocs/net/fckeditor/connector/Connector.html}<<<net.fckeditor.connector.Connector>>>}}
+  to see how it works.
+
+** Choosing an implementation
+
+    You have to choose an implementation, either an existing or a custom one.
+
+  Ready-to-go implementations:
+
+   * {{{java-core/apidocs/net/fckeditor/connector/impl/AbstractLocalFileSystemConnector.html}<<<net.fckeditor.connector.impl.AbstractLocalFileSystemConnector>>>}} (abstract class):
+     A standard stub implementation of a connector according to the
+     {{{http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Server_Side_Integration#The_Commands}Server Side Integration}}
+     It may serve as a skeleton for your implementation as it does for the default
+     ones that follow.
+
+   * {{{java-core/apidocs/net/fckeditor/connector/impl/ContextConnector.html}<<<net.fckeditor.connector.impl.ContextConnector>>>}} (default):
+     A connector serving all files from the current context.
+
+   * {{{java-core/apidocs/net/fckeditor/connector/impl/LocalConnector.html}<<<net.fckeditor.connector.impl.LocalConnector>>>}}:
+     A connector serving all files from any local path.
+
+   []
+
+  If no existing implementation suits your needs, create your own. Implement the
+  interface and resolve the locale the way you want.
+
+** Declaring an implementation
+
+   After your have chosen your desired implementation, you have to declare it.
+   Put the fully-qualified class name of the implementation in your
+   <<<fckeditor.properties>>>:
+
++------------------------------------------------------------------------------+
+  connector.impl=<desired implementation>
++------------------------------------------------------------------------------+
+
+* Configuration
+
+  A connector (at least a predefined one) interacts very closely with a <<<UserPathBuilder>>>
+  implementation, great care must be exercised while choosing an implementation
+  and userpath properties configuration. An improper configuration may result
+  in erroneous and undefined behavior. See {{{userpathbuilder.html}UserPathBuilder}}
+  for more details.
+  
+    [Keep in mind:] If you write your own Connector implementation, it could be necessary to write
+                    your own listener to resolve the files managed by the File Browser inside your webapp.   
Index: /FCKeditor.Java/branches/2.6.x/src/site/apt/connector_servlet.apt
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/site/apt/connector_servlet.apt	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/site/apt/connector_servlet.apt	(revision 4150)
@@ -0,0 +1,69 @@
+~~ FCKeditor - The text editor for Internet - http://www.fckeditor.net
+~~ Copyright (C) 2004-2009 Frederico Caldeira Knabben
+~~
+~~ == BEGIN LICENSE ==
+~~
+~~ Licensed under the terms of any of the following licenses at your
+~~ choice:
+~~
+~~  - GNU General Public License Version 2 or later (the "GPL")
+~~    http://www.gnu.org/licenses/gpl.html
+~~
+~~  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+~~    http://www.gnu.org/licenses/lgpl.html
+~~
+~~  - Mozilla Public License Version 1.1 or later (the "MPL")
+~~    http://www.mozilla.org/MPL/MPL-1.1.html
+~~
+~~ == END LICENSE ==
+~~ @version $Id$
+                        -----------------------------------
+                           File Browser Connector Servlet
+                        -----------------------------------
+
+Connector Servlet activation
+
+  The Connector Servlet is not mandatory. If you do <not> plan to provide file
+  interaction, you can skip this section.
+
+    [Hint:] The Connector Servlet has to be declared and will be disabled by default
+	        for security reasons!
+
+  It takes two steps to enable it:
+
+  [[1]]  Declare the ConnectorServlet in your <<<web.xml>>>:
+
++------------------------------------------------------------------------------+
+  <web-app version="2.4">
+    ...
+    <servlet>
+      <servlet-name>ConnectorServlet</servlet-name>
+        <servlet-class>
+          net.fckeditor.connector.ConnectorServlet
+      </servlet-class>
+      <load-on-startup>1</load-on-startup>
+    </servlet>
+    ...
+    <servlet-mapping>
+      <servlet-name>ConnectorServlet</servlet-name>
+      <url-pattern>
+        /fckeditor/editor/filemanager/connectors/*
+      </url-pattern>
+    </servlet-mapping>
+    ...
+  </web-app>
++------------------------------------------------------------------------------+
+
+  Assuming you installed the editor in the <<</fckeditor>>> folder in your webapp.\
+  The Connector Servlet is now declared but <still> disabled. The response is
+  going to be a localized error message.
+
+  [[2]] Create a <<<fckeditor.properties>>> file in your classpath and add:
+
++------------------------------------------------------------------------------+
+  connector.userActionImpl=net.fckeditor.requestcycle.impl.EnabledUserAction
++------------------------------------------------------------------------------+
+
+  []
+
+  The Connector Servlet is now <<enabled>>.
Index: /FCKeditor.Java/branches/2.6.x/src/site/apt/demo.apt.vm
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/site/apt/demo.apt.vm	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/site/apt/demo.apt.vm	(revision 4150)
@@ -0,0 +1,46 @@
+~~ FCKeditor - The text editor for Internet - http://www.fckeditor.net
+~~ Copyright (C) 2004-2009 Frederico Caldeira Knabben
+~~
+~~ == BEGIN LICENSE ==
+~~
+~~ Licensed under the terms of any of the following licenses at your
+~~ choice:
+~~
+~~  - GNU General Public License Version 2 or later (the "GPL")
+~~    http://www.gnu.org/licenses/gpl.html
+~~
+~~  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+~~    http://www.gnu.org/licenses/lgpl.html
+~~
+~~  - Mozilla Public License Version 1.1 or later (the "MPL")
+~~    http://www.mozilla.org/MPL/MPL-1.1.html
+~~
+~~ == END LICENSE ==
+~~ @version $Id$
+                                    ------------------------------
+                                           		Demo
+                                    ------------------------------
+
+Demo Web Application
+
+    [Requirements:] You need at least JRE 1.4 and a Servlet 2.4/JSP 2.0 compliant
+                    server implementation to run the demo webapp.
+
+  The demo is intended for novices, beginners, and for everyone who wants to see
+  the FCKeditor (version ${FCKeditorVersion}) in action right out of the box.
+  It's also a good reference for you to see how all integral parts work together.
+
+  It takes three simple steps to see the demo in action:
+
+   [[1]] Download the <<<fckeditor-java-demo-${currentVersion}.war>>> from the
+         {{{http://sourceforge.net/projects/fckeditor/files/FCKeditor.Java/}download area}}.
+
+   [[2]] Deploy the <<<fckeditor-java-demo-${currentVersion}.war>>> in your servlet container
+         or application server and make sure that the context is enabled.
+
+   [[3]] Open up your browser and point to <<<http://localhost:8080/fckeditor-java-demo-${currentVersion}>>>.
+         (assuming your server is running local at port 8080 for testing purposes)
+
+   []
+
+  You are now ready to explore the FCKeditor!
Index: /FCKeditor.Java/branches/2.6.x/src/site/apt/download.apt.vm
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/site/apt/download.apt.vm	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/site/apt/download.apt.vm	(revision 4150)
@@ -0,0 +1,110 @@
+~~ FCKeditor - The text editor for Internet - http://www.fckeditor.net
+~~ Copyright (C) 2004-2009 Frederico Caldeira Knabben
+~~
+~~ == BEGIN LICENSE ==
+~~
+~~ Licensed under the terms of any of the following licenses at your
+~~ choice:
+~~
+~~  - GNU General Public License Version 2 or later (the "GPL")
+~~    http://www.gnu.org/licenses/gpl.html
+~~
+~~  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+~~    http://www.gnu.org/licenses/lgpl.html
+~~
+~~  - Mozilla Public License Version 1.1 or later (the "MPL")
+~~    http://www.mozilla.org/MPL/MPL-1.1.html
+~~
+~~ == END LICENSE ==
+~~ @version $Id: installation.apt.vm 2162 2008-07-03 18:11:08Z mosipov $
+                        ------------------------------
+								Download
+                        ------------------------------
+
+Download Guide
+
+  We provide several distributions for different purposes. Choose a distribution
+  which fits best in your environment. Every distribution is available in our
+  {{{http://sourceforge.net/projects/fckeditor/files/FCKeditor.Java/}download area}}.
+
+* Binary distribution
+
+    [Requirements:] You need at least JRE 1.4 and a Servlet 2.4/JSP 2.0 compliant
+                    server implementation to run the integration pack.
+
+** Using Maven 2
+
+   Declare a dependency reference to the library in the dependencies section of
+   your POM and Maven 2 will do the rest for you:
+
++------------------------------------------------------------------------------+
+<dependency>
+  <groupId>net.fckeditor</groupId>
+  <artifactId>java-core</artifactId>
+  <version>${currentVersion}</version>
+</dependency>
++------------------------------------------------------------------------------+
+
+** Manual download
+
+   We provide two binary distributions, read on to learn more!
+
+   * <<<fckeditor-java-core-${currentVersion}.jar>>>
+
+     The core library for those who have all dependencies already present.
+
+   * <<<fckeditor-java-${currentVersion}-bin.zip>>> (or <<<tar.gz>>>)
+
+     If you are starting from scratch, this distribution fits best. This package
+     comes with pre-built jars, all dependencies, the entire documentation for
+     offline usage and the license file.
+
+     The pre-built jars are:
+
+*---------------------------------------------------+--------------------------------------+
+|| File                                             || Description                        ||
+*---------------------------------------------------+--------------------------------------+
+| fckeditor-java-core-${currentVersion}.jar         | main jar                             |
+*---------------------------------------------------+--------------------------------------+
+| fckeditor-java-core-${currentVersion}-javadoc.jar | optional javadoc for IDE integration |
+*---------------------------------------------------+--------------------------------------+
+| fckeditor-java-core-${currentVersion}-sources.jar | optional sources for IDE integration |
+*---------------------------------------------------+--------------------------------------+
+
+     The <<<lib>>> folder contains the following dependencies:
+
+*--------------------------------------------+----------------------------------+
+|| File                                      || Description                    ||
+*--------------------------------------------+----------------------------------+
+| commons-fileupload-1.2.1.jar               | Apache Commons FileUpload library|
+*--------------------------------------------+----------------------------------+
+| commons-io-1.3.2.jar                       | Apache Commons IO library        |
+*--------------------------------------------+----------------------------------+
+| slf4j-api-${slf4jVersion}.jar              | Simple logging facade library    |
+*--------------------------------------------+----------------------------------+
+| imageinfo-1.9.jar	                         | Image information library        |
+*--------------------------------------------+----------------------------------+
+
+   []
+
+* Source distribution
+
+    [Requirements:] You need at least Maven ${minMavenVersion} and JDK 5 to compile
+                    the integration pack.
+
+  * <<<fckeditor-java-${currentVersion}-src.zip>>> (or <<<tar.gz>>>)
+
+    If you want to checkout the integration pack's source code, refit to your
+    needs (obeying the license terms) or compile yourself, this is the perfect
+    distribution for you.
+
+  []
+
+A word on Logging
+
+    [Attention:] Do <not> skip this section otherwise your application will <<fail>>!
+
+  We use the state-of-the-art logging facade <<<SLF4J>>>. To make SFL4J work at
+  runtime, you have to add <<one>> binding and the corresponding backend (may
+  be optional) in your classpath. Please check the {{{http://slf4j.org}SLF4J website}}
+  for more information on bindings and the API itself.
Index: /FCKeditor.Java/branches/2.6.x/src/site/apt/ext_overview.apt
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/site/apt/ext_overview.apt	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/site/apt/ext_overview.apt	(revision 4150)
@@ -0,0 +1,46 @@
+~~ FCKeditor - The text editor for Internet - http://www.fckeditor.net
+~~ Copyright (C) 2004-2009 Frederico Caldeira Knabben
+~~
+~~ == BEGIN LICENSE ==
+~~
+~~ Licensed under the terms of any of the following licenses at your
+~~ choice:
+~~
+~~  - GNU General Public License Version 2 or later (the "GPL")
+~~    http://www.gnu.org/licenses/gpl.html
+~~
+~~  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+~~    http://www.gnu.org/licenses/lgpl.html
+~~
+~~  - Mozilla Public License Version 1.1 or later (the "MPL")
+~~    http://www.mozilla.org/MPL/MPL-1.1.html
+~~
+~~ == END LICENSE ==
+~~ @version $Id$
+				-------------------------
+				   Extending Overview
+				-------------------------
+
+Overview
+
+    [Hint:] If you do not intend to extend the integration pack, skip this section.
+            An appropriate implementation will be used for every interface automatically.
+
+  The Java integration provides you several interfaces to extend and adapt to
+  your needs:
+
+  * <<UserAction>>: Gives you full control over any action the user can do in the
+    File Browser.
+
+  * <<UserPathBuilder>>: Enables you to construct a user-dependent file path.
+
+  * <<Connector>>: Gives you the ability to handle server-side connector requests
+    the way you want.
+
+  * <<Localization>>: Enables you to localize any message returned by tags and
+    the connector.
+
+  []
+
+  Please read the extending parts carefully if you intend to deploy the FCKeditor
+  in a particular system!
Index: /FCKeditor.Java/branches/2.6.x/src/site/apt/index.apt
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/site/apt/index.apt	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/site/apt/index.apt	(revision 4150)
@@ -0,0 +1,74 @@
+~~ FCKeditor - The text editor for Internet - http://www.fckeditor.net
+~~ Copyright (C) 2004-2009 Frederico Caldeira Knabben
+~~
+~~ == BEGIN LICENSE ==
+~~
+~~ Licensed under the terms of any of the following licenses at your
+~~ choice:
+~~
+~~  - GNU General Public License Version 2 or later (the "GPL")
+~~    http://www.gnu.org/licenses/gpl.html
+~~
+~~  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+~~    http://www.gnu.org/licenses/lgpl.html
+~~
+~~  - Mozilla Public License Version 1.1 or later (the "MPL")
+~~    http://www.mozilla.org/MPL/MPL-1.1.html
+~~
+~~ == END LICENSE ==
+~~ @version $Id$
+                                    ------------------------------
+												About
+                                    ------------------------------
+
+FCKeditor.Java Integration
+
+    [Beta Stage:] This software is still in development, it may contain bugs and
+                  documentation is incomplete.
+  
+  The FCKeditor.Java Integration makes the deployment of the FCKeditor in your
+  Java environment a piece of cake.
+
+  A rich documentation, a well-designed Java library, and an out of the box demo
+  webapp will show you how to get started quickly and deploy the FCKeditor within
+  minutes without juggling with cryptic JSP scriptlets or any JavaScript API.
+  Although it's targeted to be used as a tag library within JSPs, it's a snap
+  within a template engine like {{{http://velocity.apache.org}Velocity}} or
+  {{{http://freemarker.org}FreeMarker}} too.
+
+* Documentation Guideline
+
+  This documentation is straight forward to use!\
+  Read the {{{changes-report.html}Release Notes}}, go over and checkout the
+  {{{demo.html}Demo}} and if you are ready to deploy the FCKeditor in your webapp,
+  {{{download.html}download}} it, follow the {{{installation.html}Installation
+  Guide}} and the {{{int_overview.html}Integration Overview}}.
+
+Previous Releases
+
+  If you can't migrate to the current minor version at the moment and rely on
+  a previous version, the following is provided. We deliver critical fixes to previous
+  minor version too, i.e. no APIs are changed. It's always a drop-in replacement
+  (bugfix version) for the minor version. Additionally, we maintain their
+  documentation online:
+
+*-----------------------------------+-------------------+-----------------------+
+|| Minor branch						|| Latest version	|| Actively maintained ||
+*-----------------------------------+-------------------+-----------------------+
+| {{{http://java.fckeditor.net}2.5.x}}		| 2.5				| Yes					|
+*-----------------------------------+-------------------+-----------------------+
+| {{{http://java.fckeditor.net/2.4.x}2.4.x}}	| 2.4.2				| Yes					|
+*-----------------------------------+-------------------+-----------------------+
+
+  Please keep in mind that the online documentation references the most recent
+  version only. Source and all assemblies/binaries always remain available in
+  our Subversion repository and SourceForge.net/Maven Central Repo respectively.
+
+Call To Action
+
+  Help us improve the FCKeditor.Java Integration!
+
+  If you think this documentation, the Java library or anything else is lacking
+  something, contains errors, or can be improved do <not> hesitate to open a
+  thread in our {{{http://www.fckeditor.net/forums/}forums}} or file a ticket in
+  our {{{issue-tracking.html}issue tracker}}.
Index: /FCKeditor.Java/branches/2.6.x/src/site/apt/installation.apt.vm
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/site/apt/installation.apt.vm	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/site/apt/installation.apt.vm	(revision 4150)
@@ -0,0 +1,74 @@
+~~ FCKeditor - The text editor for Internet - http://www.fckeditor.net
+~~ Copyright (C) 2004-2009 Frederico Caldeira Knabben
+~~
+~~ == BEGIN LICENSE ==
+~~
+~~ Licensed under the terms of any of the following licenses at your
+~~ choice:
+~~
+~~  - GNU General Public License Version 2 or later (the "GPL")
+~~    http://www.gnu.org/licenses/gpl.html
+~~
+~~  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+~~    http://www.gnu.org/licenses/lgpl.html
+~~
+~~  - Mozilla Public License Version 1.1 or later (the "MPL")
+~~    http://www.mozilla.org/MPL/MPL-1.1.html
+~~
+~~ == END LICENSE ==
+~~ @version $Id$
+                        ------------------------------
+                                Installation
+						------------------------------
+
+Installation Guide
+
+  After downloading an appropriate distribution, you need to install it into
+  your webapp. Read the applying topics in this guide from top to bottom.
+
+* Integration pack installation
+
+  Installing the integration pack, its dependencies, and a preferred SLF4J binding.
+
+** Using Maven 2
+
+   If you have already declared the dependency reference as described in the
+   {{{download.html}Download Guide}}, Maven has already installed everything for
+   you. You just need to declare the chosen SFL4J binding and corresponding backend
+   (may be optional) in the dependencies section of your POM within the <runtime> scope.
+
+** Manual installation
+
+   Simply put the downloaded core jar, its dependencies and your favorite SFL4J
+   binding together with the corresponding backend (may be optional) in your
+   classpath (usually <<<WEB-INF/lib>>>) and you are ready to go.
+
+* FCKeditor installation
+
+  Although the public distribution is fine, it still contains a lot of superfluous
+  files for a Java environment. Use the following <<<Ant>>> target on the FCKeditor
+  ${FCKeditorVersion} zip file (1,34 MiB) to create a cleaner and smaller distribution
+  zip file (1036 KiB). After the reduction you can unzip the smaller distribution zip
+  file into your webapp.
+
++------------------------------------------------------------------------------+
+<target name="stripped-fckeditor-dist" description="Creates a stripped FCKeditor distribution">
+  <!-- Adapt these properties to your needs -->
+  <property name="fckeditor-tmp" location="fckeditor-tmp" />
+  <property name="fckeditor-basename" value="FCKeditor_${FCKeditorVersion}" />
+  <property name="fckeditor-destfile" value="${fckeditor-basename}_clean.zip" />
+
+  <delete file="${fckeditor-destfile}" />
+  <unzip dest="${fckeditor-tmp}" src="${fckeditor-basename}.zip" />
+  <zip destfile="${fckeditor-destfile}">
+    <zipfileset dir="${fckeditor-tmp}/fckeditor" prefix="fckeditor">
+      <include name="_samples/_plugins/" />
+      <include name="editor/" />
+      <include name="fckconfig.js" />
+      <include name="*.xml" />
+      <exclude name="editor/filemanager/connectors/" />
+    </zipfileset>
+  </zip>
+  <delete dir="${fckeditor-tmp}" />
+</target>
++------------------------------------------------------------------------------+
Index: /FCKeditor.Java/branches/2.6.x/src/site/apt/int_overview.apt
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/site/apt/int_overview.apt	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/site/apt/int_overview.apt	(revision 4150)
@@ -0,0 +1,39 @@
+~~ FCKeditor - The text editor for Internet - http://www.fckeditor.net
+~~ Copyright (C) 2004-2009 Frederico Caldeira Knabben
+~~
+~~ == BEGIN LICENSE ==
+~~
+~~ Licensed under the terms of any of the following licenses at your
+~~ choice:
+~~
+~~  - GNU General Public License Version 2 or later (the "GPL")
+~~    http://www.gnu.org/licenses/gpl.html
+~~
+~~  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+~~    http://www.gnu.org/licenses/lgpl.html
+~~
+~~  - Mozilla Public License Version 1.1 or later (the "MPL")
+~~    http://www.mozilla.org/MPL/MPL-1.1.html
+~~
+~~ == END LICENSE ==
+~~ @version $Id$
+				--------------------------
+					Integration Overview
+				--------------------------
+
+Overview
+
+  The Java integration can be integrated in several systems and frameworks:
+
+  * <<JSP tag library>>: Easy integration of the FCKeditor in your JSPs.
+
+  * <<Connector Servlet>>: A servlet to manage resources like images, documents,
+    and other files.
+
+  * <<Velocity/FreeMarker>>: This library is suitable to be integrated into a
+    template engine.
+
+  []
+
+  Please read the integration parts carefully if you intend to deploy the FCKeditor
+  in a particular system!
Index: /FCKeditor.Java/branches/2.6.x/src/site/apt/localization.apt
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/site/apt/localization.apt	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/site/apt/localization.apt	(revision 4150)
@@ -0,0 +1,137 @@
+~~ FCKeditor - The text editor for Internet - http://www.fckeditor.net
+~~ Copyright (C) 2004-2009 Frederico Caldeira Knabben
+~~
+~~ == BEGIN LICENSE ==
+~~
+~~ Licensed under the terms of any of the following licenses at your
+~~ choice:
+~~
+~~  - GNU General Public License Version 2 or later (the "GPL")
+~~    http://www.gnu.org/licenses/gpl.html
+~~
+~~  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+~~    http://www.gnu.org/licenses/lgpl.html
+~~
+~~  - Mozilla Public License Version 1.1 or later (the "MPL")
+~~    http://www.mozilla.org/MPL/MPL-1.1.html
+~~
+~~ == END LICENSE ==
+~~ @version $Id$
+				-------------------------------
+					LocaleResolver Interface
+				-------------------------------
+
+Localization
+
+  The integration pack offers you the capability to localize any string returned
+  to the user on a global basis and on a per-locale basis depending on the
+  deployed framework/system (Request, JSTL, Struts, Spring, and other).
+
+  Read on to see how you can refit the system to your needs:
+
+* Rationale
+
+  Interaction with the File Browser may cause messages responded to the user
+  about the state of the system from the view of the user. The messages are
+  hard-coded in English which is a big annoyance in an international deployment.
+  You can now change all of them to other defaults and localize to an arbitrary
+  locale of your choice.
+
+* The interface
+
+  Consult the JavaDocs of the interface {{{java-core/apidocs/net/fckeditor/localization/LocaleResolver.html}<<<net.fckeditor.localization.LocaleResolver>>>}}
+  to see how it works.
+
+** Choosing an implementation
+
+  You have to choose an implementation, either an existing or a custom one.
+
+  Existing, ready-to-go implementations:
+
+   * {{{java-core/apidocs/net/fckeditor/localization/impl/AcceptLanguageHeaderResolver.html}<<<net.fckeditor.localization.impl.AcceptLanguageHeaderResolver>>>}} (default):
+     It retrieves the first locale in the HTTP <<<Accept-Language>>> header if
+     available.
+
+   * {{{java-core/apidocs/net/fckeditor/localization/impl/JstlResolver.html}<<<net.fckeditor.localization.impl.JstlResolver>>>}}:
+     The user locale will be retrieved from the session set by JSTL's <<<fmt>>>
+     tag or similar.
+
+   []
+
+  If no existing implementation suits your needs, create your own. Implement the
+  interface and resolve the locale the way you want.
+
+** Declaring an implementation
+
+   After your have chosen your desired implementation, you have to declare it.
+   Put the fully-qualified class name of the implementation in your
+   <<<fckeditor.properties>>>:
+
++------------------------------------------------------------------------------+
+  localization.localeResolverImpl=<desired implementation>
++------------------------------------------------------------------------------+
+
+* The messages
+
+    [Hint:] The resolver system is fail-safe concerning localized message retrieval.
+            This means that if a localized message cannot be found, the default
+            message will be used by default.
+
+  Each returned message can be localized on a global basis and on a per-locale basis.
+  Put your globally localized strings in a <<<fckeditor_messages.properties>>>
+  and your per-locale localized strings in a <<<fckeditor_messages_\<locale\>.properties>>>
+  file.
+
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+|| Property							|| Default									|| Valid Values	|| Description                                     ||
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+| editor.compatibleBrowser.yes		| Your browser is fully compatible			| any string	| Indicates that the browser is fully compatible.	|
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+| editor.compatibleBrowser.no		| Your browser is not compatible			| any string	| Indicates that the browser is not compatible.		|
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+| connector.						| Invalid command specified					| any string	| The provided command was invalid/does not exist.	|
+| invalid_command_specified			|											|				|													|
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+| connector.						| Invalid resource type specified			| any string	| The provided type was invalid/does not exist.		|
+| invalid_resource_type_specified	|											|				|													|
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+| connector.						| Invalid current folder specified			| any string	| The provided current folder was invalid/does		|
+| invalid_current_folder_specified	|											|				| not exist.										|
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+| connector.getResources.enabled	| You are authorized to browse/list			| any string	| Notifies the user that (s)he can browse/list files|
+|									| files and/or folders!						|				| and/or folders.									|
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+| connector.getResources.disabled	| You are not authorized to browse/list		| any string	| Notifies the user that (s)he cannot browse/list	|
+|									| files and/or folders!						|				| files and/or folders.								|
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+| connector.getResources.read_error	| The selected resources could not			| any string	| Notifies the user that during resource retrieval	|
+|									| be read successfully, please try again!	|				| some error/exception has occurred.				|
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+| connector.createFolder.enabled	| You are authorized to create folders!		| any string	| Notifies the user that (s)he can create folders.	|
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+| connector.createFolder.disabled	| You are not authorized to create folders!	| any string	| Notifies the user that (s)he cannot create folders.|
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+| connector.createFolder.			| Invalid new folder name specified			| any string	| The provided new folder name was invalid.			|
+| invalid_new_folder_name_specified	|											|				|													|
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+| connector.createFolder.			| The specified folder already exists		| any string	| The specified folder already exists on the		|
+| folder_already_exists_error		|											|				| server.											|
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+| connector.						| The specified folder could not			| any string	| Notifies the user that during folder creation		|
+| createFolder.write_error			| be created successfully, please try again!|				| some error/exception has occurred.				|
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+| connector.fileUpload.enabled		| You are authorized to upload files!		| any string	| Notifies the user that (s)he can upload files.	|
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+| connector.fileUpload.disabled		| You are not authorized to upload files!	| any string	| Notifies the user that (s)he cannot upload files.	|
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+| connector.fileUpload.				| Your file was uploaded successfully		| any string	| Warns the user that the file upload was successful|
+| file_renamed_warning				| but has been renamed to '\{0\}'.			| \{0\} - new filename| but it has been renamed because another file|
+|									|											|				| exists with the same name.						|
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+| connector.fileUpload.				| The uploaded has a wrong file type		| any string	| Warns the user that the uploaded file type		|
+| invalid_file_type_specified		| (extension).								|				| (extension) does not pass the resource type's		|
+|									|											|				| allowed/denied list.								|
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+| connector.fileUpload.write_error	| The specified file could not be			| any string	| Notifiles the user that during file upload		|
+|									| uploaded successfully, please try again!	|				| some error/exception has occurred.				|
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
Index: /FCKeditor.Java/branches/2.6.x/src/site/apt/properties.apt
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/site/apt/properties.apt	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/site/apt/properties.apt	(revision 4150)
@@ -0,0 +1,162 @@
+~~ FCKeditor - The text editor for Internet - http://www.fckeditor.net
+~~ Copyright (C) 2004-2009 Frederico Caldeira Knabben
+~~
+~~ == BEGIN LICENSE ==
+~~
+~~ Licensed under the terms of any of the following licenses at your
+~~ choice:
+~~
+~~  - GNU General Public License Version 2 or later (the "GPL")
+~~    http://www.gnu.org/licenses/gpl.html
+~~
+~~  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+~~    http://www.gnu.org/licenses/lgpl.html
+~~
+~~  - Mozilla Public License Version 1.1 or later (the "MPL")
+~~    http://www.mozilla.org/MPL/MPL-1.1.html
+~~
+~~ == END LICENSE ==
+~~ @version $Id$
+                   ------------------------------
+                       Configuration reference
+                   ------------------------------
+
+Configuration setting
+
+  In the meaning of 'convention over configuration' all properties are optional.
+  Define only those you intend to override for the <entire> web application.
+
+  There are two ways to override the default properties:
+
+  * By creating a <<<fckeditor.properties>>> file in the classpath (usually
+    <<<WEB-INF/classes>>>):
+
++------------------------------------------------------------------------------+
+  ...
+  fckeditor.toolbarSet=Basic
+  connector.userActionImpl=net.fckeditor.requestcycle.impl.EnabledUserAction
+  ...
++------------------------------------------------------------------------------+
+
+  * By calling dynamically the <<<PropertiesHolder>>> class:
+
++------------------------------------------------------------------------------+
+  ...
+  import net.fckeditor.handlers.PropertiesLoader;
+  ...
+  PropertiesLoader.setProperty("fckeditor.toolbarSet", "Basic");
+  PropertiesLoader.setProperty("connector.userActionImpl",
+                   "net.fckeditor.requestcycle.impl.EnabledUserAction");
+  ...
++------------------------------------------------------------------------------+
+
+    [Attention:] It is essential to know how to use the <<<PropertiesHolder>>>.
+                 Like the common properties usage, you should use it only at the
+                 start of your web application. If you don't have a kind of
+                 an 'initialization' servlet, where you could place the
+                 <<<PropertiesLoader>>> calls, we suggest for you to write your own
+                 <<<ServletContextListener>>>. So you guarantee, you call the
+                 <<<PropertiesLoader>>> <before> the <<<ConnectorServlet>>> is
+                 initialized.
+
+  []
+
+  As you can see, setting a property is equal in both ways. The tables below
+  list all configurable properties for the integration pack.
+
+Configuration properties
+
+* FCKeditor
+
+*------------------------------------+--------------------------------+-----------------------------+-----------------------------------+
+|| Property                          || Default                       || Valid Values               || Description                     ||
+*------------------------------------+--------------------------------+-----------------------------+-----------------------------------+
+| fckeditor.toolbarSet \ \ \ \ \ \ 	 | Default                		  | any string \ \ \ \ \ \      | Indicates the toolbar set you want to load. If you provide a name which does not exist, the editor will fail to load. |
+*------------------------------------+--------------------------------+-----------------------------+-----------------------------------+
+| fckeditor.width	                 | 200	                          | any string					| Indicates the editor width. 		|
+*------------------------------------+--------------------------------+-----------------------------+-----------------------------------+
+| fckeditor.height	                 | 100%						      | any string                  | Indicates the editor height. 		|
+*------------------------------------+--------------------------------+-----------------------------+-----------------------------------+
+| fckeditor.basePath		         | /fckeditor \ \ \ \ \ \         | any path                    | The default path of the editor installation resides within your webapp. |
+|                                    | 							      |                             | Change this value only if you install the editor under a different name or maintain several editor installations. |
+*------------------------------------+--------------------------------+-----------------------------+-----------------------------------+
+
+* Connector
+
+  The integration library supports file, flash, image, and media resource types.
+  Replace <type name> in the property name with "file", "flash", "image", or
+  "media".
+
+  Define <<either>> an allowed <<or>> denied list. If an allowed list is
+  pre-defined overwrite it with an empty list and define your denied list as you
+  wish.
+
+*-------------------------------+-------------------------------------------+---------------------------+---------------------------------------------------+
+|| Property                     || Default									|| Valid Values             || Description                                     ||
+*-------------------------------+-------------------------------------------+---------------------------+---------------------------------------------------+
+| connector.resourceType.<type	| /<type name>								| any path					| Indicates the resource type path to retrieve and	|
+| name>.path					|											|							| store files.										|
+*-------------------------------+-------------------------------------------+---------------------------+---------------------------------------------------+
+| connector.resourceType.<type	|											| any extension				| List with extensions which should be denied.		|
+| name>.extensions.denied		|											|							| Separate extensions with a \| (pipe symbol).		|
+*-------------------------------+-------------------------------------------+---------------------------+---------------------------------------------------+
+| connector.resourceType.file.	| 7z\|aiff\|asf\|avi\|bmp\|csv\|doc\|fla\|	| any extension				| List with extensions which should be allowed.		|
+| extensions.allowed			| flv\|gif\|gz\|gzip\|jpeg\|jpg\|mid\|mov\|	|							| Separate extensions with a \| (pipe symbol).		|
+|								| mp3\|mp4\|mpc\|mpeg\| mpg\|ods\|			|							|													|
+|								| odt\|pdf\|png\|ppt\|pxd\|qt\|ram\|rar\|	|							|													|
+|								| rm\|rmi\|rmvb\|rtf\|sdc\|sitd\|swf\|		|							|													|
+|								| sxc\|sxw\|tar\|tgz\|tif\|tiff\|txt\|vsd\| |							|													|
+|								| wav\|wma\|wmv\|xls\|xml\|zip				|							|													|
+*-------------------------------+-------------------------------------------+---------------------------+---------------------------------------------------+
+| connector.resourceType.flash. | swf\|fla									| any extension		 	 	| See above.										|
+| extensions.allowed			|						 					|							|													|
+*-------------------------------+-------------------------------------------+---------------------------+---------------------------------------------------+
+| connector.resourceType.image.	| bmp\|gif\|jpeg\|jpg\|png					| any extension				| See above.										|
+| extensions.allowed			|											|							|													|
+*-------------------------------+-------------------------------------------+---------------------------+---------------------------------------------------+
+| connector.resourceType.media.	| aiff\|asf\|avi\|bmp\|fla\|flv\|gif\|jpeg\|| any extension				| See above.										|
+| extensions.allowed			| jpg\|mid\|mov\|mp3\|mp4\|mpc\|mpg\|		|							|													|
+|								| mpeg\|png\|qt\|ram\|rm\|rmi\|rmvb\|		|							|													|
+|								| swf\|tif\|tiff\|wav\|wma\|wmv				|							|													|
+*-------------------------------+-------------------------------------------+---------------------------+---------------------------------------------------+
+| connector.userFilesPath		| /userfiles								| any path					| Indicates the URL path under which files can be	|
+|								|											|							| retrieved from the server. Prepend the domain		|
+|								|											|							| name if you want to have the full URL. For more	|
+|								|											|							| details see {{{userpathbuilder.html}here}}.		|
+*-------------------------------+-------------------------------------------+---------------------------+---------------------------------------------------+
+| connector.userFilesAbsolutePath| /userfiles								| any path					| Indicates the system path under which files can	|
+|								|											|							| be stored on the backend. For more details see	|
+|								|											|							| {{{userpathbuilder.html}here}}.					|
+*-------------------------------+-------------------------------------------+---------------------------+---------------------------------------------------+
+| connector.forceSingleExtension| true										| true, false (boolean)		| Indicates whether filenames with multiple 		|
+|								|											|							| extensions are sanitized.							|
+*-------------------------------+-------------------------------------------+-------------------------- +---------------------------------------------------+
+| connector.secureImageUploads	|true										| true, false (boolean)		| Checks uploaded images for validity.				|
+|								|											|							| I.e. the uploaded file is a real image and not any|
+|								|											|							| other renamed file type. (magic bytes check)		|
+*-------------------------------+-------------------------------------------+---------------------------+---------------------------------------------------+
+| connector.impl				| {{{java-core/apidocs/net/fckeditor/connector/impl/ContextConnector.html}<<<net.fckeditor.connector. | any fully-qualified class	| Provides a custom server-side connector for the	|
+|								| impl.ContextConnector>>>}}				| name of a valid {{{java-core/apidocs/net/fckeditor/connector/Connector.html}<<<Connector>>>}}  | File Browser. For more details see {{{connector.html}here}}. |
+|								|											| implementation			|													|
+*-------------------------------+-------------------------------------------+---------------------------+---------------------------------------------------+
+| connector.userActionImpl		| {{{java-core/apidocs/net/fckeditor/requestcycle/impl/DisabledUserAction.html}<<<net.fckeditor.requestcycle. | any fully-qualified class	| Provides custom security functions for the File	|
+|								| impl.DisabledUserAction>>>}}				| name of a valid {{{java-core/apidocs/net/fckeditor/requestcycle/UserAction.html}<<<UserAction>>>}}  | Browser Connector. For more details see {{{useraction.html}here}}. |
+|								|											| implementation			|													|
+*-------------------------------+-------------------------------------------+---------------------------+---------------------------------------------------+
+| connector.userPathBuilderImpl | {{{java-core/apidocs/net/fckeditor/requestcycle/impl/ContextPathBuilder.html}<<<net.fckeditor.requestcycle. | any fully-qualified class	| Provides a custom function for constructing a user-dependent <<<UserFilesPath>>> for the File |
+|								| impl.ContextPathBuilder>>>}}				| name of a valid {{{java-core/apidocs/net/fckeditor/requestcycle/UserPathBuilder.html}<<<UserPathBuilder>>>}} | Browser Connector. For more details see {{{userpathbuilder.html}here}}. |
+|								|											| implementation			|													|
+*-------------------------------+-------------------------------------------+---------------------------+---------------------------------------------------+
+
+* Localization
+
+  You can make the integration pack locale-aware by defining a locale resolver.
+  See {{{localization.html}Localization}} for more details.
+
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+|| Property							|| Default									|| Valid Values	|| Description                                     ||
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
+| localization.localeResolverImpl	| {{{java-core/apidocs/net/fckeditor/localization/impl/AcceptLanguageHeaderResolver.html}<<<net.fckeditor.localization.impl. | any fully-qualified class | Provides localization capabilites for the integration pack. For more details see {{{localization.html}here}}. |
+|									| AcceptLanguageHeaderResolver>>>}}			| name of a valid {{{java-core/apidocs/net/fckeditor/localization/LocaleResolver.html}<<<LocaleResolver>>>}} |  |
+|									|											| implementation|													|
+*-----------------------------------+-------------------------------------------+---------------+---------------------------------------------------+
Index: /FCKeditor.Java/branches/2.6.x/src/site/apt/taglibrary.apt
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/site/apt/taglibrary.apt	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/site/apt/taglibrary.apt	(revision 4150)
@@ -0,0 +1,51 @@
+~~ FCKeditor - The text editor for Internet - http://www.fckeditor.net
+~~ Copyright (C) 2004-2009 Frederico Caldeira Knabben
+~~
+~~ == BEGIN LICENSE ==
+~~
+~~ Licensed under the terms of any of the following licenses at your
+~~ choice:
+~~
+~~  - GNU General Public License Version 2 or later (the "GPL")
+~~    http://www.gnu.org/licenses/gpl.html
+~~
+~~  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+~~    http://www.gnu.org/licenses/lgpl.html
+~~
+~~  - Mozilla Public License Version 1.1 or later (the "MPL")
+~~    http://www.mozilla.org/MPL/MPL-1.1.html
+~~
+~~ == END LICENSE ==
+~~ @version $Id$
+                    ---------------------
+                         Tag Library
+                    ---------------------
+
+Tag library
+
+  Declare the tag extension in each JSP page that uses the FCKeditor.Java taglib.
+  The uri directive must match the uri defined in the {{{java-core/tagreference.html}tag reference}}.
+  The prefix identifies the tags in the tag library within a JSP page.
+
++------------------------------------------------------------------------------+
+  <%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
++------------------------------------------------------------------------------+
+
+  The declaration, if you are using a JSP XML syntax, looks like:
+
++------------------------------------------------------------------------------+
+  <jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page"
+     xmlns:FCK="http://java.fckeditor.net">
++------------------------------------------------------------------------------+
+
+  Now you are set to use the taglib. A brief declaration would be:
+
++------------------------------------------------------------------------------+
+  <FCK:editor instanceName="EditorDefault">
+    <jsp:attribute name="value">This is some <strong>sample text</strong>.
+      You are using <a href="http://www.fckeditor.net">FCKeditor</a>.
+    </jsp:attribute>
+  </FCK:editor>
++------------------------------------------------------------------------------+
+
+  For a more complete overview, take a look at the {{{java-core/tagreference.html}tag reference}}.
Index: /FCKeditor.Java/branches/2.6.x/src/site/apt/upgrade_notes.apt.vm
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/site/apt/upgrade_notes.apt.vm	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/site/apt/upgrade_notes.apt.vm	(revision 4150)
@@ -0,0 +1,73 @@
+~~ FCKeditor - The text editor for Internet - http://www.fckeditor.net
+~~ Copyright (C) 2004-2009 Frederico Caldeira Knabben
+~~
+~~ == BEGIN LICENSE ==
+~~
+~~ Licensed under the terms of any of the following licenses at your
+~~ choice:
+~~
+~~  - GNU General Public License Version 2 or later (the "GPL")
+~~    http://www.gnu.org/licenses/gpl.html
+~~
+~~  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+~~    http://www.gnu.org/licenses/lgpl.html
+~~
+~~  - Mozilla Public License Version 1.1 or later (the "MPL")
+~~    http://www.mozilla.org/MPL/MPL-1.1.html
+~~
+~~ == END LICENSE ==
+~~ @version $Id$
+                        ------------------------------
+                                Upgrades Notes
+                        ------------------------------
+
+Upgrade Notes
+
+ These upgrade notes shall guide you through the changes made from one version
+ to another.\
+ Although we maintain {{{changes-report.html}Release Notes}}, it is still viable
+ to know which changes may/will break or affect your current deployment. Thus these
+ notes should be taken as advice to which changes you should really pay attention to.\
+ Please refer to the {{{java-core/clirr-report.html}Clirr report}} for a more
+ detailed view of binary and API changes between the current and previous release.
+
+* Upgrading from 2.5.x
+
+*-------------------------------+----------------------------------------------+
+|| Ticket						|| Remark									  ||
+*-------------------------------+----------------------------------------------+
+| -								| -												|
+*-------------------------------+----------------------------------------------+
+| {{{${ticketUrl}/3889}3889}}	| The minimum requirement for Maven	has been raised to version 2.0.10 if you plan to compile the integration pack yourself. | 
+*-------------------------------+----------------------------------------------+
+
+* Upgrading from 2.4.x
+
+*-------------------------------+----------------------------------------------+
+|| Ticket						|| Remark									  ||
+*-------------------------------+----------------------------------------------+
+| -								| The FCKeditor class enforces now less checks and the FCKConfig can now be set one-by-one only. |
+*-------------------------------+----------------------------------------------+
+| {{{${ticketUrl}/2743}2743}}	| Add <<<{{{java-core/apidocs/net/fckeditor/requestcycle/UserPathBuilder.html#getUserFilesAbsolutePath(javax.servlet.http.HttpServletRequest)}getUserFilesAbsolutePath}}>>> to <<<{{{java-core/apidocs/net/fckeditor/requestcycle/UserPathBuilder.html}UserPathBuilder}}>>> interface, implement this method in your builder too. |
+*-------------------------------+----------------------------------------------+
+| -								| The features/commands <<<FolderCreation>>> and <<<FileBrowsing>>> in the {{{java-core/tagreference.html#FCK:check}CheckTag}} have been deprecated. |
+*-------------------------------+----------------------------------------------+
+| {{{${ticketUrl}/2618}2618}}	| So far we have used ImageInfo which was incorporated into our core jar. We have refactored it and removed from our jar. It is now on |
+|								| Maven Central Repo. Maven users do not have to bother but those who don't use Maven please make sure that the ImageInfo jar is on |
+|								| your classpath. The jar is bundled with the binary distribution. |
+*-------------------------------+----------------------------------------------+
+| {{{${ticketUrl}/2608}2608}}	| The FCKeditor value will now be passed as-is, whitespace won't be truncated anymore. |
+*-------------------------------+----------------------------------------------+
+| {{{${ticketUrl}/2583}2583}}	| The ConnectorServlet will fail in some environments when the deployed war file won't be expanded. If this happens, the |
+|								| ConnectorServlet will emit an appropriate log message. Consider to switch to another {{{connector.html}Connector}}. |
+*-------------------------------+----------------------------------------------+
+| {{{${ticketUrl}/2582}2582}}	| Path handling has been aligned to other connector implementations. The FullUrl property is gone ({{{faq.html#context-fullurl}FAQ}}). the UserFilesPath has slightly |
+|								| changed semantics and an UserFilesAbsolutePath property has been introduced. Please check the {{{properties.html}Configuration}} for more details. |
+*-------------------------------+----------------------------------------------+
+| {{{${ticketUrl}/2580}2580}}	| The implementation <<<{{{java-core/apidocs/net/fckeditor/requestcycle/impl/UserActionImpl.html}UserActionImpl}}>>> has been deprecated in favor of <<<{{{java-core/apidocs/net/fckeditor/requestcycle/impl/EnabledUserAction.html}EnabledUserAction}}>>>. Both classes are functionally equal. |
+*-------------------------------+----------------------------------------------+
+| {{{${ticketUrl}/2383}2383}}	| We provide several implementations for every interface. If you don't pick any particaluar implementation, don't worry, we will pick a |
+|								| suitable one for you.						   |
+*-------------------------------+----------------------------------------------+
+| {{{${ticketUrl}/2382}2382}}	| The <<<{{{java-core/apidocs/net/fckeditor/requestcycle/UserAction.html}UserAction}}>>> interface has now one more method <<<{{{java-core/apidocs/net/fckeditor/requestcycle/UserAction.html#isCreateFolderEnabled(javax.servlet.http.HttpServletRequest)}isCreateFolderEnabled}}>>>. If you have deployed your own implementation, please adapt it. |
+*-------------------------------+----------------------------------------------+
Index: /FCKeditor.Java/branches/2.6.x/src/site/apt/useraction.apt
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/site/apt/useraction.apt	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/site/apt/useraction.apt	(revision 4150)
@@ -0,0 +1,89 @@
+~~ FCKeditor - The text editor for Internet - http://www.fckeditor.net
+~~ Copyright (C) 2004-2009 Frederico Caldeira Knabben
+~~
+~~ == BEGIN LICENSE ==
+~~
+~~ Licensed under the terms of any of the following licenses at your
+~~ choice:
+~~
+~~  - GNU General Public License Version 2 or later (the "GPL")
+~~    http://www.gnu.org/licenses/gpl.html
+~~
+~~  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+~~    http://www.gnu.org/licenses/lgpl.html
+~~
+~~  - Mozilla Public License Version 1.1 or later (the "MPL")
+~~    http://www.mozilla.org/MPL/MPL-1.1.html
+~~
+~~ == END LICENSE ==
+~~ @version $Id$
+				-------------------------
+					UserAction Interface
+				-------------------------
+
+User Action
+
+  The integration pack offers you control over every command sent by a user
+  through the File Browser.
+
+  Read on to see how you can refit the system to your needs:
+
+* Rationale
+
+  Throughout the life cycle of the File Browser, several commands are sent with
+  payload to retrieve and create objects on the server. The Connector Servlet
+  receives the commands and responds as necessary to them. You are now able to
+  intercept the commands and tell the Connector Servlet if the current request
+  is actually enabled to perform this command on the server.\
+  The {{{http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Server_Side_Integration#The_Commands}Server Side Integration}}
+  defines five different types of commands for the File Browser which are
+  mapped to three internal commands:
+
+  * <<<GetFolders>>> and <<<GetFoldersAndFiles>>> to <<<GetResources>>>
+
+  * <<<CreateFolder>>> to <<<CreateFolder>>>
+
+  * <<<FileUpload>>> and <<<QuickUpload>>> to <<<FileUpload>>>
+
+  []
+
+  Based on these commands you can mandate globally and/or on per-user basis which
+  commands will be executed.
+
+* The interface
+
+  Consult the JavaDocs of the interface {{{java-core/apidocs/net/fckeditor/requestcycle/UserAction.html}<<<net.fckeditor.requestcycle.UserAction>>>}}
+  to see how it works.
+
+** Choosing an implementation
+
+  You have to choose an implementation, either an existing or a custom one.
+
+  Existing, ready-to-go implementations:
+
+   * {{{java-core/apidocs/net/fckeditor/requestcycle/impl/DisabledUserAction.html}<<<net.fckeditor.requestcycle.impl.DisabledUserAction>>>}} (default):
+     It always returns <<<false>>> for every method.
+
+   * {{{java-core/apidocs/net/fckeditor/requestcycle/impl/EnabledUserAction.html}<<<net.fckeditor.requestcycle.impl.EnabledUserAction>>>}}:
+     It always returns <<<true>>> for every method.
+
+   []
+
+  If no existing implementation suits your needs, create your own. Implement the
+  interface and resolve the locale the way you want.
+
+** Declaring an implementation
+
+   After your have chosen your desired implementation, you have to declare it.
+   Put the fully-qualified class name of the implementation in your
+   <<<fckeditor.properties>>>:
+
++------------------------------------------------------------------------------+
+  connector.userActionImpl=<desired implementation>
++------------------------------------------------------------------------------+
+
+* User response
+
+  The system will respond messages to the user as they may be necessary. You can
+  localized every one of them. See {{{localization.html}Localization}} for more
+  details.
Index: /FCKeditor.Java/branches/2.6.x/src/site/apt/userpathbuilder.apt
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/site/apt/userpathbuilder.apt	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/site/apt/userpathbuilder.apt	(revision 4150)
@@ -0,0 +1,90 @@
+~~ FCKeditor - The text editor for Internet - http://www.fckeditor.net
+~~ Copyright (C) 2004-2009 Frederico Caldeira Knabben
+~~
+~~ == BEGIN LICENSE ==
+~~
+~~ Licensed under the terms of any of the following licenses at your
+~~ choice:
+~~
+~~  - GNU General Public License Version 2 or later (the "GPL")
+~~    http://www.gnu.org/licenses/gpl.html
+~~
+~~  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+~~    http://www.gnu.org/licenses/lgpl.html
+~~
+~~  - Mozilla Public License Version 1.1 or later (the "MPL")
+~~    http://www.mozilla.org/MPL/MPL-1.1.html
+~~
+~~ == END LICENSE ==
+~~ @version $Id$
+				--------------------------------
+					UserPathBuilder Interface
+				--------------------------------
+
+Userpath builder
+
+  The integration pack offers you control over the path under which files from the
+  File Browser are stored and browsed, additionally the URL they are reflected by.
+
+  Read on to see how you can refit the system to your needs:
+
+* Rationale
+
+  Hard-coded storage paths can be cumbersome under certain circumstances. You may
+  need to change the storage path on-the-fly or serve paths on a user/request
+  basis. You are able to calculate the absolute storage path as well as the responded
+  URL the way you want according to the underlying {{{connector.html}Connector}}.
+
+* The interface
+
+  Consult the JavaDocs of the interface {{{java-core/apidocs/net/fckeditor/requestcycle/UserPathBuilder.html}<<<net.fckeditor.requestcycle.UserPathBuilder>>>}}
+  to see how it works.
+
+** Choosing an implementation
+
+  You have to choose an implementation, either an existing or a custom one.
+
+  Ready-to-go implementations:
+
+   * {{{java-core/apidocs/net/fckeditor/requestcycle/impl/ContextPathBuilder.html}<<<net.fckeditor.requestcycle.impl.ContextPathBuilder>>>}} (default):
+     It always returns <<<connector.userFilesPath>>> with the current context
+     prepended and <<<connector.userFilesAbsolutePath>>> as-is.
+
+   * {{{java-core/apidocs/net/fckeditor/requestcycle/impl/ServerRootPathBuilder.html}<<<net.fckeditor.requestcycle.impl.ServerRootPathBuilder>>>}}:
+     It always returns <<<connector.userFiles*Path>>> properties as-is.
+
+   []
+
+  If no existing implementation suits your needs, create your own. Implement the
+  interface and resolve the paths the way you want.
+
+** Declaring an implementation
+
+   After your have chosen your desired implementation, you have to declare it.
+   Put the fully-qualified class name of the implementation in your
+   <<<fckeditor.properties>>>:
+
++------------------------------------------------------------------------------+
+  connector.userPathBuilderImpl=<desired implementation>
++------------------------------------------------------------------------------+
+
+* Path configuration
+
+  There is one common way to easily configure paths for an existing or a custom
+  implementation:
+  Create/edit the <<<fckeditor.properties>>> and set <<<connector.userFilesPath>>>
+  and <<<connector.userFilesAbsolutePath>>> properties according to the semantics of
+  the chosen implementation (see {{{properties.html}Configuration}} for details).
+
+  If you decide to create your own implementation, you are free to use our properties
+  but if you do so, access them by calling <<<PropertiesLoader#getUserFilesPath>>>
+  and <<<PropertiesLoader#getUserFilesAbsolutePath>>>.
+
+  If this still does not fit your needs, calculate the paths dynamically in the
+  getter methods and return whatever makes sense to you.
+
+    [Attention:] Every Connector relies on a specific <<<UserPathBuilder>>> implementation
+                 because it serves the paths the way the connector needs them.
+                 Make sure that your implementation is accompanied by the correct
+                 Connector. E.g. using the <<<ContextPathBuilder>>> with the <<<LocalConnector>>>
+                 may result in erroneous and undefined behavior.
Index: /FCKeditor.Java/branches/2.6.x/src/site/apt/velocity_freemarker.apt
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/site/apt/velocity_freemarker.apt	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/site/apt/velocity_freemarker.apt	(revision 4150)
@@ -0,0 +1,68 @@
+~~ FCKeditor - The text editor for Internet - http://www.fckeditor.net
+~~ Copyright (C) 2004-2009 Frederico Caldeira Knabben
+~~
+~~ == BEGIN LICENSE ==
+~~
+~~ Licensed under the terms of any of the following licenses at your
+~~ choice:
+~~
+~~  - GNU General Public License Version 2 or later (the "GPL")
+~~    http://www.gnu.org/licenses/gpl.html
+~~
+~~  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+~~    http://www.gnu.org/licenses/lgpl.html
+~~
+~~  - Mozilla Public License Version 1.1 or later (the "MPL")
+~~    http://www.mozilla.org/MPL/MPL-1.1.html
+~~
+~~ == END LICENSE ==
+~~ @version $Id$
+                        ------------------------------
+                        Velocity/FreeMarker Integration
+                        ------------------------------
+
+Integration with Velocity or FreeMarker
+
+  {{{http://velocity.apache.org}Velocity}} and {{{http://freemarker.org}FreeMarker}}
+  are quite similar and serve similar needs, they are discussed together in this
+  section.
+
+    [Hint:] This part of the documentation is just for those who are familiar
+            with Velocity or FreeMarker. It's just a hint for an approach on how
+            to use the Java Integration Pack with these template engines!
+
+  The required jars are <<<velocity-1.x.x.jar>>> or <<<freemarker-2.x.jar>>> in
+  order to work with Velocity or FreeMarker respectively and <<<commons-collections.jar>>>
+  also has to be available for Velocity. Drop the required jar files in your classpath
+  (usually <<<WEB-INF/lib>>>).
+
+  The main class that builds the HTML for the editor is {{{java-core/apidocs/net/fckeditor/FCKeditor.html}<<<net.fckeditor.FCKeditor>>>}}.
+  We propose to write a wrapper object to initialize the FCKeditor object.\
+  Take a look at this very simple example:
+
++------------------------------------------------------------------------------+
+public class FCKeditorWrapper {
+  private HttpServletRequest request;
+
+  public FCKeditorWrapper(final HttpServletRequest request) {
+    this.request = request;
+  }
+
+  public String get(final String instanceName, final String value) {
+    FCKeditor editor = new FCKeditor(request, instanceName);
+    editor.setValue(value);
+    return editor.createHtml();
+  }
+}
++------------------------------------------------------------------------------+
+
+  Let's assume you add a <<<FCKeditorWrapper>>> instance called <editor>
+  to your context objects, then you just need the following minimal template
+  example (Velocity):
+
++------------------------------------------------------------------------------+
+<form method="post" action="[servlet path]">
+   $editor.get("DefaultEditor", "Some text");
+   <input type="submit" value="OK" />
+</form>
++------------------------------------------------------------------------------+
Index: /FCKeditor.Java/branches/2.6.x/src/site/fml/faq.fml
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/site/fml/faq.fml	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/site/fml/faq.fml	(revision 4150)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ * @version: $Id$
+-->
+<faqs title="Frequently Asked Questions" toplink="false">
+
+  <part id="general">
+    <title>General</title>
+    <faq id="context-fullurl">
+      <question>
+        How do I supply a full URL if the <code>ContextPathBuilder</code> prepends the context path?
+      </question>
+      <answer>
+        The <code>ContextPathBuilder</code> does <strong>not</strong> support this
+        for a good reason. A context is a dynamic entity which is bound to an
+        arbitrary server. So you can't guarantee were your context is running 
+        in a distributed environment. If you still need the full URL, extend the
+        <code>ContextPathBuilder</code> and override the <code>getUserFilesPath</code>
+        method and return the full URL.  
+      </answer>
+    </faq>
+    <faq id="additional-context-params">
+      <question>
+        I want to pass additional parameters to the Connector. How can I achieve that?
+      </question>
+      <answer>
+        The solution is a bit tricky but easy to do. This has beeen discussed 
+        <a href="http://www.fckeditor.net/forums/viewtopic.php?f=6&amp;t=13887">here</a>.
+      </answer>
+    </faq>
+  </part>
+  
+  <part id="localization">
+    <title>Localization</title>
+   
+    <faq id="no-localized-messages">
+      <question>
+        I have localized some messages but they don't appear in the alert boxes.
+        Did I do something wrong? What can I do about it?
+      </question>
+      <answer>
+        Unfortunately the JavaScript code which responds with error messages
+        is incomplete. It does not cover all error numbers and has static error
+        messages. You can fix this by searching for all files which read the GetResponse
+        or UploadResponse and let the switch clause simply alert your localized
+        message.
+      </answer>
+    </faq>
+
+  </part>
+  
+</faqs>
Index: /FCKeditor.Java/branches/2.6.x/src/site/resources/css/site.css
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/site/resources/css/site.css	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/site/resources/css/site.css	(revision 4150)
@@ -0,0 +1,163 @@
+/*
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ * @version $Id$
+ */
+
+body {
+	background-color: #F9F2DE;
+}
+
+a, a:link, a:visited, a:active, a:hover {
+	color: #FF6600;
+	text-decoration: none;
+}
+a:hover {
+	text-decoration: underline;
+}
+a.externalLink, a.externalLink:link, a.externalLink:visited, a.externalLink:active, a.externalLink:hover {
+	padding-right: 18px;
+	color: #FF6600;
+	text-decoration: none;
+}
+a.externalLink:hover {
+	text-decoration: underline;
+}
+
+h2 {
+	background-color: white;
+	border-top: 0;
+	border-right: 0;
+	border-left: 0;
+	border-bottom: 1px solid #E2D8C0;
+	color: #3F2008;
+	font-size: x-large;
+	font-weight: bold;
+}
+
+h3 {
+	background-color: white;
+	border-top: 0;
+	border-right: 0;
+	border-left: 0;
+	border-bottom: 1px solid #E2D8C0;
+	color: #FF7011;
+	font-size: large;
+	font-weight: bold;
+}
+
+h4 {
+	background-color: white;
+	border-top: 0;
+	border-right: 0;
+	border-left: 0;
+	border-bottom: 1px solid #E2D8C0;
+	color: #FF7011;
+	font-size: medium;
+	font-weight: bold;
+}
+
+h2, h3, h4 {
+	margin: 0 0 15px 0;
+	padding: 0 0 5px 0;
+}
+
+dl {
+	background-color:  rgb(247, 247, 247);
+	border: 5px solid #FF7011;
+	padding: 4px 4px 4px 6px;
+	font-size: 90%;
+}
+dl dt {
+	color: #3F2008;
+	font-weight: bold;
+	font-size: small;
+	margin-bottom: 3px;
+}
+
+/* @group banner */
+#banner {
+	height: 68px;
+}
+
+#banner a#bannerLeft img {
+	margin: 15px 0 0 30px !important;
+}
+/* @end */
+
+/* @group breadcrumbs */
+#breadcrumbs {
+	background-color: white;
+	color: black;
+}
+
+#breadcrumbs .xleft {
+	text-shadow: none;
+}
+/* @end */
+
+/* @group footer */
+#footer .xright {
+	text-shadow: none;
+}
+/* @end */
+
+/* @group body */
+#leftColumn {
+	float: left;
+	overflow: auto;
+	width: 200px;
+	margin: 0;
+	border: 0;
+	background-color: #F9F2DE;
+}
+#navcolumn {
+	margin: 15px 0 0 30px;
+}
+
+#bodyColumn {
+	background-color: white;
+	border: 2px solid #E2D8C0;
+	margin: 15px 30px 15px 230px;
+	padding: 10px;
+}
+
+.section {
+	margin-bottom: 35px;
+	padding: 0;
+}
+
+.source {
+	margin: 1em 0px;
+	padding: 12px;
+	font-family: monospace;
+	font-size: 9pt;
+	background-color: rgb(247, 247, 247);
+}
+/* @end */
+
+
+/* @group menu */
+#navcolumn {
+	padding: 8px 4px 0 8px;
+	background-color: white;
+	border: 2px solid #E2D8C0;
+}
+
+/* @end */
Index: /FCKeditor.Java/branches/2.6.x/src/site/site.vm
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/site/site.vm	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/site/site.vm	(revision 4150)
@@ -0,0 +1,364 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+#macro ( link $href $name )
+  #if ( ( $href.toLowerCase().startsWith("http") || $href.toLowerCase().startsWith("https") ) )
+    <a href="$href" class="externalLink">$name</a>
+  #else
+    <a href="$href">$name</a>
+  #end
+#end
+
+#macro ( banner $banner $id )
+  #if ( $banner )
+    #if( $banner.href )
+      <a href="$banner.href" id="$id">
+    #else
+        <span id="$id">
+    #end
+
+    #if( $banner.src )
+        #set ( $src = $banner.src )
+        #if ( ! ( $src.toLowerCase().startsWith("http") || $src.toLowerCase().startsWith("https") ) )
+            #set ( $src = $PathTool.calculateLink( $src, $relativePath ) )
+            #set ( $src = $src.replaceAll( "\\", "/" ) )
+        #end
+        #if ( $banner.alt )
+            #set ( $alt = $banner.alt )
+        #else
+            #set ( $alt = "" )
+        #end
+        <img src="$src" alt="$alt" />
+    #else
+        $banner.name
+    #end
+
+    #if( $banner.href )
+        </a>
+    #else
+        </span>
+    #end
+  #end
+#end
+
+#macro ( links $links )
+  #set ( $counter = 0 )
+  #foreach( $item in $links )
+    #set ( $counter = $counter + 1 )
+    #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
+    #set ( $currentItemHref = $currentItemHref.replaceAll( "\\", "/" ) )
+    #link( $currentItemHref $item.name )
+    #if ( $links.size() > $counter )
+      |
+    #end
+  #end
+#end
+
+#macro ( breadcrumbs $breadcrumbs )
+  #set ( $counter = 0 )
+  #foreach( $item in $breadcrumbs )
+    #set ( $counter = $counter + 1 )
+    #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
+    #set ( $currentItemHref = $currentItemHref.replaceAll( "\\", "/" ) )
+
+    #if ( $currentItemHref == $alignedFileName || $currentItemHref == "" )
+      $item.name
+    #else
+      #link( $currentItemHref $item.name )
+    #end
+    #if ( $breadcrumbs.size() > $counter )
+      &gt;
+    #end
+  #end
+#end
+
+#macro ( displayTree $display $item )
+  #if ( $item && $item.items && $item.items.size() > 0 )
+    #foreach( $subitem in $item.items )
+      #set ( $subitemHref = $PathTool.calculateLink( $subitem.href, $relativePath ) )
+      #set ( $subitemHref = $subitemHref.replaceAll( "\\", "/" ) )
+
+      #if ( $alignedFileName == $subitemHref )
+        #set ( $display = true )
+      #end
+
+      #displayTree( $display $subitem )
+    #end
+  #end
+#end
+
+#macro ( menuItem $item )
+  #set ( $collapse = "none" )
+  #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
+  #set ( $currentItemHref = $currentItemHref.replaceAll( "\\", "/" ) )
+
+  #if ( $item && $item.items && $item.items.size() > 0 )
+    #if ( $item.collapse == false )
+      #set ( $collapse = "expanded" )
+    #else
+      ## By default collapsed
+      #set ( $collapse = "collapsed" )
+    #end
+
+    #set ( $display = false )
+    #displayTree( $display $item )
+
+    #if ( $alignedFileName == $currentItemHref || $display )
+      #set ( $collapse = "expanded" )
+    #end
+  #end
+  <li class="$collapse">
+    #if ( $item.img )
+      #if ( ! ( $item.img.toLowerCase().startsWith("http") || $item.img.toLowerCase().startsWith("https") ) )
+        #set ( $src = $PathTool.calculateLink( $item.img, $relativePath ) )
+        #set ( $src = $src.replaceAll( "\\", "/" ) )
+        <img src="$src"/>
+      #else
+        <img src="$item.img" align="absbottom" style="border-width: 0"/>
+      #end
+    #end
+    #if ( $alignedFileName == $currentItemHref )
+      <strong>$item.name</strong>
+    #else
+      #link( $currentItemHref $item.name )
+    #end
+  #if ( $item && $item.items && $item.items.size() > 0 )
+    #if ( $collapse == "expanded" )
+      <ul>
+        #foreach( $subitem in $item.items )
+          #menuItem( $subitem )
+        #end
+      </ul>
+    #end
+  #end
+  </li>
+#end
+
+#macro ( mainMenu $menus )
+  #foreach( $menu in $menus )
+    #if ( $menu.name )
+    <h5>$menu.name</h5>
+    #end
+    #if ( $menu.items && $menu.items.size() > 0 )
+    <ul>
+      #foreach( $item in $menu.items )
+        #menuItem( $item )
+      #end
+    </ul>
+    #end
+  #end
+#end
+
+#macro ( copyright )
+  #if ( $project )
+    #if ( ${project.organization} ) 
+      #set ( $period = "" )
+	#else 
+	  #set ( $period = "." )
+	#end
+	#set ( $currentYear = ${currentDate.year} + 1900 )
+    #if ( ${project.inceptionYear} && ( ${project.inceptionYear} != ${currentYear.toString()} ) )
+      ${project.inceptionYear}-${currentYear}${period}
+    #else
+      ${currentYear}${period}
+    #end
+
+    #if ( ${project.organization} )
+      #if ( ${project.organization.name} && ${project.organization.url} )
+          <a href="$project.organization.url">$project.organization.name</a>.
+      #elseif ( ${project.organization.name} )
+        $project.organization.name.
+      #end
+    #end
+  #end
+#end
+
+#macro ( publishDate $position $publishDate $version )
+  #if ( $publishDate && $publishDate.format )
+    #set ( $format = $publishDate.format )
+  #else
+    #set ( $format = "yyyy-MM-dd" )
+  #end
+
+  $dateFormat.applyPattern( $format )
+
+  #set ( $dateToday = $dateFormat.format( $currentDate ) )
+
+  #if ( $publishDate && $publishDate.position )
+    #set ( $datePosition = $publishDate.position )
+  #else
+    #set ( $datePosition = "left" )
+  #end
+
+  #if ( $version )
+    #if ( $version.position )
+      #set ( $versionPosition = $version.position )
+    #else
+      #set ( $versionPosition = "left" )
+    #end
+  #end
+
+  #set ( $breadcrumbs = $decoration.body.breadcrumbs )
+  #set ( $links = $decoration.body.links )
+
+  #if ( $datePosition.equalsIgnoreCase( "right" ) && $links && $links.size() > 0 )
+    #set ( $prefix = "&nbsp;|" )
+  #else
+    #set ( $prefix = "" )
+  #end
+
+  #if ( $datePosition.equalsIgnoreCase( $position ) )
+    #if ( ( $datePosition.equalsIgnoreCase( "right" ) ) || ( $datePosition.equalsIgnoreCase( "bottom" ) ) )
+      $prefix $i18n.getString( "site-renderer", $locale, "template.lastpublished" ): $dateToday
+      #if ( $versionPosition.equalsIgnoreCase( $position ) )
+        &nbsp;| $i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}
+      #end
+    #elseif ( ( $datePosition.equalsIgnoreCase( "navigation-bottom" ) ) || ( $datePosition.equalsIgnoreCase( "navigation-top" ) ) )
+      <div id="lastPublished">
+        $i18n.getString( "site-renderer", $locale, "template.lastpublished" ): $dateToday
+        #if ( $versionPosition.equalsIgnoreCase( $position ) )
+          &nbsp;| $i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}
+        #end
+      </div>
+    #elseif ( $datePosition.equalsIgnoreCase("left") )
+      <div class="xleft">
+        $i18n.getString( "site-renderer", $locale, "template.lastpublished" ): $dateToday
+        #if ( $versionPosition.equalsIgnoreCase( $position ) )
+          &nbsp;| $i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}
+        #end
+        #if ( $breadcrumbs && $breadcrumbs.size() > 0 )
+          | #breadcrumbs( $breadcrumbs )
+        #end
+      </div>
+    #end
+  #elseif ( $versionPosition.equalsIgnoreCase( $position ) )
+    #if ( ( $versionPosition.equalsIgnoreCase( "right" ) ) || ( $versionPosition.equalsIgnoreCase( "bottom" ) ) )
+      $prefix $i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}
+    #elseif ( ( $versionPosition.equalsIgnoreCase( "navigation-bottom" ) ) || ( $versionPosition.equalsIgnoreCase( "navigation-top" ) ) )
+      <div id="lastPublished">
+        $i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}
+      </div>
+    #elseif ( $versionPosition.equalsIgnoreCase("left") )
+      <div class="xleft">
+        $i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}
+        #if ( $breadcrumbs && $breadcrumbs.size() > 0 )
+          | #breadcrumbs( $breadcrumbs )
+        #end
+      </div>
+    #end
+  #elseif ( $position.equalsIgnoreCase( "left" ) )
+    #if ( $breadcrumbs && $breadcrumbs.size() > 0 )
+      <div class="xleft">
+        #breadcrumbs( $breadcrumbs )
+      </div>
+    #end
+  #end
+#end
+
+#macro ( poweredByLogo $poweredBy )
+    #if( $poweredBy )
+        #foreach ($item in $poweredBy)
+            #if( $item.href )
+                #set ( $href = $PathTool.calculateLink( $item.href, $relativePath ) )
+                #set ( $href = $href.replaceAll( "\\", "/" ) )
+            #else
+                #set ( $href="http://maven.apache.org/" )
+            #end
+
+            #if( $item.name )
+                #set ( $name = $item.name )
+            #else
+                #set ( $name = $i18n.getString( "site-renderer", $locale, "template.builtby" )  )
+                #set ( $name = "${name} Maven"  )
+            #end
+
+            #if( $item.img )
+                #set ( $img = $item.img )
+            #else
+                #set ( $img = "images/logos/maven-feather.png" )
+            #end
+
+            <a href="$href" title="$name" class="poweredBy">
+              #set ( $img = $PathTool.calculateLink( $img, $relativePath ) )
+              #set ( $img = $img.replaceAll( "\\", "/" ) )
+              <img alt="$name" src="$img" />
+            </a>
+        #end
+        #if( $poweredBy.isEmpty() )
+          <a href="http://maven.apache.org/" title="$i18n.getString( "site-renderer", $locale, "template.builtby" ) Maven" class="poweredBy">
+            <img alt="$i18n.getString( "site-renderer", $locale, "template.builtby" ) Maven" src="$relativePath/images/logos/maven-feather.png"></img>
+          </a>
+        #end
+    #else
+        <a href="http://maven.apache.org/" title="$i18n.getString( "site-renderer", $locale, "template.builtby" ) Maven" class="poweredBy">
+          <img alt="$i18n.getString( "site-renderer", $locale, "template.builtby" ) Maven" src="$relativePath/images/logos/maven-feather.png"></img>
+        </a>
+    #end
+#end
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>$title</title>
+    <style type="text/css" media="all">
+      @import url("$relativePath/css/maven-base.css");
+      @import url("$relativePath/css/maven-theme.css");
+      @import url("$relativePath/css/site.css");
+    </style>
+    <link rel="stylesheet" href="$relativePath/css/print.css" type="text/css" media="print" />
+    #foreach( $author in $authors )
+      <meta name="author" content="$author" />
+    #end
+    <meta http-equiv="Content-Type" content="text/html; charset=${outputEncoding}" />
+    #if ( $decoration.body.head )
+      #foreach( $item in $decoration.body.head.getChildren() )
+        ## Workaround for DOXIA-150 due to a non-desired behaviour in p-u
+        ## @see org.codehaus.plexus.util.xml.Xpp3Dom#toString()
+        ## @see org.codehaus.plexus.util.xml.Xpp3Dom#toUnescapedString()
+        #set ( $documentHeader = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" )
+        #set ( $documentHeader = $documentHeader.replaceAll( "\\", "" ) )
+        #if ( $item.name == "script" )
+          $StringUtils.replace( $item.toUnescapedString(), $documentHeader, "" )
+        #else
+          $StringUtils.replace( $item.toString(), $documentHeader, "" )
+        #end
+      #end
+    #end
+  </head>
+  <body class="composite">
+    <div id="banner">
+      #banner( $decoration.bannerLeft "bannerLeft" )
+      #banner( $decoration.bannerRight "bannerRight" )
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="breadcrumbs">
+      #publishDate( "left" $decoration.publishDate $decoration.version )
+      <div class="xright">#links( $decoration.body.links )#publishDate( "right" $decoration.publishDate $decoration.version )</div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+    <div id="leftColumn">
+      <div id="navcolumn">
+       #publishDate( "navigation-top" $decoration.publishDate $decoration.version )
+       #mainMenu( $decoration.body.menus )
+       #poweredByLogo( $decoration.poweredBy )
+       #publishDate( "navigation-bottom" $decoration.publishDate $decoration.version )
+      </div>
+    </div>
+    <div id="bodyColumn">
+      <div id="contentBox">
+        $bodyContent
+      </div>
+    </div>
+    <div class="clear">
+      <hr/>
+    </div>
+    <div id="footer">
+      <div class="xright">Copyright &#169;#copyright()All Rights Reserved.#publishDate( "bottom" $decoration.publishDate $decoration.version )</div>
+      <div class="clear">
+        <hr/>
+      </div>
+    </div>
+  </body>
+</html>
Index: /FCKeditor.Java/branches/2.6.x/src/site/site.xml
===================================================================
--- /FCKeditor.Java/branches/2.6.x/src/site/site.xml	(revision 4150)
+++ /FCKeditor.Java/branches/2.6.x/src/site/site.xml	(revision 4150)
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2004-2009 Frederico Caldeira Knabben
+ * 
+ * == BEGIN LICENSE ==
+ * 
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ * 
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ * 
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ * 
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ * 
+ * == END LICENSE ==
+ * @version: $Id$
+-->
+<project>
+
+	<publishDate position="left" format="yyyy-MM-dd" />
+	<version position="left" />
+
+	<bannerLeft>
+		<name>fckeditor</name>
+		<src>/images/fckeditor-logo.gif</src>
+		<href>http://www.fckeditor.net</href>
+	</bannerLeft>
+
+	<body>
+		<head>
+			<link rel="shortcut icon" href="images/favicon.ico"
+				type="image/x-icon"	/>
+		</head>
+		<menu name="Introduction">
+			<item name="About" href="/index.html" />
+			<item name="Release Notes" href="/changes-report.html" />
+			<item name="Upgrade Notes" href="/upgrade_notes.html" />
+			<item name="Demo" href="/demo.html" />
+			<item name="Download" href="/download.html" />
+			<item name="Installation" href="/installation.html" />
+			<item name="FAQ" href="/faq.html" />
+		</menu>
+		<menu name="Integration">
+			<item name="Overview" href="/int_overview.html" />
+			<item name="Tag library"
+				href="/taglibrary.html"
+			/>
+			<item name="Connector Servlet" href="/connector_servlet.html" />
+			<item name="Velocity/FreeMarker" href="/velocity_freemarker.html" />
+		</menu>
+		<menu name="Extending the Library">
+			<item name="Overview" href="/ext_overview.html" />
+			<item name="UserAction" href="/useraction.html" />
+			<item name="UserPathBuilder" href="/userpathbuilder.html" />
+			<item name="Connector" href="/connector.html" />
+			<item name="Localization" href="/localization.html" />
+		</menu>
+		<menu name="Reference">
+			<item name="Tag library" href="/java-core/tagreference.html" />
+			<item name="Configuration" href="/properties.html" />
+		</menu>
+		<menu name="Project Documentation">
+			<item name="Project Summary" href="/project-summary.html" />
+			<item name="Project Team" href="/team-list.html" />
+			<item name="Project License" href="/license.html" />
+			<item name="Mailing Lists" href="/mail-lists.html" />
+			<item name="Forums" href="http://www.fckeditor.net/forums/" />
+			<item name="Issue Tracking" href="/issue-tracking.html" />
+			<item name="Source Repository" href="/source-repository.html" />
+		</menu>
+		<menu name="Modules Documentation">
+			<item name="Integration Core" collapse="false">
+				<item name="Module Summary"
+					href="/java-core/project-summary.html" />
+				<item name="Dependencies"
+					href="/java-core/dependencies.html"	/>
+				<item name="Module Reports"
+					href="/java-core/project-reports.html" collapse="true">
+					<item name="JavaDocs" href="/java-core/apidocs/index.html" />
+					<item name="Clirr Report" 
+						href="/java-core/clirr-report.html" />
+					<item name="Surefire Report"
+						href="/java-core/surefire-report.html" />
+					<item name="Cobertura Test Coverage"
+						href="/java-core/cobertura/index.html" />
+					<item name="JavaNCSS Report"
+						href="/java-core/javancss.html" />
+					<item name="Source Xref" 
+						href="/java-core/xref/index.html" />
+					<item name="Test Source Xref"
+						href="/java-core/xref-test/index.html" />
+					<item name="Taglibdoc documentation"
+						href="/java-core/tlddoc/index.html"	/>
+					<item name="Tag library validation"
+						href="/java-core/taglibvalidation.html" />
+					<item name="Tag List" href="/java-core/taglist.html" />
+				</item>
+			</item>
+			<item name="Integration Demo" collapse="false">
+				<item name="Module Summary"
+					href="/java-demo/project-summary.html" />
+			<item name="Dependencies"
+					href="/java-demo/dependencies.html" />
+			</item>
+		</menu>
+	</body>
+
+	<poweredBy>
+		<logo name="Maven" href="http://maven.apache.org/"
+			img="http://maven.apache.org/images/logos/maven-inside.png"	/>
+	</poweredBy>
+
+</project>
