Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When monitoring filter is incorrectly defined in web.xml for recent appserver, parameters inside filter are sometimes ignored #147

Closed
GoogleCodeExporter opened this issue Jun 21, 2015 · 7 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Add MonitoringFilter and SessionListener in the web.xml file of the webapp 
as said in the user guide.
It is incorrect according to the user guide when the appserver is recent 
(servlet api 3.0 compatible such as Glassfish v3), but ignore that fact.
2. Add some parameter such as system-actions-enabled (true) inside the filter 
in web.xml. (Do not add the parameter as a system property or as a context 
param, because the issue would not be seen) 
3. Deploy the webapp to Glassfish v3
4. The listener is started (twice) with the webapp then the filter is started 
(twice also). This can be seen in the debugging logs.
5. Display the monitoring page for the webapp

What is the expected output? What do you see instead?
It is expected that the system actions are visible inside "System information" 
of the monitoring page according to the parameter added.
But the system actions are not visible and the added parameter is ignored.

This issue can be reproduced with Glassfish v3, and it seems that it can be 
reproduced with some version of Jetty according to issue 109.

The issue is not reproduced with Tomcat 7 (which is servlet api 3.0 compatible 
like Glassfish v3).

Glassfish v2, Tomcat 5.5 and Tomcat 6 are not concerned at all by this issue.

Original issue reported on code.google.com by evernat@free.fr on 4 Oct 2011 at 9:40

@GoogleCodeExporter
Copy link
Author

Original comment by evernat@free.fr on 4 Oct 2011 at 9:47

@GoogleCodeExporter
Copy link
Author

And it can also be seen in the monitoring page, that the number of http 
sessions is doubled (see in system informations and in the sessions graphic 
compared to the list of http sessions)

Original comment by evernat@free.fr on 4 Oct 2011 at 10:06

@GoogleCodeExporter
Copy link
Author

When a servlet api 3.0 compatible server is used, the web-fragment.xml inside 
the javamelody jar file is used. This web-fragment.xml starts the monitoring 
filter and the session listener. So it is not needed to add the monitoring 
filter and listener inside the web.xml file of the webapp when a servlet api 
3.0 compatible server is used.

Anyway, when it is case the filter and listener started by web-fragment.xml are 
now "disabled", and so parameters from the first filter inside web.xml are not 
forgotten.
And only one session listener is active.

It is fixed in trunk of svn (revision 2186) and ready for the next release 
(1.32).
I have made a new build from the current trunk including the fix and it is 
available at:
http://javamelody.googlecode.com/files/javamelody-20111004.jar

Original comment by evernat@free.fr on 4 Oct 2011 at 10:19

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Might be the same for issue 109 which is jetty 7.1x -although i declare spec 
2.5 in web.xml. will test tomorrow

Original comment by davidkar...@gmail.com on 5 Oct 2011 at 12:22

@GoogleCodeExporter
Copy link
Author

Might be the same for issue 109 which is jetty 7.1x -although i declare spec 
2.5 in web.xml. will test tomorrow

Original comment by davidkar...@gmail.com on 5 Oct 2011 at 12:24

@GoogleCodeExporter
Copy link
Author

Verified that the snapshot version does in fact work w/o setting the 
systemproperty in jetty 7.1.x.

Strange as they do not support servlet 3.0 support for this version - but they 
might support just the web fragments part as a partial servlet 3.0 support.

Original comment by davidkar...@gmail.com on 6 Oct 2011 at 10:44

@GoogleCodeExporter
Copy link
Author

Issue 109 has been merged into this issue.

Original comment by evernat@free.fr on 8 Oct 2011 at 9:21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant