[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Announcement: CPPSERV 0.2.2 has been released
I am pleased to announce the release 0.2.2 of CPPSERV.
The main focus of this release was the CSP parser and
taglib support development.
The work on CSP standard taglib library has began.
This library will contain set of useful compile-time tags.
Because of some conceptual differences between compile-time
and run-time tags, which is explicit in CSP, unlike JSP, this
library will not try to imitate JSTL. Once CPPSERV C++
Server Pages have working support for run-time taglibs, the
CSTL will be implemented, to match JSTL-1.0 spec as close
as possible.
Right now CSP stdtags library contains two iterator tags:
csp:foreach_attr and csp:foreach_list.
Both iterate over a items in any collection which is model
of STL Container concept (IOW: has iterator type and
begin() and end() functions).
Difference between foreach_list and foreach_attr is the source
of the collection. foreach_list can use any valid C++ expression which
evaluates to reference to a container of specified type. foreach_attr
takes name of attribute in request, session, or servlet context, and
generates code to retrieve value of that attribute.
Here is full syntax of these tags:
<csp:foreach_attr attribute="<attribute name>" var="<iterator>"
type="<collection type>" [source="{request|session|servlet}"]
[required="{true|false}">...</csp:foreach_attr>
<csp:foreach_list list="<list>" var="<iterator>" type="<collection
type>">...</csp:foreach_list>
In case the "required" attribute of foreach_attr is set to true, and the
attribute is not set in the source context, the
servlet::taglib::MissingArgumentException
will be thrown at run time, otherwise the body of the tag simply will
not be executed at all.
There are simple usage examples in tests/taglibs/stdtagtest.csp
Another important addition is --gen-deps argument to cxxsp_compile.
When the argument is specified, the CSP parser does not generate
the C++ code. Instead it parses the CSP page and prints the full list of
files it references in makefile dependency format. This allows for
automatic dependency generation at build time, which greatly simplifies
makefile management.
--
Ilya A. Volynets-Evenbakh
http://www.total-knowledge.com