You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2012/12/04 07:56:18 UTC
[Bug 54239] New: Extensible EL Interpreter
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
Bug ID: 54239
Summary: Extensible EL Interpreter
Product: Tomcat 7
Version: trunk
Hardware: PC
Status: NEW
Severity: enhancement
Priority: P2
Component: Jasper
Assignee: dev@tomcat.apache.org
Reporter: xshao@ebay.com
Classification: Unclassified
Created attachment 29684
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29684&action=edit
Interface of ELInterpreter
In some cases, applications need doing code generation for EL to make EL
evaluation more faster.
It's better for tomcat to provide an extensible EL Interpreter. So application
can inject it's own ELInterpreter to replace the default
JspUtil.interpreterCall.
Attached an implementation.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
Sheldon Shao <xs...@ebay.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |54499
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
Sheldon Shao <xs...@ebay.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #29705|0 |1
is obsolete| |
--- Comment #16 from Sheldon Shao <xs...@ebay.com> ---
Created attachment 29707
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29707&action=edit
ELInterpreterFactory
Added APLV2.0 into ELInterpreterFactory.java
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
Sheldon Shao <xs...@ebay.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
--- Comment #4 from Sheldon Shao <xs...@ebay.com> ---
Thanks Mark.
I'll provide document & test cases for BUG 54239-54242.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
Sheldon Shao <xs...@ebay.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #29685|0 |1
is obsolete| |
--- Comment #6 from Sheldon Shao <xs...@ebay.com> ---
Created attachment 29694
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29694&action=edit
ELInterpreterFactory
Added more comments
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
--- Comment #18 from Sheldon Shao <xs...@ebay.com> ---
Hi Mark,
The code has been refined. Test cases and document also have been provided.
Could you please take a look ?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
Sheldon Shao <xs...@ebay.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #29693|0 |1
is obsolete| |
--- Comment #15 from Sheldon Shao <xs...@ebay.com> ---
Created attachment 29706
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29706&action=edit
Interface of ELInterpreter
Added License information at the front of java file
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
--- Comment #3 from Mark Thomas <ma...@apache.org> ---
Comment on attachment 29685
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29685
ELInterpreterFactory
In principle this looks like a good idea.
I have a couple of concerns with the patch as currently written:
1. No documentation.
2. No test cases.
3. The use of enum for the default instance is rather odd.
4. I dislike the use of system properties when they are not necessary. If the
class name was handled as a servlet context initialization parameters then
Tomcat already has the necessary plumbing for global, per host and per web
application configuration.
5. Error messages need to use the standard i18n support.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
--- Comment #14 from Sheldon Shao <xs...@ebay.com> ---
All have been fixed by your suggestion. Please take a look. Thanks.
(In reply to comment #3)
> Comment on attachment 29685 [details]
> ELInterpreterFactory
>
> In principle this looks like a good idea.
>
> I have a couple of concerns with the patch as currently written:
> 1. No documentation.
> 2. No test cases.
> 3. The use of enum for the default instance is rather odd.
> 4. I dislike the use of system properties when they are not necessary. If
> the class name was handled as a servlet context initialization parameters
> then Tomcat already has the necessary plumbing for global, per host and per
> web application configuration.
> 5. Error messages need to use the standard i18n support.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
--- Comment #8 from Sheldon Shao <xs...@ebay.com> ---
Created attachment 29696
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29696&action=edit
Test case for ELInterpreterFactory
Test case for ELInterpreterFactory
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
Sheldon Shao <xs...@ebay.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #29684|application/octet-stream |text/plain
mime type| |
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
--- Comment #11 from Sheldon Shao <xs...@ebay.com> ---
Thank you very much for your information!
I'll try to follow up with this approach.
(In reply to comment #10)
> (In reply to comment #9)
> > (In reply to comment #3)
>
> > > 4. I dislike the use of system properties when they are not necessary. If
> > > the class name was handled as a servlet context initialization parameters
> > > then Tomcat already has the necessary plumbing for global, per host and per
> > > web application configuration.
> > ~~~~~~~~~~~~~~~~~~ Supported passing the class name from context
> > initialization parameters. Still keep the feature from System Property.
> > In our case, System Property can be easily passed in from such kind of
> > Daemon-Watcher, For example: JSW.
>
> I haven't looked at the details here but it might be useful for you that
> system properties are automaticaly supported in most Tomcat config files,
> e.g. in server.xml and context.xml. What should work if you already support
> a className attribute is className="${my.el.interpreter}" (using a system
> property reference) and setting the system property via
> "-Dmy.el.interpreter=some.class.i.Use". No need for special code or a fixed
> system property name for this type of use case.
>
> Regards,
>
> Rainer
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
Sheldon Shao <xs...@ebay.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #29694|0 |1
is obsolete| |
--- Comment #13 from Sheldon Shao <xs...@ebay.com> ---
Created attachment 29705
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29705&action=edit
ELInterpreterFactory
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
--- Comment #10 from Rainer Jung <ra...@kippdata.de> ---
(In reply to comment #9)
> (In reply to comment #3)
> > 4. I dislike the use of system properties when they are not necessary. If
> > the class name was handled as a servlet context initialization parameters
> > then Tomcat already has the necessary plumbing for global, per host and per
> > web application configuration.
> ~~~~~~~~~~~~~~~~~~ Supported passing the class name from context
> initialization parameters. Still keep the feature from System Property.
> In our case, System Property can be easily passed in from such kind of
> Daemon-Watcher, For example: JSW.
I haven't looked at the details here but it might be useful for you that system
properties are automaticaly supported in most Tomcat config files, e.g. in
server.xml and context.xml. What should work if you already support a className
attribute is className="${my.el.interpreter}" (using a system property
reference) and setting the system property via
"-Dmy.el.interpreter=some.class.i.Use". No need for special code or a fixed
system property name for this type of use case.
Regards,
Rainer
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
Sheldon Shao <xs...@ebay.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #29704|0 |1
is obsolete| |
--- Comment #17 from Sheldon Shao <xs...@ebay.com> ---
Created attachment 29708
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29708&action=edit
Test case for ELInterpreterFactory
Added APL into TestELInterpreterFactory.java
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
Sheldon Shao <xs...@ebay.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #29684|0 |1
is obsolete| |
--- Comment #5 from Sheldon Shao <xs...@ebay.com> ---
Created attachment 29693
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29693&action=edit
Interface of ELInterpreter
Add more comments
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
--- Comment #9 from Sheldon Shao <xs...@ebay.com> ---
(In reply to comment #3)
> Comment on attachment 29685 [details]
> ELInterpreterFactory
>
> In principle this looks like a good idea.
>
> I have a couple of concerns with the patch as currently written:
> 1. No documentation.
~~~~~~~~~~~~~~~~~ Added more comments in ELInterpreter &
ELInterpreterFactory
> 2. No test cases.
~~~~~~~~~~~~~~~~~ Provided a test case for ELInterpreterFactory
> 3. The use of enum for the default instance is rather odd.
~~~~~~~~~~~~~~~~~ Fixed
> 4. I dislike the use of system properties when they are not necessary. If
> the class name was handled as a servlet context initialization parameters
> then Tomcat already has the necessary plumbing for global, per host and per
> web application configuration.
~~~~~~~~~~~~~~~~~~ Supported passing the class name from context
initialization parameters. Still keep the feature from System Property.
In our case, System Property can be easily passed in from such kind of
Daemon-Watcher, For example: JSW.
> 5. Error messages need to use the standard i18n support.
~~~~~~~~~~~~~~~~~~ Fixed
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
--- Comment #1 from Sheldon Shao <xs...@ebay.com> ---
Created attachment 29685
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29685&action=edit
ELInterpreterFactory
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #19 from Mark Thomas <ma...@apache.org> ---
Patch applied to trunk and 7.0.x with a few tweaks here and there and the
addition of some very basic documentation.
It will be included in 7.0.37 onwards.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
Sheldon Shao <xs...@ebay.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #29696|0 |1
is obsolete| |
--- Comment #12 from Sheldon Shao <xs...@ebay.com> ---
Created attachment 29704
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29704&action=edit
Test case for ELInterpreterFactory
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
Sheldon Shao <xs...@ebay.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #29686|0 |1
is obsolete| |
--- Comment #7 from Sheldon Shao <xs...@ebay.com> ---
Created attachment 29695
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29695&action=edit
Patch for Generator.java
Patch for Generator.java & LocalStrings.*
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 54239] Extensible EL Interpreter
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54239
--- Comment #2 from Sheldon Shao <xs...@ebay.com> ---
Created attachment 29686
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29686&action=edit
Patch for Generator.java
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org