Source Code Cross Referenced for BodyTagSupport.java in  » Sevlet-Container » apache-tomcat-6.0.14 » javax » servlet » jsp » tagext » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » apache tomcat 6.0.14 » javax.servlet.jsp.tagext 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         *
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:        package javax.servlet.jsp.tagext;
018:
019:        import javax.servlet.jsp.JspException;
020:        import javax.servlet.jsp.JspWriter;
021:
022:        /**
023:         * A base class for defining tag handlers implementing BodyTag.
024:         *
025:         * <p>
026:         * The BodyTagSupport class implements the BodyTag interface and adds
027:         * additional convenience methods including getter methods for the
028:         * bodyContent property and methods to get at the previous out JspWriter.
029:         *
030:         * <p>
031:         * Many tag handlers will extend BodyTagSupport and only redefine a
032:         * few methods.
033:         */
034:
035:        public class BodyTagSupport extends TagSupport implements  BodyTag {
036:
037:            /**
038:             * Default constructor, all subclasses are required to only define
039:             * a public constructor with the same signature, and to call the
040:             * superclass constructor.
041:             *
042:             * This constructor is called by the code generated by the JSP
043:             * translator.
044:             */
045:
046:            public BodyTagSupport() {
047:                super ();
048:            }
049:
050:            /**
051:             * Default processing of the start tag returning EVAL_BODY_BUFFERED.
052:             *
053:             * @return EVAL_BODY_BUFFERED
054:             * @throws JspException if an error occurred while processing this tag
055:             * @see BodyTag#doStartTag
056:             */
057:
058:            public int doStartTag() throws JspException {
059:                return EVAL_BODY_BUFFERED;
060:            }
061:
062:            /**
063:             * Default processing of the end tag returning EVAL_PAGE.
064:             *
065:             * @return EVAL_PAGE
066:             * @throws JspException if an error occurred while processing this tag
067:             * @see Tag#doEndTag
068:             */
069:
070:            public int doEndTag() throws JspException {
071:                return super .doEndTag();
072:            }
073:
074:            // Actions related to body evaluation
075:
076:            /**
077:             * Prepare for evaluation of the body: stash the bodyContent away.
078:             *
079:             * @param b the BodyContent
080:             * @see #doAfterBody
081:             * @see #doInitBody()
082:             * @see BodyTag#setBodyContent
083:             */
084:
085:            public void setBodyContent(BodyContent b) {
086:                this .bodyContent = b;
087:            }
088:
089:            /**
090:             * Prepare for evaluation of the body just before the first body evaluation:
091:             * no action.
092:             *
093:             * @throws JspException if an error occurred while processing this tag
094:             * @see #setBodyContent
095:             * @see #doAfterBody
096:             * @see BodyTag#doInitBody
097:             */
098:
099:            public void doInitBody() throws JspException {
100:            }
101:
102:            /**
103:             * After the body evaluation: do not reevaluate and continue with the page.
104:             * By default nothing is done with the bodyContent data (if any).
105:             *
106:             * @return SKIP_BODY
107:             * @throws JspException if an error occurred while processing this tag
108:             * @see #doInitBody
109:             * @see BodyTag#doAfterBody
110:             */
111:
112:            public int doAfterBody() throws JspException {
113:                return SKIP_BODY;
114:            }
115:
116:            /**
117:             * Release state.
118:             *
119:             * @see Tag#release
120:             */
121:
122:            public void release() {
123:                bodyContent = null;
124:
125:                super .release();
126:            }
127:
128:            /**
129:             * Get current bodyContent.
130:             *
131:             * @return the body content.
132:             */
133:
134:            public BodyContent getBodyContent() {
135:                return bodyContent;
136:            }
137:
138:            /**
139:             * Get surrounding out JspWriter.
140:             *
141:             * @return the enclosing JspWriter, from the bodyContent.
142:             */
143:
144:            public JspWriter getPreviousOut() {
145:                return bodyContent.getEnclosingWriter();
146:            }
147:
148:            // protected fields
149:
150:            /**
151:             * The current BodyContent for this BodyTag.
152:             */
153:            protected BodyContent bodyContent;
154:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.