[opencms-dev] FORM VALIDATION - Integrating tools into OC
Paul D. Bain
paulbain at pobox.com
Fri Jan 21 05:43:32 CET 2005
At 06:38 AM 1/20/2005, James wrote:
>What are the best ways of validating form input data within OpenCms?
>
>Do people use the org.apache.commons.validator package and its classes?
On this list, we discussed this matter just two days ago in the
thread, "* Form VALIDATION * Jakarta Commons & Struts." Please browse the
email archives.
>How do I get the org.apache.commons.validator package into OpenCms?
You would include it as you would most other Java libraries. Unzip
the compressed jar file (for Jakarta Commons) and put the jar file into the
classpaths of your compiler and Tomcat's JVM.
>If using Struts, do I really need to use OpenCms-Struts or can I just use
>the normal Jakarta-struts?
We have discussed this before, too. You probably should _not_ use
OpenCMS-Struts. See these emails:
1. From Cory Hubert: (a) 9 Dec. 2004, "Integrating OpenCMS with Struts --
How to."
(b) 14 May 2004, "WYSIWYG editors."
2. From Joachim Arrasz: (a) 26 Sep 2003, "Struts status."
(b) 19 Jan 2005, "* Form VALIDATION * Jakarta
Commons & Struts."
3. From Andy Kriger, 21 Oct. 2004, "OpenCMS and Struts."
4. Daniel Viveiros, 26 May 2004, "General Tecnical [sic; "Technical"]
Information."
It is possible to integrate OpenCMS with development tools other
than Struts. These tools can include tag libraries, IDE's, so-called
"template engines" (e.g., Velocity), and web application development
frameworks other than Struts. See these emails:
5. From Stephan Hartman, 16 Jul 2003, "Open CMS and Tag lib."
6. From Alex!, 13 Mar 2004, "Xtags problem."
7. From Alexander Kandzior, 25 Feb 2004 "Xtags Taglib cant/wont use URI
inside OpenCMS."
8. From Stephen Cheng, 9 Jun 2004, "Integrating OpenCMS with WebWork2 or
Spring."
WebWork and Spring are application frameworks that offer an
alternative to Struts. Spring is not, however, limited to use in a web
development environment.
9. From Martin Denham, 16 Jun 2004 "How to get content from outside openCMS."
10. From Martin Kuba, 3 Jan 2005, "How to use [an] external application in
openCMS."
Finally, see the module for OpenCMS that adds support for Velocity. This
module is written by Matt Butcher and available on his web site:
http://www.aleph-null.tv/go.php/20041027-2118-364.xml
Velocity and other template engines (e.g., Freemarker and WebMacro, which
latter engine may be defunct) offer an alternative to JSP's and Struts.
>Has anyone any examples of form validation code?
Several recent books are full of such exemplary code. I recently
bought the O'Reilly, "Jakarta Commons Cookbook" (by Tim O'Brien), which
joins another on a similar topic, "Pro Jakarta Commons," by Harshad Oak. A
second, related O'Reilly is "Java Servlet and JSP cookbook" by Bruce Perry.
For each book that it publishes, O'Reilly often puts one or two chapters
online, available for download. O'Reilly might also make the exemplary code
available as a separate download.
Sincerely,
Paul Bain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050120/b4bc3dbc/attachment.htm>
More information about the opencms-dev
mailing list