001: /*
002: * Copyright (c) 1998-2008 Caucho Technology -- all rights reserved
003: *
004: * This file is part of Resin(R) Open Source
005: *
006: * Each copy or derived work must preserve the copyright notice and this
007: * notice unmodified.
008: *
009: * Resin Open Source is free software; you can redistribute it and/or modify
010: * it under the terms of the GNU General Public License as published by
011: * the Free Software Foundation; either version 2 of the License, or
012: * (at your option) any later version.
013: *
014: * Resin Open Source is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
017: * of NON-INFRINGEMENT. See the GNU General Public License for more
018: * details.
019: *
020: * You should have received a copy of the GNU General Public License
021: * along with Resin Open Source; if not, write to the
022: * Free SoftwareFoundation, Inc.
023: * 59 Temple Place, Suite 330
024: * Boston, MA 02111-1307 USA
025: *
026: * @author Scott Ferguson
027: */
028:
029: package com.caucho.jsp.java;
030:
031: import com.caucho.jsp.*;
032: import com.caucho.jsp.cfg.*;
033: import com.caucho.log.Log;
034: import com.caucho.util.CompileException;
035: import com.caucho.util.L10N;
036: import com.caucho.util.LineCompileException;
037: import com.caucho.vfs.PersistentDependency;
038: import com.caucho.xml.QName;
039:
040: import javax.servlet.jsp.tagext.SimpleTag;
041: import javax.servlet.jsp.tagext.Tag;
042: import javax.servlet.jsp.tagext.TagInfo;
043: import java.util.ArrayList;
044: import java.util.HashMap;
045: import java.util.logging.Level;
046: import java.util.logging.Logger;
047:
048: /**
049: * Generates the nodes for JSP code.
050: */
051: public class JavaJspBuilder extends JspBuilder {
052: public static final String JSTL_CORE_URI = "http://java.sun.com/jsp/jstl/core";
053: public static final String JSTL_EL_CORE_URI = "http://java.sun.com/jstl/core";
054: public static final String JSTL_RT_CORE_URI = "http://java.sun.com/jstl/core_rt";
055:
056: public static final String JSTL_FMT_URI = "http://java.sun.com/jsp/jstl/fmt";
057:
058: public static final String JSTL_EL_FMT_URI = "http://java.sun.com/jstl/fmt";
059: public static final String JSTL_RT_FMT_URI = "http://java.sun.com/jstl/fmt_rt";
060:
061: public static final String JSTL_XML_URI = "http://java.sun.com/jsp/jstl/xml";
062:
063: public static final String JSTL_EL_XML_URI = "http://java.sun.com/jstl/xml";
064: public static final String JSTL_RT_XML_URI = "http://java.sun.com/jstl/xml_rt";
065:
066: public static final String JSTL_SQL_URI = "http://java.sun.com/jsp/jstl/sql";
067:
068: public static final String JSTL_EL_SQL_URI = "http://java.sun.com/jstl/sql";
069: public static final String JSTL_RT_SQL_URI = "http://java.sun.com/jstl/sql_rt";
070:
071: public static final String JSF_CORE_URI = "http://java.sun.com/jsf/core";
072:
073: private static L10N L = new L10N(JavaJspBuilder.class);
074: private static Logger log = Logger.getLogger(JavaJspBuilder.class
075: .getName());
076:
077: static final int IGNORE = 0;
078: static final int DIRECTIVE_PAGE = IGNORE + 1;
079: static final int TEXT = DIRECTIVE_PAGE + 1;
080: static final int EXPR = TEXT + 1;
081: static final int SCRIPTLET = EXPR + 1;
082: static final int DECLARATION = SCRIPTLET + 1;
083: static final int FUNCTION = DECLARATION + 1;
084: static final int SET = FUNCTION + 1;
085: static final int INCLUDE = SET + 1;
086: static final int FORWARD = INCLUDE + 1;
087: static final int REQUEST = INCLUDE + 1;
088: static final int USE_BEAN = REQUEST + 1;
089: static final int GET_PROPERTY = USE_BEAN + 1;
090: static final int SET_PROPERTY = GET_PROPERTY + 1;
091: static final int TAG = GET_PROPERTY + 1;
092: static final int PLUGIN = TAG + 1;
093: static final int ROOT = PLUGIN + 1;
094: static final int JSP_TEXT = ROOT + 1;
095: static final int JSP_ATTRIBUTE = JSP_TEXT + 1;
096: static final int JSP_BODY = JSP_ATTRIBUTE + 1;
097:
098: static final int IF = JSP_BODY + 1;
099: static final int FOREACH = IF + 1;
100: static final int EXPR_EL = FOREACH + 1;
101:
102: static HashMap<QName, Class> _tagMap;
103: static HashMap<QName, Class> _fastTagMap;
104: static HashMap<QName, Class> _jsfTagMap;
105:
106: private JavaJspGenerator _gen;
107: private JspNode _rootNode;
108: private JspNode _currentNode;
109: private JspNode _openNode;
110:
111: private boolean _isPrototype;
112:
113: /**
114: * Creates the JSP builder.
115: */
116: public JavaJspBuilder() {
117: }
118:
119: /**
120: * Returns the generator.
121: */
122: public JspGenerator getGenerator() {
123: return _gen;
124: }
125:
126: /**
127: * Returns the root node.
128: */
129: public JspNode getRootNode() {
130: return _rootNode;
131: }
132:
133: /**
134: * Sets the prototype mode.
135: */
136: public void setPrototype(boolean prototype) {
137: _isPrototype = prototype;
138: }
139:
140: /**
141: * Gets the prototype mode.
142: */
143: public boolean isPrototype() {
144: return _isPrototype;
145: }
146:
147: /**
148: * Starts the document
149: */
150: public void startDocument() throws JspParseException {
151: try {
152: // jsp/031a
153: if (_rootNode != null)
154: return;
155:
156: if (_parseState.isTag())
157: _gen = new JavaTagGenerator(_tagManager);
158: else
159: _gen = new JavaJspGenerator(_tagManager);
160: _gen.setParseState(getParseState());
161: _gen.setJspCompiler(getJspCompiler());
162: _gen.setJspParser(getJspParser());
163: _gen.setRequireSource(getRequireSource());
164:
165: _rootNode = new JspTop();
166: _rootNode.setParseState(getParseState());
167: _rootNode.setGenerator(_gen);
168: _rootNode.setStartLocation(_sourcePath, _filename, _line);
169: _gen.setRootNode(_rootNode);
170: _gen.init();
171:
172: _currentNode = _rootNode;
173: } catch (Exception e) {
174: throw JspParseException.create(e);
175: }
176: }
177:
178: /**
179: * Starts the document
180: */
181: public void endDocument() throws JspParseException {
182: }
183:
184: /**
185: * Starts an element.
186: *
187: * @param qname the name of the element to start
188: */
189: public void startElement(QName qname) throws JspParseException {
190: Class cl = null;
191:
192: if (isFastJstl())
193: cl = _fastTagMap.get(qname);
194:
195: if (cl == null && isFastJsf()) {
196: Class type = _jsfTagMap.get(qname);
197:
198: if (JsfFacetNode.class.equals(type)
199: && _currentNode != null
200: && !JsfTagNode.class.isAssignableFrom(_currentNode
201: .getClass())) {
202: } else {
203: cl = type;
204: }
205: }
206:
207: if (cl == null)
208: cl = _tagMap.get(qname);
209:
210: if (cl != null) {
211: try {
212: JspNode node = (JspNode) cl.newInstance();
213:
214: node.setGenerator(_gen);
215: node.setParseState(_parseState);
216: node.setQName(qname);
217: node.setParent(_currentNode);
218: node.setStartLocation(_sourcePath, _filename, _line);
219:
220: _openNode = node;
221:
222: return;
223: } catch (Exception e) {
224: throw new JspParseException(e);
225: }
226: }
227:
228: if (isPrototype()) {
229: JspXmlElement elt = new JspXmlElement();
230: elt.setGenerator(_gen);
231: elt.setParseState(_parseState);
232: elt.setQName(qname);
233: elt.setParent(_currentNode);
234: elt.setStartLocation(_sourcePath, _filename, _line);
235:
236: _openNode = elt;
237:
238: return;
239: }
240:
241: if (JspNode.JSP_NS.equals(qname.getNamespace()))
242: throw new JspParseException(L.l("unknown JSP <{0}>", qname
243: .getName()));
244:
245: TagInfo tagInfo;
246:
247: try {
248: tagInfo = _gen.getTag(qname);
249: } catch (JspParseException e) {
250: throw error(e);
251: }
252:
253: if (tagInfo == null) {
254: JspXmlElement elt = new JspXmlElement();
255: elt.setGenerator(_gen);
256: elt.setParseState(_parseState);
257: elt.setQName(qname);
258: elt.setParent(_currentNode);
259: elt.setStartLocation(_sourcePath, _filename, _line);
260:
261: _openNode = elt;
262:
263: return;
264: }
265:
266: Class tagClass = null;
267:
268: try {
269: tagClass = _gen.getTagClass(qname);
270: } catch (ClassNotFoundException e) {
271: tagClass = JspTagFileSupport.class;
272: log.log(Level.FINE, e.toString(), e);
273: } catch (Exception e) {
274: throw error(e);
275: }
276:
277: if (tagInfo == null || tagClass == null)
278: throw _gen.error(L.l("<{0}> is an unknown tag.", qname
279: .getName()));
280:
281: if (tagInfo instanceof TagInfoExt) {
282: TagInfoExt tagInfoExt = (TagInfoExt) tagInfo;
283:
284: ArrayList<PersistentDependency> dependList = tagInfoExt
285: .getDependList();
286:
287: for (int i = 0; i < dependList.size(); i++) {
288: _gen.addDepend(dependList.get(i));
289: }
290: }
291:
292: if (JspTagSupport.class.isAssignableFrom(tagClass)
293: && !JspTagFileSupport.class.equals(tagClass)) {
294: // jsp/1004
295: _gen.addTagFileClass(tagClass.getName());
296: }
297:
298: if (JspTagFileSupport.class.isAssignableFrom(tagClass)) {
299: TagFileTag customTag = new TagFileTag();
300: customTag.setGenerator(_gen);
301: customTag.setParseState(_parseState);
302: customTag.setQName(qname);
303: customTag.setParent(_currentNode);
304: customTag.setTagInfo(tagInfo);
305: customTag.setTagClass(tagClass);
306:
307: _openNode = customTag;
308: _openNode.setStartLocation(_sourcePath, _filename, _line);
309: } else if (Tag.class.isAssignableFrom(tagClass)) {
310: CustomTag customTag = new CustomTag();
311: customTag.setGenerator(_gen);
312: customTag.setParseState(_parseState);
313: customTag.setQName(qname);
314: customTag.setParent(_currentNode);
315: customTag.setTagInfo(tagInfo);
316: customTag.setTagClass(tagClass);
317:
318: _openNode = customTag;
319: _openNode.setStartLocation(_sourcePath, _filename, _line);
320:
321: if (tagInfo instanceof TagInfoImpl) {
322: TldTag tldTag = ((TagInfoImpl) tagInfo).getTldTag();
323:
324: if (tldTag instanceof JsfTag) {
325: JsfTag jsfTag = (JsfTag) tldTag;
326:
327: JsfTagNode jsfTagNode = new JsfTagNode();
328: jsfTagNode.setGenerator(_gen);
329: jsfTagNode.setParseState(_parseState);
330: jsfTagNode.setQName(qname);
331: jsfTagNode.setParent(_currentNode);
332: jsfTagNode.setComponentClass(jsfTag
333: .getComponentClass());
334:
335: _openNode = jsfTagNode;
336: _openNode.setStartLocation(_sourcePath, _filename,
337: _line);
338:
339: return;
340: }
341: }
342: } else if (SimpleTag.class.isAssignableFrom(tagClass)) {
343: CustomSimpleTag customTag = new CustomSimpleTag();
344: customTag.setGenerator(_gen);
345: customTag.setParseState(_parseState);
346: customTag.setQName(qname);
347: customTag.setParent(_currentNode);
348: customTag.setTagInfo(tagInfo);
349: customTag.setTagClass(tagClass);
350:
351: _openNode = customTag;
352: _openNode.setStartLocation(_sourcePath, _filename, _line);
353: } else
354: throw _gen
355: .error(L
356: .l(
357: "<{0}>: tag class {0} must either implement Tag or SimpleTag.",
358: qname.getName(), tagClass.getName()));
359: }
360:
361: /**
362: * Starts a prefix mapping.
363: *
364: * @param prefix the xml prefix
365: * @param uri the namespace uri
366: */
367: public void startPrefixMapping(String prefix, String uri)
368: throws JspParseException {
369: getParseState().pushNamespace(prefix, uri);
370:
371: _gen.addOptionalTaglib(prefix, uri);
372: }
373:
374: /**
375: * Adds an attribute to the element.
376: *
377: * @param name the attribute name
378: * @param value the attribute value
379: */
380: public void attribute(QName name, String value)
381: throws JspParseException {
382: _openNode.addAttribute(name, value);
383: }
384:
385: /**
386: * Called when the attributes end.
387: */
388: public void endAttributes() throws JspParseException {
389: _currentNode.addChild(_openNode);
390:
391: _currentNode = _openNode;
392: _currentNode.setNamespace(_parseState.getNamespaces());
393: _currentNode.endAttributes();
394: _currentNode.setEndAttributeLocation(_filename, _line);
395: }
396:
397: /**
398: * Ends an element.
399: *
400: * @param qname the name of the element to end
401: */
402: public void endElement(String name) throws JspParseException {
403: if (!_currentNode.getTagName().equals(name)) {
404: throw error(L
405: .l(
406: "Close tag </{0}> does not match the current tag, <{1}>.",
407: name, _currentNode.getTagName()));
408: }
409:
410: try {
411: JspNode node = _currentNode;
412:
413: _currentNode = node.getParent();
414:
415: node.setEndLocation(_filename, _line);
416: node.endElement();
417:
418: _currentNode.addChildEnd(node);
419: } catch (JspLineParseException e) {
420: throw e;
421: } catch (JspParseException e) {
422: throw error(e);
423: } catch (Exception e) {
424: throw new JspParseException(e);
425: }
426: }
427:
428: /**
429: * Adds text.
430: *
431: * @param text the text to add
432: */
433: public void text(String text) throws JspParseException {
434: if (_currentNode != null) {
435: JspNode node = _currentNode.addText(text);
436:
437: if (node != null) {
438: node.setStartLocation(_sourcePath, _filename, _line);
439: }
440: }
441: }
442:
443: /**
444: * Adds text.
445: *
446: * @param text the text to add
447: */
448: public void text(String text, String srcFilename, int startLine,
449: int endLine) throws JspParseException {
450: if (_currentNode != null) {
451: JspNode node = _currentNode.addText(text);
452:
453: if (node != null) {
454: node.setStartLocation(null, srcFilename, startLine);
455: node.setEndLocation(srcFilename, endLine);
456: }
457: }
458: }
459:
460: /**
461: * Returns the current node.
462: */
463: public JspNode getCurrentNode() {
464: return _currentNode;
465: }
466:
467: public JspParseException error(String message) {
468: return new JspLineParseException(_filename + ":" + _line + ": "
469: + message + _gen.getSourceLines(_sourcePath, _line));
470: }
471:
472: public JspParseException error(Throwable e) {
473: if (e instanceof LineCompileException)
474: return new JspLineParseException(e);
475: else if (e instanceof CompileException)
476: return new JspLineParseException(_filename + ":" + _line
477: + ": " + e.getMessage()
478: + _gen.getSourceLines(_sourcePath, _line), e);
479: else
480: return new JspLineParseException(_filename + ":" + _line
481: + ": " + String.valueOf(e)
482: + _gen.getSourceLines(_sourcePath, _line), e);
483: }
484:
485: private static void addMap(HashMap<QName, Class> map,
486: String prefix, String localName, String uri, Class cl) {
487: map.put(new QName(prefix, localName, uri), cl);
488: map.put(new QName(prefix, localName, "urn:jsptld:" + uri), cl);
489: }
490:
491: static {
492: _tagMap = new HashMap<QName, Class>();
493:
494: addMap(_tagMap, "jsp", "root", JspNode.JSP_NS, JspRoot.class);
495:
496: addMap(_tagMap, "jsp", "directive.page", JspNode.JSP_NS,
497: JspDirectivePage.class);
498: addMap(_tagMap, "jsp", "directive.include", JspNode.JSP_NS,
499: JspDirectiveInclude.class);
500: addMap(_tagMap, "jsp", "directive.cache", JspNode.JSP_NS,
501: NullTag.class);
502: addMap(_tagMap, "jsp", "directive.taglib", JspNode.JSP_NS,
503: JspDirectiveTaglib.class);
504: addMap(_tagMap, "jsp", "directive.attribute", JspNode.JSP_NS,
505: JspDirectiveAttribute.class);
506: addMap(_tagMap, "jsp", "directive.variable", JspNode.JSP_NS,
507: JspDirectiveVariable.class);
508: addMap(_tagMap, "jsp", "directive.tag", JspNode.JSP_NS,
509: JspDirectiveTag.class);
510:
511: addMap(_tagMap, "jsp", "expression", JspNode.JSP_NS,
512: JspExpression.class);
513: addMap(_tagMap, "jsp", "scriptlet", JspNode.JSP_NS,
514: JspScriptlet.class);
515: addMap(_tagMap, "jsp", "declaration", JspNode.JSP_NS,
516: JspDeclaration.class);
517: addMap(_tagMap, "jsp", "useBean", JspNode.JSP_NS,
518: JspUseBean.class);
519: addMap(_tagMap, "jsp", "getProperty", JspNode.JSP_NS,
520: JspGetProperty.class);
521: addMap(_tagMap, "jsp", "setProperty", JspNode.JSP_NS,
522: JspSetProperty.class);
523: addMap(_tagMap, "jsp", "include", JspNode.JSP_NS,
524: JspInclude.class);
525: addMap(_tagMap, "jsp", "forward", JspNode.JSP_NS,
526: JspForward.class);
527: addMap(_tagMap, "jsp", "param", JspNode.JSP_NS, JspParam.class);
528: addMap(_tagMap, "jsp", "plugin", JspNode.JSP_NS,
529: JspPlugin.class);
530: addMap(_tagMap, "jsp", "params", JspNode.JSP_NS,
531: JspParams.class);
532: addMap(_tagMap, "jsp", "fallback", JspNode.JSP_NS,
533: JspFallback.class);
534:
535: addMap(_tagMap, "jsp", "attribute", JspNode.JSP_NS,
536: JspAttribute.class);
537: addMap(_tagMap, "jsp", "doBody", JspNode.JSP_NS,
538: JspDoBody.class);
539: addMap(_tagMap, "jsp", "invoke", JspNode.JSP_NS,
540: JspInvoke.class);
541: addMap(_tagMap, "jsp", "body", JspNode.JSP_NS, JspBody.class);
542: addMap(_tagMap, "jsp", "text", JspNode.JSP_NS, JspText.class);
543: addMap(_tagMap, "jsp", "element", JspNode.JSP_NS,
544: JspElement.class);
545: addMap(_tagMap, "jsp", "output", JspNode.JSP_NS,
546: JspOutput.class);
547:
548: _fastTagMap = new HashMap<QName, Class>(_tagMap);
549:
550: // shortcut
551: addMap(_fastTagMap, "resin-c", "out", JSTL_CORE_URI,
552: JstlCoreOut.class);
553: addMap(_fastTagMap, "resin-c", "out", JSTL_RT_CORE_URI,
554: JstlCoreOut.class);
555: addMap(_fastTagMap, "resin-c", "out", JSTL_EL_CORE_URI,
556: JstlCoreOut.class);
557:
558: addMap(_fastTagMap, "resin-c", "set", JSTL_CORE_URI,
559: JstlCoreSet.class);
560: addMap(_fastTagMap, "resin-c", "set", JSTL_EL_CORE_URI,
561: JstlCoreSet.class);
562: addMap(_fastTagMap, "resin-c", "set", JSTL_RT_CORE_URI,
563: JstlCoreSet.class);
564:
565: addMap(_fastTagMap, "resin-c", "remove", JSTL_CORE_URI,
566: JstlCoreRemove.class);
567: addMap(_fastTagMap, "resin-c", "remove", JSTL_EL_CORE_URI,
568: JstlCoreRemove.class);
569: addMap(_fastTagMap, "resin-c", "remove", JSTL_RT_CORE_URI,
570: JstlCoreRemove.class);
571:
572: addMap(_fastTagMap, "resin-c", "catch", JSTL_CORE_URI,
573: JstlCoreCatch.class);
574: addMap(_fastTagMap, "resin-c", "catch", JSTL_EL_CORE_URI,
575: JstlCoreCatch.class);
576: addMap(_fastTagMap, "resin-c", "catch", JSTL_RT_CORE_URI,
577: JstlCoreCatch.class);
578:
579: addMap(_fastTagMap, "resin-c", "if", JSTL_CORE_URI,
580: JstlCoreIf.class);
581: addMap(_fastTagMap, "resin-c", "if", JSTL_EL_CORE_URI,
582: JstlCoreIf.class);
583: addMap(_fastTagMap, "resin-c", "if", JSTL_RT_CORE_URI,
584: JstlCoreIf.class);
585:
586: addMap(_fastTagMap, "resin-c", "choose", JSTL_CORE_URI,
587: JstlCoreChoose.class);
588: addMap(_fastTagMap, "resin-c", "choose", JSTL_EL_CORE_URI,
589: JstlCoreChoose.class);
590: addMap(_fastTagMap, "resin-c", "choose", JSTL_RT_CORE_URI,
591: JstlCoreChoose.class);
592:
593: addMap(_fastTagMap, "resin-c", "when", JSTL_CORE_URI,
594: JstlCoreWhen.class);
595: addMap(_fastTagMap, "resin-c", "when", JSTL_EL_CORE_URI,
596: JstlCoreWhen.class);
597: addMap(_fastTagMap, "resin-c", "when", JSTL_RT_CORE_URI,
598: JstlCoreWhen.class);
599:
600: addMap(_fastTagMap, "resin-c", "otherwise", JSTL_CORE_URI,
601: JstlCoreOtherwise.class);
602: addMap(_fastTagMap, "resin-c", "otherwise", JSTL_EL_CORE_URI,
603: JstlCoreOtherwise.class);
604: addMap(_fastTagMap, "resin-c", "otherwise", JSTL_RT_CORE_URI,
605: JstlCoreOtherwise.class);
606:
607: addMap(_fastTagMap, "resin-c", "forEach", JSTL_CORE_URI,
608: JstlCoreForEach.class);
609: addMap(_fastTagMap, "resin-c", "forEach", JSTL_EL_CORE_URI,
610: JstlCoreForEach.class);
611: addMap(_fastTagMap, "resin-c", "forEach", JSTL_RT_CORE_URI,
612: JstlCoreForEach.class);
613:
614: addMap(_fastTagMap, "resin-fmt", "message", JSTL_FMT_URI,
615: JstlFmtMessage.class);
616: addMap(_fastTagMap, "resin-fmt", "message", JSTL_EL_FMT_URI,
617: JstlFmtMessage.class);
618: addMap(_fastTagMap, "resin-fmt", "message", JSTL_RT_FMT_URI,
619: JstlFmtMessage.class);
620:
621: addMap(_fastTagMap, "resin-fmt", "setBundle", JSTL_FMT_URI,
622: JstlFmtSetBundle.class);
623: addMap(_fastTagMap, "resin-fmt", "setBundle", JSTL_EL_FMT_URI,
624: JstlFmtSetBundle.class);
625: addMap(_fastTagMap, "resin-fmt", "setBundle", JSTL_RT_FMT_URI,
626: JstlFmtSetBundle.class);
627:
628: addMap(_fastTagMap, "resin-fmt", "bundle", JSTL_FMT_URI,
629: JstlFmtBundle.class);
630: addMap(_fastTagMap, "resin-fmt", "bundle", JSTL_EL_FMT_URI,
631: JstlFmtBundle.class);
632: addMap(_fastTagMap, "resin-fmt", "bundle", JSTL_RT_FMT_URI,
633: JstlFmtBundle.class);
634:
635: addMap(_fastTagMap, "resin-fmt", "param", JSTL_FMT_URI,
636: JstlFmtParam.class);
637: addMap(_fastTagMap, "resin-fmt", "param", JSTL_EL_FMT_URI,
638: JstlFmtParam.class);
639: addMap(_fastTagMap, "resin-fmt", "param", JSTL_RT_FMT_URI,
640: JstlFmtParam.class);
641:
642: addMap(_fastTagMap, "resin-xml", "out", JSTL_XML_URI,
643: JstlXmlOut.class);
644: addMap(_fastTagMap, "resin-xml", "out", JSTL_RT_XML_URI,
645: JstlXmlOut.class);
646: addMap(_fastTagMap, "resin-xml", "out", JSTL_EL_XML_URI,
647: JstlXmlOut.class);
648:
649: addMap(_fastTagMap, "resin-xml", "set", JSTL_XML_URI,
650: JstlXmlSet.class);
651: addMap(_fastTagMap, "resin-xml", "set", JSTL_RT_XML_URI,
652: JstlXmlSet.class);
653: addMap(_fastTagMap, "resin-xml", "set", JSTL_EL_XML_URI,
654: JstlXmlSet.class);
655:
656: addMap(_fastTagMap, "resin-xml", "if", JSTL_XML_URI,
657: JstlXmlIf.class);
658: addMap(_fastTagMap, "resin-xml", "if", JSTL_RT_XML_URI,
659: JstlXmlIf.class);
660: addMap(_fastTagMap, "resin-xml", "if", JSTL_EL_XML_URI,
661: JstlXmlIf.class);
662:
663: addMap(_fastTagMap, "resin-xml", "choose", JSTL_XML_URI,
664: JstlCoreChoose.class);
665: addMap(_fastTagMap, "resin-xml", "choose", JSTL_RT_XML_URI,
666: JstlCoreChoose.class);
667: addMap(_fastTagMap, "resin-xml", "choose", JSTL_EL_XML_URI,
668: JstlCoreChoose.class);
669:
670: addMap(_fastTagMap, "resin-xml", "when", JSTL_XML_URI,
671: JstlXmlWhen.class);
672: addMap(_fastTagMap, "resin-xml", "when", JSTL_RT_XML_URI,
673: JstlXmlWhen.class);
674: addMap(_fastTagMap, "resin-xml", "when", JSTL_EL_XML_URI,
675: JstlXmlWhen.class);
676:
677: addMap(_fastTagMap, "resin-xml", "otherwise", JSTL_XML_URI,
678: JstlCoreOtherwise.class);
679: addMap(_fastTagMap, "resin-xml", "otherwise", JSTL_RT_XML_URI,
680: JstlCoreOtherwise.class);
681: addMap(_fastTagMap, "resin-xml", "otherwise", JSTL_EL_XML_URI,
682: JstlCoreOtherwise.class);
683:
684: _jsfTagMap = new HashMap<QName, Class>();
685:
686: addMap(_jsfTagMap, "faces", "facet", JSF_CORE_URI,
687: JsfFacetNode.class);
688: addMap(_jsfTagMap, "faces", "view", JSF_CORE_URI,
689: JsfViewRoot.class);
690: }
691: }
|