Source Code Cross Referenced for LogTag.java in  » Portal » Open-Portal » com » sun » portal » wireless » taglibs » util » 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 » Portal » Open Portal » com.sun.portal.wireless.taglibs.util 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * $Id: LogTag.java,v 1.4 2005/09/21 10:53:29 dg154973 Exp $
003:         * Copyright 2002 Sun Microsystems, Inc. All
004:         * rights reserved. Use of this product is subject
005:         * to license terms. Federal Acquisitions:
006:         * Commercial Software -- Government Users
007:         * Subject to Standard License Terms and
008:         * Conditions.
009:         *
010:         * Sun, Sun Microsystems, the Sun logo, and Sun ONE
011:         * are trademarks or registered trademarks of Sun Microsystems,
012:         * Inc. in the United States and other countries.
013:         */package com.sun.portal.wireless.taglibs.util;
014:
015:        import com.sun.portal.log.common.PortalLogger;
016:        import com.sun.portal.wireless.taglibs.base.BeanSupport;
017:
018:        import java.beans.*;
019:        import java.util.logging.Logger;
020:        import java.util.logging.Level;
021:        import javax.servlet.jsp.*;
022:        import javax.servlet.jsp.tagext.*;
023:
024:        /**
025:         * BeanGetTag - get a bean property
026:         * 
027:         * This class reads the specified bean property
028:         * and either writes the value as a string to the
029:         * page output or saves the value into the page context
030:         * using the "id" attribute.
031:         * 
032:         * Attributes:
033:         * 
034:         * property
035:         *   name of the bean property to get
036:         * name
037:         *   name to use to retrieve the bean from the page context
038:         * id
039:         *   name to use to store the property onto the page context
040:         * eval
041:         *   attribute to evaluate and write to the page output
042:         * 
043:         * @author Robert O'Brien
044:         * @version 1.0
045:         * @see com.sun.portal.wireless.taglibs.base.BeanSetTag
046:         * @see com.sun.portal.wireless.taglibs.base.BeanSupport
047:         */
048:        public class LogTag extends BeanSupport {
049:
050:            // Create a logger for this class
051:            private static Logger logger = PortalLogger.getLogger(LogTag.class);
052:
053:            /**
054:             * Log at specified level to the Portal logger.
055:             *
056:             * @return SKIP_BODY
057:             * @exception javax.servlet.jsp.JspException
058:             */
059:            public int doStartTag() throws JspException {
060:
061:                String s = "";
062:                if (msg1 != null)
063:                    s = s + msg1;
064:                if (msg2 != null)
065:                    s = s + " " + msg2;
066:                if (msg3 != null)
067:                    s = s + " " + msg3;
068:                if (msg4 != null)
069:                    s = s + " " + msg4;
070:                if (msg5 != null)
071:                    s = s + " " + msg5;
072:                if (msg6 != null)
073:                    s = s + " " + msg6;
074:                if (msg7 != null)
075:                    s = s + " " + msg7;
076:                if (msg8 != null)
077:                    s = s + " " + msg8;
078:
079:                logger.log(level, s);
080:
081:                return SKIP_BODY;
082:            }
083:
084:            String levelStr = "FINEST";
085:            Level level = Level.FINEST;
086:
087:            public String getLevel() {
088:                return levelStr;
089:            }
090:
091:            public void setLevel(String level) {
092:                this .levelStr = level;
093:                this .level = Level.parse(levelStr);
094:            }
095:
096:            /**
097:             * msg attributes
098:             */
099:            String msg1 = null;
100:            String msg2 = null;
101:            String msg3 = null;
102:            String msg4 = null;
103:            String msg5 = null;
104:            String msg6 = null;
105:            String msg7 = null;
106:            String msg8 = null;
107:
108:            /**
109:             * Set the msg attributes
110:             */
111:            public void setMsg1(String msg) {
112:                this .msg1 = evalAttribute(msg);
113:            }
114:
115:            public void setMsg2(String msg) {
116:                this .msg2 = evalAttribute(msg);
117:            }
118:
119:            public void setMsg3(String msg) {
120:                this .msg3 = evalAttribute(msg);
121:            }
122:
123:            public void setMsg4(String msg) {
124:                this .msg4 = evalAttribute(msg);
125:            }
126:
127:            public void setMsg5(String msg) {
128:                this .msg5 = evalAttribute(msg);
129:            }
130:
131:            public void setMsg6(String msg) {
132:                this .msg6 = evalAttribute(msg);
133:            }
134:
135:            public void setMsg7(String msg) {
136:                this .msg7 = evalAttribute(msg);
137:            }
138:
139:            public void setMsg8(String msg) {
140:                this .msg8 = evalAttribute(msg);
141:            }
142:
143:            /**
144:             * Cleanup
145:             */
146:            public void release() {
147:                super.release();
148:                msg1 = null;
149:                msg2 = null;
150:                msg3 = null;
151:                msg4 = null;
152:                msg5 = null;
153:                msg6 = null;
154:                msg7 = null;
155:                msg8 = null;
156:                level = null;
157:                levelStr = null;
158:            }
159:
160:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.