Java Doc for ExpressionEvaluationUtils.java in  » J2EE » spring-framework-2.0.6 » org » springframework » web » 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 » J2EE » spring framework 2.0.6 » org.springframework.web.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.springframework.web.util.ExpressionEvaluationUtils

ExpressionEvaluationUtils
abstract public class ExpressionEvaluationUtils (Code)
Convenience methods for transparent access to JSP 2.0's built-in javax.servlet.jsp.el.ExpressionEvaluator or the standalone org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager of Jakarta's JSTL implementation.

Automatically detects JSP 2.0 or Jakarta JSTL, preferring the JSP 2.0 mechanism if available. Also detects the JSP 2.0 API being present but the runtime JSP engine not actually supporting JSP 2.0, falling back to the Jakarta JSTL in this case. Throws an exception when encountering actual EL expressions if neither JSP 2.0 nor the Jakarta JSTL is available.

In the case of JSP 2.0, this class will by default use standard evaluate calls. If your application server happens to be inefficient in that respect, consider setting Spring's "cacheJspExpressions" context-param in web.xml to "true", which will use parseExpression calls with cached Expression objects instead.

The evaluation methods check if the value contains "${" before invoking the EL evaluator, treating the value as "normal" expression (i.e. a literal String value) else.

Note: The evaluation methods do not have a runtime dependency on JSP 2.0 or on Jakarta's JSTL implementation, as long as they are not asked to process actual EL expressions. This allows for using EL-aware tags with Java-based JSP expressions instead, for example.
author:
   Juergen Hoeller
author:
   Alef Arendsen
since:
   11.07.2003
See Also:   javax.servlet.jsp.el.ExpressionEvaluator.evaluate
See Also:   javax.servlet.jsp.el.ExpressionEvaluator.parseExpression
See Also:   org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager



Field Summary
final public static  StringEXPRESSION_CACHE_CONTEXT_PARAM
     JSP 2.0 expression cache parameter at the servlet context level (i.e.
final public static  StringEXPRESSION_PREFIX
    
final public static  StringEXPRESSION_SUFFIX
    


Method Summary
public static  Objectevaluate(String attrName, String attrValue, Class resultClass, PageContext pageContext)
    
public static  Objectevaluate(String attrName, String attrValue, PageContext pageContext)
     Evaluate the given expression (be it EL or a literal String value) to an Object.
public static  booleanevaluateBoolean(String attrName, String attrValue, PageContext pageContext)
     Evaluate the given expression (be it EL or a literal String value) to a boolean.
public static  intevaluateInteger(String attrName, String attrValue, PageContext pageContext)
     Evaluate the given expression (be it EL or a literal String value) to an integer.
public static  StringevaluateString(String attrName, String attrValue, PageContext pageContext)
     Evaluate the given expression (be it EL or a literal String value) to a String.
public static  booleanisExpressionLanguage(String value)
     Check if the given expression value is an EL expression.

Field Detail
EXPRESSION_CACHE_CONTEXT_PARAM
final public static String EXPRESSION_CACHE_CONTEXT_PARAM(Code)
JSP 2.0 expression cache parameter at the servlet context level (i.e. a context-param in web.xml): "cacheJspExpressions".



EXPRESSION_PREFIX
final public static String EXPRESSION_PREFIX(Code)



EXPRESSION_SUFFIX
final public static String EXPRESSION_SUFFIX(Code)





Method Detail
evaluate
public static Object evaluate(String attrName, String attrValue, Class resultClass, PageContext pageContext) throws JspException(Code)
Evaluate the given expression (be it EL or a literal String value) to an Object of a given type,
Parameters:
  attrName - name of the attribute (typically a JSP tag attribute)
Parameters:
  attrValue - value of the attribute
Parameters:
  resultClass - class that the result should have (String, Integer, Boolean)
Parameters:
  pageContext - current JSP PageContext the result of the evaluation
throws:
  JspException - in case of parsing errors, also in case of type mismatchif the passed-in literal value is not an EL expression and not assignable tothe result class



evaluate
public static Object evaluate(String attrName, String attrValue, PageContext pageContext) throws JspException(Code)
Evaluate the given expression (be it EL or a literal String value) to an Object.
Parameters:
  attrName - name of the attribute (typically a JSP tag attribute)
Parameters:
  attrValue - value of the attribute
Parameters:
  pageContext - current JSP PageContext the result of the evaluation
throws:
  JspException - in case of parsing errors



evaluateBoolean
public static boolean evaluateBoolean(String attrName, String attrValue, PageContext pageContext) throws JspException(Code)
Evaluate the given expression (be it EL or a literal String value) to a boolean.
Parameters:
  attrName - name of the attribute (typically a JSP tag attribute)
Parameters:
  attrValue - value of the attribute
Parameters:
  pageContext - current JSP PageContext the result of the evaluation
throws:
  JspException - in case of parsing errors



evaluateInteger
public static int evaluateInteger(String attrName, String attrValue, PageContext pageContext) throws JspException(Code)
Evaluate the given expression (be it EL or a literal String value) to an integer.
Parameters:
  attrName - name of the attribute (typically a JSP tag attribute)
Parameters:
  attrValue - value of the attribute
Parameters:
  pageContext - current JSP PageContext the result of the evaluation
throws:
  JspException - in case of parsing errors



evaluateString
public static String evaluateString(String attrName, String attrValue, PageContext pageContext) throws JspException(Code)
Evaluate the given expression (be it EL or a literal String value) to a String.
Parameters:
  attrName - name of the attribute (typically a JSP tag attribute)
Parameters:
  attrValue - value of the attribute
Parameters:
  pageContext - current JSP PageContext the result of the evaluation
throws:
  JspException - in case of parsing errors



isExpressionLanguage
public static boolean isExpressionLanguage(String value)(Code)
Check if the given expression value is an EL expression.
Parameters:
  value - the expression to check true if the expression is an EL expression,false otherwise



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.