[Bug 55483] New: ELException when object has overloaded methods
https://issues.apache.org/bugzilla/show_bug.cgi?id=55483 Bug ID: 55483 Summary: ELException when object has overloaded methods Product: Tomcat 8 Version: trunk Hardware: PC OS: Mac OS X 10.4 Status: NEW Severity: normal Priority: P2 Component: EL Assignee: dev@tomcat.apache.org Reporter: dmik...@gopivotal.com Included below are two test cases which fail. The first calls an overloaded method on an object. The second calls an overloaded constructor. More details below. 1.) Here's the first test. @Test public void test01() { ELProcessor processor = new ELProcessor(); processor.defineBean(sb, new StringBuilder()); Assert.assertEquals(a, processor.eval(sb.append('a'); sb.toString())); } This fails with the following stack trace. javax.el.ELException: Cannot convert a of type class java.lang.String to long at org.apache.el.lang.ELSupport.coerceToNumber(ELSupport.java:349) at org.apache.el.lang.ELSupport.coerceToNumber(ELSupport.java:328) at org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:450) at org.apache.el.ExpressionFactoryImpl.coerceToType(ExpressionFactoryImpl.java:48) at javax.el.Util.buildParameters(Util.java:351) at javax.el.BeanELResolver.invoke(BeanELResolver.java:173) at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:84) at org.apache.el.parser.AstValue.getValue(AstValue.java:157) at org.apache.el.parser.AstSemicolon.getValue(AstSemicolon.java:35) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:188) at javax.el.ELProcessor.getValue(ELProcessor.java:45) at javax.el.ELProcessor.eval(ELProcessor.java:38) at org.apache.el.parser.TestAstMethodCalls.test01(TestAstMethodCalls.java:32) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Looking into this, it appears that the EL is having trouble because StringBuilder's append method is overloaded. It is instructed to call append with the character 'c', but instead is trying to coerce the character 'c' to a long and call append with the long. This chain of events seems to be kicked off in AstValue.getValue() line #157, where it's calling resolver.invoke(..). The call to resolver.invoke() is passing null as the paramTypes argument. This trickles down to BeanELResolver.invoke(), which calls Util.findMethod(). Because paramTypes is null, Util.findMethod() selects the first method it finds with the expected number of arguments. In the case above, it selects StringBuilder.append(long), which causes the problem above. 2.) Here's the second test. @Test public void test02() { ELProcessor processor = new ELProcessor(); processor.getELManager().importClass(java.util.Date); Date result = (Date) processor.eval(Date(86400)); Assert.assertEquals(86400, result.getTime()); } This one fails intermittently with the following stack trace. javax.el.ELException: java.lang.IllegalArgumentException at
svn commit: r1517536 - in /tomcat/trunk: java/javax/el/BeanELResolver.java test/javax/el/TestBeanELResolver.java test/javax/el/TesterBean.java
Author: violetagg Date: Mon Aug 26 13:24:43 2013 New Revision: 1517536 URL: http://svn.apache.org/r1517536 Log: javax.el.BeanELResolver: - getFeatureDescriptors, getCommonPropertyType do not throw NPE when the supplied context is null. - setValue will throw PropertyNotWritableException instead of PropertyNotFoundException when there is no setter for the property. - unit test is added Modified: tomcat/trunk/java/javax/el/BeanELResolver.java tomcat/trunk/test/javax/el/TestBeanELResolver.java tomcat/trunk/test/javax/el/TesterBean.java Modified: tomcat/trunk/java/javax/el/BeanELResolver.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/BeanELResolver.java?rev=1517536r1=1517535r2=1517536view=diff == --- tomcat/trunk/java/javax/el/BeanELResolver.java (original) +++ tomcat/trunk/java/javax/el/BeanELResolver.java Mon Aug 26 13:24:43 2013 @@ -205,10 +205,6 @@ public class BeanELResolver extends ELRe @Override public IteratorFeatureDescriptor getFeatureDescriptors(ELContext context, Object base) { -if (context == null) { -throw new NullPointerException(); -} - if (base == null) { return null; } @@ -230,10 +226,6 @@ public class BeanELResolver extends ELRe @Override public Class? getCommonPropertyType(ELContext context, Object base) { -if (context == null) { -throw new NullPointerException(); -} - if (base != null) { return Object.class; } @@ -319,7 +311,7 @@ public class BeanELResolver extends ELRe if (this.write == null) { this.write = Util.getMethod(this.owner, descriptor.getWriteMethod()); if (this.write == null) { -throw new PropertyNotFoundException(Util.message(ctx, +throw new PropertyNotWritableException(Util.message(ctx, propertyNotWritable, new Object[] { owner.getName(), descriptor.getName() })); } Modified: tomcat/trunk/test/javax/el/TestBeanELResolver.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/javax/el/TestBeanELResolver.java?rev=1517536r1=1517535r2=1517536view=diff == --- tomcat/trunk/test/javax/el/TestBeanELResolver.java (original) +++ tomcat/trunk/test/javax/el/TestBeanELResolver.java Mon Aug 26 13:24:43 2013 @@ -16,14 +16,26 @@ */ package javax.el; -import org.junit.Assert; +import java.beans.FeatureDescriptor; +import java.beans.PropertyDescriptor; +import java.util.Iterator; +import org.junit.Assert; import org.junit.Test; import org.apache.jasper.el.ELContextImpl; public class TestBeanELResolver { +private static final String METHOD01_NAME = toString; +private static final String METHOD02_NAME = init; +private static final String METHOD03_NAME = nonExistingMethod; +private static final String BEAN_NAME = test; +private static final String PROPERTY01_NAME = valueA; +private static final String PROPERTY02_NAME = valueB; +private static final String PROPERTY03_NAME = name; +private static final String PROPERTY_VALUE = test1; + @Test public void testBug53421() { ExpressionFactory factory = ExpressionFactory.newInstance(); @@ -54,6 +66,398 @@ public class TestBeanELResolver { msg.contains(type)); } +/** + * Tests that a null context results in an NPE as per EL Javadoc. + */ +@Test(expected = NullPointerException.class) +public void testGetType01() { +BeanELResolver resolver = new BeanELResolver(); +resolver.getType(null, new Object(), new Object()); +} + +/** + * Tests that a valid property is not resolved if base is null. + */ +@Test +public void testGetType02() { +doNegativeTest(null, new Object(), MethodUnderTest.GET_TYPE, true); +} + +/** + * Tests that a valid property is resolved. + */ +@Test +public void testGetType03() { +BeanELResolver resolver = new BeanELResolver(); +ELContext context = new StandardELContext(ELManager.getExpressionFactory()); + +Class? result = resolver.getType(context, new Bean(), PROPERTY01_NAME); + +Assert.assertEquals(String.class, result); +Assert.assertTrue(context.isPropertyResolved()); +} + +/** + * Tests that an exception will be thrown when the property does not exist. + */ +@Test(expected = PropertyNotFoundException.class) +public void testGetType04() { +BeanELResolver resolver = new BeanELResolver(); +ELContext context = new StandardELContext(ELManager.getExpressionFactory()); + +resolver.getType(context, new Bean(), PROPERTY02_NAME); +} + +/** + * Tests that an exception
[Bug 55483] ELException when object has overloaded methods
https://issues.apache.org/bugzilla/show_bug.cgi?id=55483 --- Comment #1 from Daniel Mikusa dmik...@gopivotal.com --- Created attachment 30764 -- https://issues.apache.org/bugzilla/attachment.cgi?id=30764action=edit Unit test Attaching a unit test to replicate the problem. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1517586 - in /tomcat/tc7.0.x/trunk: ./ java/javax/el/BeanELResolver.java test/javax/el/TestBeanELResolver.java test/javax/el/TesterBean.java webapps/docs/changelog.xml
Author: violetagg Date: Mon Aug 26 16:02:28 2013 New Revision: 1517586 URL: http://svn.apache.org/r1517586 Log: Merged revision 1517536 from tomcat/trunk: javax.el.BeanELResolver: - getFeatureDescriptors, getCommonPropertyType do not throw NPE when the supplied context is null. - unit test is added Added: tomcat/tc7.0.x/trunk/test/javax/el/TesterBean.java (with props) Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/javax/el/BeanELResolver.java tomcat/tc7.0.x/trunk/test/javax/el/TestBeanELResolver.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1517536 Modified: tomcat/tc7.0.x/trunk/java/javax/el/BeanELResolver.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/javax/el/BeanELResolver.java?rev=1517586r1=1517585r2=1517586view=diff == --- tomcat/tc7.0.x/trunk/java/javax/el/BeanELResolver.java (original) +++ tomcat/tc7.0.x/trunk/java/javax/el/BeanELResolver.java Mon Aug 26 16:02:28 2013 @@ -175,10 +175,6 @@ public class BeanELResolver extends ELRe @Override public IteratorFeatureDescriptor getFeatureDescriptors(ELContext context, Object base) { -if (context == null) { -throw new NullPointerException(); -} - if (base == null) { return null; } @@ -200,10 +196,6 @@ public class BeanELResolver extends ELRe @Override public Class? getCommonPropertyType(ELContext context, Object base) { -if (context == null) { -throw new NullPointerException(); -} - if (base != null) { return Object.class; } Modified: tomcat/tc7.0.x/trunk/test/javax/el/TestBeanELResolver.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/javax/el/TestBeanELResolver.java?rev=1517586r1=1517585r2=1517586view=diff == --- tomcat/tc7.0.x/trunk/test/javax/el/TestBeanELResolver.java (original) +++ tomcat/tc7.0.x/trunk/test/javax/el/TestBeanELResolver.java Mon Aug 26 16:02:28 2013 @@ -16,14 +16,26 @@ */ package javax.el; -import org.junit.Assert; +import java.beans.FeatureDescriptor; +import java.beans.PropertyDescriptor; +import java.util.Iterator; +import org.junit.Assert; import org.junit.Test; import org.apache.jasper.el.ELContextImpl; public class TestBeanELResolver { +private static final String METHOD01_NAME = toString; +private static final String METHOD02_NAME = init; +private static final String METHOD03_NAME = nonExistingMethod; +private static final String BEAN_NAME = test; +private static final String PROPERTY01_NAME = valueA; +private static final String PROPERTY02_NAME = valueB; +private static final String PROPERTY03_NAME = name; +private static final String PROPERTY_VALUE = test1; + @Test public void testBug53421() { ExpressionFactory factory = ExpressionFactory.newInstance(); @@ -54,6 +66,398 @@ public class TestBeanELResolver { msg.contains(type)); } +/** + * Tests that a null context results in an NPE as per EL Javadoc. + */ +@Test(expected = NullPointerException.class) +public void testGetType01() { +BeanELResolver resolver = new BeanELResolver(); +resolver.getType(null, new Object(), new Object()); +} + +/** + * Tests that a valid property is not resolved if base is null. + */ +@Test +public void testGetType02() { +doNegativeTest(null, new Object(), MethodUnderTest.GET_TYPE, true); +} + +/** + * Tests that a valid property is resolved. + */ +@Test +public void testGetType03() { +BeanELResolver resolver = new BeanELResolver(); +ELContext context = new ELContextImpl(); + +Class? result = resolver.getType(context, new Bean(), PROPERTY01_NAME); + +Assert.assertEquals(String.class, result); +Assert.assertTrue(context.isPropertyResolved()); +} + +/** + * Tests that an exception will be thrown when the property does not exist. + */ +@Test(expected = PropertyNotFoundException.class) +public void testGetType04() { +BeanELResolver resolver = new BeanELResolver(); +ELContext context = new ELContextImpl(); + +resolver.getType(context, new Bean(), PROPERTY02_NAME); +} + +/** + * Tests that an exception will be thrown when a coercion cannot be + * performed. + */ +@Test(expected = PropertyNotFoundException.class) +public void testGetType05() { +BeanELResolver resolver = new BeanELResolver(); +ELContext context = new ELContextImpl(); + +resolver.getType(context, new Bean(), new Object()); +} + +/** + *
Manager look and feel
I was playing around with making the manager page look a bit more modern. (I see bug 55383, which is kinda related)... I whipped up a proof of concept with a static HTML page, using Bootstrap. I put it up on github, if anyone wanted to take a look: https://github.com/larrys/tomcat-manager-bootstrap I'm not a bootstrap/css guy, and just copied an example bootstrap template, and some of the areas on the page need a bit of work. I just wanted to get a quick proof of concept, and solicet feedback before I spent a lot of time on it. I was also wondering if there was a reason why the manager servlet has the HTML inlined in the Java code, instead of using JSPs? -- Larry
Re: Manager look and feel
Hi i wonder for some times if tomcat GUI couldn't be externalized in another project. To be concrete i'm thinking to commons-monitoring (or the project which will replace it in incubator if we move it over incubator) Here is the current doc: http://commons.apache.org/sandbox/commons-monitoring/ Some screenshots are on this page: http://commons.apache.org/sandbox/commons-monitoring/reporting.html The gui is designed to be pluggable and i think tomcat could just be a plugin. It is still a young project (in sandbox) but all tomcat webapps features can go easily inside and all Apache projects could extend it to get something finally more consistent. wdyt? *Romain Manni-Bucau* *Twitter: @rmannibucau https://twitter.com/rmannibucau* *Blog: **http://rmannibucau.wordpress.com/*http://rmannibucau.wordpress.com/ *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2013/8/26 Larry Shatzer, Jr. lar...@gmail.com I was playing around with making the manager page look a bit more modern. (I see bug 55383, which is kinda related)... I whipped up a proof of concept with a static HTML page, using Bootstrap. I put it up on github, if anyone wanted to take a look: https://github.com/larrys/tomcat-manager-bootstrap I'm not a bootstrap/css guy, and just copied an example bootstrap template, and some of the areas on the page need a bit of work. I just wanted to get a quick proof of concept, and solicet feedback before I spent a lot of time on it. I was also wondering if there was a reason why the manager servlet has the HTML inlined in the Java code, instead of using JSPs? -- Larry
Re: Manager look and feel
gui is looking good. If you need help on the commons monitoring project let me know, I have some spare time. On Mon, Aug 26, 2013 at 4:16 PM, Romain Manni-Bucau rmannibu...@gmail.comwrote: Hi i wonder for some times if tomcat GUI couldn't be externalized in another project. To be concrete i'm thinking to commons-monitoring (or the project which will replace it in incubator if we move it over incubator) Here is the current doc: http://commons.apache.org/sandbox/commons-monitoring/ Some screenshots are on this page: http://commons.apache.org/sandbox/commons-monitoring/reporting.html The gui is designed to be pluggable and i think tomcat could just be a plugin. It is still a young project (in sandbox) but all tomcat webapps features can go easily inside and all Apache projects could extend it to get something finally more consistent. wdyt? *Romain Manni-Bucau* *Twitter: @rmannibucau https://twitter.com/rmannibucau* *Blog: **http://rmannibucau.wordpress.com/* http://rmannibucau.wordpress.com/ *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2013/8/26 Larry Shatzer, Jr. lar...@gmail.com I was playing around with making the manager page look a bit more modern. (I see bug 55383, which is kinda related)... I whipped up a proof of concept with a static HTML page, using Bootstrap. I put it up on github, if anyone wanted to take a look: https://github.com/larrys/tomcat-manager-bootstrap I'm not a bootstrap/css guy, and just copied an example bootstrap template, and some of the areas on the page need a bit of work. I just wanted to get a quick proof of concept, and solicet feedback before I spent a lot of time on it. I was also wondering if there was a reason why the manager servlet has the HTML inlined in the Java code, instead of using JSPs? -- Larry -- With Regards, Andrew Carr e. andrewlanec...@gmail.com w. andrew.c...@openlogic.com h. 4235255668 c. 4234708192 a. 101 Francis Drive, Greeneville, TN, 37743
Re: Manager look and feel
It would need to be updated to bootstrap 3 (but using a custom bootstrap 2 theme it is not as easy as replacing files) and maybe some basic components (graphs etc, atm there is no component libs) Le 26 août 2013 22:44, Andrew Carr andrewlanec...@gmail.com a écrit : gui is looking good. If you need help on the commons monitoring project let me know, I have some spare time. On Mon, Aug 26, 2013 at 4:16 PM, Romain Manni-Bucau rmannibu...@gmail.comwrote: Hi i wonder for some times if tomcat GUI couldn't be externalized in another project. To be concrete i'm thinking to commons-monitoring (or the project which will replace it in incubator if we move it over incubator) Here is the current doc: http://commons.apache.org/sandbox/commons-monitoring/ Some screenshots are on this page: http://commons.apache.org/sandbox/commons-monitoring/reporting.html The gui is designed to be pluggable and i think tomcat could just be a plugin. It is still a young project (in sandbox) but all tomcat webapps features can go easily inside and all Apache projects could extend it to get something finally more consistent. wdyt? *Romain Manni-Bucau* *Twitter: @rmannibucau https://twitter.com/rmannibucau* *Blog: **http://rmannibucau.wordpress.com/* http://rmannibucau.wordpress.com/ *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2013/8/26 Larry Shatzer, Jr. lar...@gmail.com I was playing around with making the manager page look a bit more modern. (I see bug 55383, which is kinda related)... I whipped up a proof of concept with a static HTML page, using Bootstrap. I put it up on github, if anyone wanted to take a look: https://github.com/larrys/tomcat-manager-bootstrap I'm not a bootstrap/css guy, and just copied an example bootstrap template, and some of the areas on the page need a bit of work. I just wanted to get a quick proof of concept, and solicet feedback before I spent a lot of time on it. I was also wondering if there was a reason why the manager servlet has the HTML inlined in the Java code, instead of using JSPs? -- Larry -- With Regards, Andrew Carr e. andrewlanec...@gmail.com w. andrew.c...@openlogic.com h. 4235255668 c. 4234708192 a. 101 Francis Drive, Greeneville, TN, 37743
Re: Manager look and feel
I like that Tomcat ships with a manager application bundled with it. If you need more functionality, you can look at psi probe https://code.google.com/p/psi-probe/, or write your own application that wraps the RESTish interface that the manager application provides. I just wish the default manager application was easier to theme, or tweak a few things. I resorted to a servlet filter at my $JOB to color a few things depending on the environment you are on (test vs prod, etc), along with a few other things. Commons Monitoring looks similar to https://code.google.com/p/javamelody/. -- Larry On Mon, Aug 26, 2013 at 2:16 PM, Romain Manni-Bucau rmannibu...@gmail.comwrote: Hi i wonder for some times if tomcat GUI couldn't be externalized in another project. To be concrete i'm thinking to commons-monitoring (or the project which will replace it in incubator if we move it over incubator) Here is the current doc: http://commons.apache.org/sandbox/commons-monitoring/ Some screenshots are on this page: http://commons.apache.org/sandbox/commons-monitoring/reporting.html The gui is designed to be pluggable and i think tomcat could just be a plugin. It is still a young project (in sandbox) but all tomcat webapps features can go easily inside and all Apache projects could extend it to get something finally more consistent. wdyt? *Romain Manni-Bucau* *Twitter: @rmannibucau https://twitter.com/rmannibucau* *Blog: **http://rmannibucau.wordpress.com/* http://rmannibucau.wordpress.com/ *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2013/8/26 Larry Shatzer, Jr. lar...@gmail.com I was playing around with making the manager page look a bit more modern. (I see bug 55383, which is kinda related)... I whipped up a proof of concept with a static HTML page, using Bootstrap. I put it up on github, if anyone wanted to take a look: https://github.com/larrys/tomcat-manager-bootstrap I'm not a bootstrap/css guy, and just copied an example bootstrap template, and some of the areas on the page need a bit of work. I just wanted to get a quick proof of concept, and solicet feedback before I spent a lot of time on it. I was also wondering if there was a reason why the manager servlet has the HTML inlined in the Java code, instead of using JSPs? -- Larry
Re: Need a tc-native 1.1.28 release
Mark, On 8/23/13 1:21 PM, Mark Thomas wrote: Tomcat 8 needs tc-native with the fix for non-blocking IO [1]. Any takers for rolling the release? I'm not sure if I have the karma to do a release (well, I can commit to svn of course, but I'm not sure about all the other stuff). I'm motivated to get a fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=51813 before rolling that release, though. -chris signature.asc Description: OpenPGP digital signature
Re: Manager look and feel
We talked about javamelody before hacking on it but it is different cause storage is pluggable (memory is implemented) and gui is designed as extensible (not really in jm). It integrates with cdi too (not jm.AFAIK). The main points are IMO easyness of extensibility (hawtio failed about it IMHO), default features and integration with Apache products (I hope TomEE will rely on it very soon) Le 26 août 2013 22:59, Larry Shatzer, Jr. lar...@gmail.com a écrit : I like that Tomcat ships with a manager application bundled with it. If you need more functionality, you can look at psi probe https://code.google.com/p/psi-probe/, or write your own application that wraps the RESTish interface that the manager application provides. I just wish the default manager application was easier to theme, or tweak a few things. I resorted to a servlet filter at my $JOB to color a few things depending on the environment you are on (test vs prod, etc), along with a few other things. Commons Monitoring looks similar to https://code.google.com/p/javamelody/. -- Larry On Mon, Aug 26, 2013 at 2:16 PM, Romain Manni-Bucau rmannibu...@gmail.comwrote: Hi i wonder for some times if tomcat GUI couldn't be externalized in another project. To be concrete i'm thinking to commons-monitoring (or the project which will replace it in incubator if we move it over incubator) Here is the current doc: http://commons.apache.org/sandbox/commons-monitoring/ Some screenshots are on this page: http://commons.apache.org/sandbox/commons-monitoring/reporting.html The gui is designed to be pluggable and i think tomcat could just be a plugin. It is still a young project (in sandbox) but all tomcat webapps features can go easily inside and all Apache projects could extend it to get something finally more consistent. wdyt? *Romain Manni-Bucau* *Twitter: @rmannibucau https://twitter.com/rmannibucau* *Blog: **http://rmannibucau.wordpress.com/* http://rmannibucau.wordpress.com/ *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2013/8/26 Larry Shatzer, Jr. lar...@gmail.com I was playing around with making the manager page look a bit more modern. (I see bug 55383, which is kinda related)... I whipped up a proof of concept with a static HTML page, using Bootstrap. I put it up on github, if anyone wanted to take a look: https://github.com/larrys/tomcat-manager-bootstrap I'm not a bootstrap/css guy, and just copied an example bootstrap template, and some of the areas on the page need a bit of work. I just wanted to get a quick proof of concept, and solicet feedback before I spent a lot of time on it. I was also wondering if there was a reason why the manager servlet has the HTML inlined in the Java code, instead of using JSPs? -- Larry
Re: Manager look and feel
Commons Monitoring is more comparable to Yammer Metrics than Java Melody. psi-probe/lambda-probe due to GPL nature can't be bundled with Tomcat, Commons Monitoring could. 2013/8/26 Larry Shatzer, Jr. lar...@gmail.com I like that Tomcat ships with a manager application bundled with it. If you need more functionality, you can look at psi probe https://code.google.com/p/psi-probe/, or write your own application that wraps the RESTish interface that the manager application provides. I just wish the default manager application was easier to theme, or tweak a few things. I resorted to a servlet filter at my $JOB to color a few things depending on the environment you are on (test vs prod, etc), along with a few other things. Commons Monitoring looks similar to https://code.google.com/p/javamelody/. -- Larry On Mon, Aug 26, 2013 at 2:16 PM, Romain Manni-Bucau rmannibu...@gmail.comwrote: Hi i wonder for some times if tomcat GUI couldn't be externalized in another project. To be concrete i'm thinking to commons-monitoring (or the project which will replace it in incubator if we move it over incubator) Here is the current doc: http://commons.apache.org/sandbox/commons-monitoring/ Some screenshots are on this page: http://commons.apache.org/sandbox/commons-monitoring/reporting.html The gui is designed to be pluggable and i think tomcat could just be a plugin. It is still a young project (in sandbox) but all tomcat webapps features can go easily inside and all Apache projects could extend it to get something finally more consistent. wdyt? *Romain Manni-Bucau* *Twitter: @rmannibucau https://twitter.com/rmannibucau* *Blog: **http://rmannibucau.wordpress.com/* http://rmannibucau.wordpress.com/ *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2013/8/26 Larry Shatzer, Jr. lar...@gmail.com I was playing around with making the manager page look a bit more modern. (I see bug 55383, which is kinda related)... I whipped up a proof of concept with a static HTML page, using Bootstrap. I put it up on github, if anyone wanted to take a look: https://github.com/larrys/tomcat-manager-bootstrap I'm not a bootstrap/css guy, and just copied an example bootstrap template, and some of the areas on the page need a bit of work. I just wanted to get a quick proof of concept, and solicet feedback before I spent a lot of time on it. I was also wondering if there was a reason why the manager servlet has the HTML inlined in the Java code, instead of using JSPs? -- Larry
[Bug 55477] Add a solution to map an realm name to a security role
https://issues.apache.org/bugzilla/show_bug.cgi?id=55477 --- Comment #1 from Christopher Schultz ch...@christopherschultz.net --- I haven't looked at the patch yet, but I wonder if configuring the wrapper-realm could be done directly in the context.xml like this: Realm class=...MappingRealm map=realmGroupName-securityGroupName, otherName-3rdName ... /Realm Thoughts? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Manager look and feel
Larry, On 8/26/13 4:10 PM, Larry Shatzer, Jr. wrote: I was playing around with making the manager page look a bit more modern. (I see bug 55383, which is kinda related)... I whipped up a proof of concept with a static HTML page, using Bootstrap. I put it up on github, if anyone wanted to take a look: https://github.com/larrys/tomcat-manager-bootstrap I'm not a bootstrap/css guy, and just copied an example bootstrap template, and some of the areas on the page need a bit of work. I just wanted to get a quick proof of concept, and solicet feedback before I spent a lot of time on it. Would you be willing to produce some patches for Tomcat? (Either that or teach me how to take stuff from github and apply it to Tomcat sources). Note that the manager application really should not have any external dependencies (e.g. Bootstrap source files loaded remotely) so we may need to include some of their sources (yay! AL2.0!), or structure things so that they look okay out of the box, but great if you install the Bootstrap stuff yourself. The reason we can't just refer to twitter.com/bootstrap/main.js (or whatever) is because not everyone exposes their Tomcat installation to the Internet. I was also wondering if there was a reason why the manager servlet has the HTML inlined in the Java code, instead of using JSPs? As dumb as it sounds this was probably done to limit the number of moving parts in the manager application. IMHO, the manager application (nay, all Tomcat-bundled applications) should be an example of clean design and implementation using the appropriate technologies at hand. -chris signature.asc Description: OpenPGP digital signature
Re: Need a tc-native 1.1.28 release
All, On 8/26/13 5:15 PM, Christopher Schultz wrote: On 8/23/13 1:21 PM, Mark Thomas wrote: Tomcat 8 needs tc-native with the fix for non-blocking IO [1]. Any takers for rolling the release? I'm not sure if I have the karma to do a release (well, I can commit to svn of course, but I'm not sure about all the other stuff). Er... just realized that I have no access to Visual Studio and thus can't build the win32 binaries. Anyone want to co-release? ;) -chris signature.asc Description: OpenPGP digital signature
Re: Manager look and feel
Christopher, On Mon, Aug 26, 2013 at 3:32 PM, Christopher Schultz ch...@christopherschultz.net wrote: Larry, On 8/26/13 4:10 PM, Larry Shatzer, Jr. wrote: I was playing around with making the manager page look a bit more modern. (I see bug 55383, which is kinda related)... I whipped up a proof of concept with a static HTML page, using Bootstrap. I put it up on github, if anyone wanted to take a look: https://github.com/larrys/tomcat-manager-bootstrap I'm not a bootstrap/css guy, and just copied an example bootstrap template, and some of the areas on the page need a bit of work. I just wanted to get a quick proof of concept, and solicet feedback before I spent a lot of time on it. Would you be willing to produce some patches for Tomcat? (Either that or teach me how to take stuff from github and apply it to Tomcat sources). Note that the manager application really should not have any external dependencies (e.g. Bootstrap source files loaded remotely) so we may need to include some of their sources (yay! AL2.0!), or structure things so that they look okay out of the box, but great if you install the Bootstrap stuff yourself. The reason we can't just refer to twitter.com/bootstrap/main.js (or whatever) is because not everyone exposes their Tomcat installation to the Internet. I'm not opposed to distilling the sample HTML code I provided into the HTMLManager servlet, if that is a direction that is desirable. If you just wanted to look at the proof of concept, you can download a zip of it, and just load the index.html in a browser. ( https://github.com/larrys/tomcat-manager-bootstrap/archive/master.zip) It is just a standalone HTML page that represents what I think one possible update to the manager GUI could be, using bootstrap. I wanted to avoid changing code, and have a quicker feedback cycle on the look and feel in just static HTML. I also never intended to have it load an external resource for Bootstrap stuff. I was also wondering if there was a reason why the manager servlet has the HTML inlined in the Java code, instead of using JSPs? As dumb as it sounds this was probably done to limit the number of moving parts in the manager application. IMHO, the manager application (nay, all Tomcat-bundled applications) should be an example of clean design and implementation using the appropriate technologies at hand. I think updating the look and feel should be done outside of any switch to use JSP, to keep the two changes somewhat independent. Maybe switching the manager application to use JSP for all presentation, while still using the servlets below for the heavy lifting of deploying, should be done first. Then updating the look and feel should be easier. -- Larry
RE: Manager look and feel
From: Larry Shatzer, Jr. [mailto:lar...@gmail.com] Subject: Re: Manager look and feel Maybe switching the manager application to use JSP for all presentation I don't think that should be done. Some sites may disable JSP capability, but still want to use the manager webapp. I suppose one could pre-compile the JSP code, but that makes it harder for a site to customize the manager. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55477] Add a solution to map an realm name to a security role
https://issues.apache.org/bugzilla/show_bug.cgi?id=55477 --- Comment #2 from Stefan Mayr ste...@mayr-stefan.de --- Should be possible. Where to find the rules about the security role naming conventions? The parsing of such an attribute might be tricky. Although this could be controlled by extra parameters (delimiter,assignation) if the defaults collide with names. Is it possible to access XML-Elements under the defined Realm? I think of something like Realm class=...MappingRealm map security-role=r1 group-name=g1 / map security-role=r2 group-name=g2 / ... /Realm An alternative could be using a ressource. Is it possible to use a map as ressource? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Manager look and feel
On Mon, Aug 26, 2013 at 4:00 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Larry Shatzer, Jr. [mailto:lar...@gmail.com] Subject: Re: Manager look and feel Maybe switching the manager application to use JSP for all presentation I don't think that should be done. Some sites may disable JSP capability, but still want to use the manager webapp. I suppose one could pre-compile the JSP code, but that makes it harder for a site to customize the manager. Right now it is hard to customize the manager at all. All the presentation logic is inside the servlet. I had to do a round about hack to modify the HTML through a servlet filter, which is pretty brittle. It wouldn't be too hard to provide an ant script or something that allowed you to take the manager webapp, compile it, and use the precompiled JSP version, for those specific scenarios where you want to totally disable JSP. -- Larry
[GUMP@vmgump]: Project tomcat-trunk-test (in module tomcat-trunk) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at gene...@gump.apache.org. Project tomcat-trunk-test has an issue affecting its community integration. This issue affects 1 projects, and has been outstanding for 46 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - tomcat-trunk-test : Tomcat 8.x, a web server implementing the Java Servlet 3.1, ... Full details are available at: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Dependency on junit exists, no need to add for property hamcrest.jar. -DEBUG- Dependency on commons-daemon exists, no need to add for property commons-daemon.native.src.tgz. -DEBUG- Dependency on commons-daemon exists, no need to add for property tomcat-native.tar.gz. -DEBUG- Dependency on tomcat-trunk exists, no need to add for property tomcat-dbcp.home. -INFO- Failed with reason build failed -INFO- Project Reports in: /srv/gump/public/workspace/tomcat-trunk/output/build/logs The following work was performed: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/gump_work/build_tomcat-trunk_tomcat-trunk-test.html Work Name: build_tomcat-trunk_tomcat-trunk-test (Type: Build) Work ended in a state of : Failed Elapsed: 52 mins 44 secs Command Line: /usr/lib/jvm/java-7-oracle/bin/java -Djava.awt.headless=true -Dbuild.sysclasspath=only org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml -Djunit.jar=/srv/gump/public/workspace/junit/dist/junit-20130827.jar -Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.1-SNAPSHOT.jar -Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20130827-native-src.tar.gz -Dexamples.sources.skip=true -Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps -Djdt.jar=/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar -Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20130827.jar -Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20130827-native-src.tar.gz -Dtest.accesslog=true -Dcommons-pool.home=/srv/gump/public/workspace/apache-commons/pool -Dcommons-dbcp.home=/ srv/gump/public/workspace/apache-commons/dbcp -Deasymock.jar=/srv/gump/public/workspace/easymock/easymock/target/easymock-3.3-SNAPSHOT.jar -Dhamcrest.jar=/srv/gump/public/workspace/junit/dist/junit-20130827.jar -Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test [Working Directory: /srv/gump/public/workspace/tomcat-trunk] CLASSPATH: /usr/lib/jvm/java-7-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servle t-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-jni.jar:/srv/gump/public/workspace/tomcat
Re: Need a tc-native 1.1.28 release
2013/8/23 Mark Thomas wrote: Tomcat 8 needs tc-native with the fix for non-blocking IO [1]. Any takers for rolling the release? Mark, Do we need this for Tomcat 7 as well? Thanks Violeta