-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Copy ServletHolder class/instance properly during startWebapp #6214
Conversation
…tor. Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
- using status code 555 for testcase eliminating 503 false success from different code path than what we are attempting to fix Signed-off-by: Joakim Erdfelt <[email protected]>
- ServletHolder needs a mapping to allow RejectUncompiledJspServlet to respond to requests for JSPs that haven't been precompiled. - Precompiled test class is now properly placed into a generated webapp base directory without contaminating the webapp classloader with other src/test/java classes Signed-off-by: Joakim Erdfelt <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@janbartel can you review this and then let's chat. I think we need to think very carefully about what it means to have 2 holders sharing the same instance.
jetty-webapp/src/test/java/org/eclipse/jetty/webapp/ForcedServletTest.java
Outdated
Show resolved
Hide resolved
jetty-webapp/src/test/java/org/eclipse/jetty/webapp/ForcedServletTest.java
Outdated
Show resolved
Hide resolved
jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java
Outdated
Show resolved
Hide resolved
jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java
Outdated
Show resolved
Hide resolved
jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java
Outdated
Show resolved
Hide resolved
jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Greg Wilkins <[email protected]>
Signed-off-by: Greg Wilkins <[email protected]>
jetty-webapp/src/test/java/org/eclipse/jetty/webapp/jsp/FakeJspServlet.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Greg Wilkins <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both of the remaining test servlet classes could be inner classes too.
@@ -0,0 +1,37 @@ | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this an inner class.
@@ -0,0 +1,37 @@ | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this one an inner class of ForcedServletTest too.
use inner classes Signed-off-by: Greg Wilkins <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ServletHolder.copyClassServlet() method added to correctly copy held class. Signed-off-by: Joakim Erdfelt <[email protected]> Signed-off-by: Greg Wilkins <[email protected]>
Copy ServletHolder class/instance properly during startWebapp (#6214) ServletHolder.copyClassServlet() method added to correctly copy held class. Cherry picked from 9.4 Signed-off-by: Greg Wilkins <[email protected]> Co-authored-by: Joakim Erdfelt <[email protected]>
#6280