|
JSP Markup Reference
ICEfaces supports the JavaServer Faces JSP Document syntax, but does not process these documents via the standard JSP compilation/execution cycle. Instead, ICEfaces parses input documents directly, and assembles a JSF component tree by executing the given tags. This approach allows precise adherence to the ordering of JSF and XHTML content in the input document, thereby making the JSP Document syntax more suitable to web designers. Since Direct-to-DOM rendering makes use of a server-side DOM containing the output of the current page, it is necessary that the input document be readily represented as a DOM. This requires that the input be well-formed XML, which is the expected case for JSP Documents, but may not be adhered to in certain JSP pages. To handle JSP pages, ICEfaces converts them into JSP documents on the fly, performing a small set of transformations aimed at well-formedness (such as converting "<br>" to "<br/>"), before passing the document to the parser.
While parsing documents directly does resolve ordering problems currently present with JSP and JSF, some restrictions are introduced:
- Well-formed XHTML markup is recommended; the conversion process can only repair simple well-formedness errors. In particular, the JSP namespace must be declared (as shown below) in order for a JSP document to parse properly.
xmlns:jsp="http://java/sun.com/JSP/Page"
- JSP directives, JSP expressions and inline Java code are all ignored.
- Custom JSP tags are not supported in general as ICEfaces only executes JSP tags initially to assemble the JSF component tree (JSF tags with complex processing may also not function as expected).
- ICEfaces supports the following JSP inclusion mechanisms:
- <%@ include %> and <jsp:directive.include />: The contents of the given file will be included in the input prior to parsing. This is currently the recommended inclusion mechanism with this ICEfaces release.
- <jsp:include />: The ICEfaces parser initiates a local HTTP request to perform dynamic inclusion. The current session is preserved, but otherwise the inclusion shares no state with the including page. If possible, use static inclusion with the current ICEfaces Release.
- Deprecated XHTML tags may create unexpected results in certain browsers, and should be avoided. Page authors should use style sheets to achieve stylistic and formatting effects rather than using deprecated XHTML presentation elements. In particular, the <font> tag is known to cause issues in certain browsers.
- To produce a non-breaking space in output use "&nbsp;" instead of " ".
Copyright 2005-2009. ICEsoft Technologies, Inc. |