Bug 54499 - Implementation of Extensible EL Interpreter
Summary: Implementation of Extensible EL Interpreter
Status: RESOLVED WONTFIX
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Jasper (show other bugs)
Version: trunk
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on: 54239
Blocks:
  Show dependency tree
 
Reported: 2013-01-29 08:26 UTC by Sheldon Shao
Modified: 2018-12-03 15:16 UTC (History)
0 users



Attachments
JasperELInterpreter implementation (8.37 KB, text/plain)
2013-01-29 08:26 UTC, Sheldon Shao
Details
EL code generation (33.74 KB, text/plain)
2013-01-29 08:27 UTC, Sheldon Shao
Details
ELRuntime Utility for JasperELInterpreter (5.91 KB, text/plain)
2013-01-29 08:27 UTC, Sheldon Shao
Details
Test case for JasperELInterpreter (3.33 KB, text/plain)
2013-01-29 08:28 UTC, Sheldon Shao
Details
Comparison testing from our site (48.02 KB, image/png)
2013-01-29 08:37 UTC, Sheldon Shao
Details
Make id as public (372 bytes, patch)
2013-01-30 05:31 UTC, Sheldon Shao
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sheldon Shao 2013-01-29 08:26:38 UTC
Created attachment 29898 [details]
JasperELInterpreter implementation

Jasper ELInterpreter Implementation

 Simple ELInterpreter. It can transfer simple ELs to java code directly.
 EL is a big bottleneck of JSP. EL resolving takes much CPU expense.
 
 The performance is better when simple ELs were transfered to java code.
  
 However the code will by pass all ELResolvers. This interpreter is not a standard of JSP specification. 
 When activate this ELInterpreter. User must know how it works.
 
 Here are the cases of Simple ELs,
 
 1.Simple EL, only contains one part of expression, for example ${elemId}. This kind of EL will be generated as
 
 this.getJspContext().findAttribute("elemId")
 
 2.EL with two parts of expression and type of first part is specified by attribute in Tag File. 
   For example, ${model.location} .  "model" is specified on the top of tag file, 
   
   <%@ attribute name="model" required="true" type="org.apache.jasper.model.results.ItemModel" %>.
   
   It is generated as (getModel() != null ? getModel().getLocation() : null)
   
 3.EL with logic or arithmetic and the value part can be generated.
   For example: ${(intlExpansion eq 'true' && not empty model.location) || sortType==7}
   
   It is generated as 
   (org.apache.jasper.runtime.ELRuntimeUtil.equals(getIntlExpansion(), "true")&&(!org.apache.jasper.runtime.ELRuntimeUtil.isEmpty((getModel() != null ? getModel().getLocation() : null))))
 
 How to apply this ELInterpreter?
 
 It is based on BUG 54239.
Comment 1 Sheldon Shao 2013-01-29 08:27:10 UTC
Created attachment 29899 [details]
EL code generation
Comment 2 Sheldon Shao 2013-01-29 08:27:55 UTC
Created attachment 29900 [details]
ELRuntime Utility for JasperELInterpreter
Comment 3 Sheldon Shao 2013-01-29 08:28:28 UTC
Created attachment 29901 [details]
Test case for JasperELInterpreter
Comment 4 Sheldon Shao 2013-01-29 08:37:29 UTC
Created attachment 29902 [details]
Comparison testing from our site
Comment 5 Sheldon Shao 2013-01-30 05:31:29 UTC
Created attachment 29907 [details]
Make id as public
Comment 6 Mark Thomas 2013-01-30 11:23:32 UTC
Marking as an enhancement
Comment 7 Mark Thomas 2013-06-20 14:33:42 UTC
I'm +0 to include this in trunk. What do other committers think?
Comment 8 Mark Thomas 2018-12-03 15:16:19 UTC
No-one else has spoken up since I asked the question so I am going to resolve this as WONTFIX.