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

Malformed URL for tag dependant #25

Open
Maldivia opened this issue Dec 8, 2015 · 2 comments
Open

Malformed URL for tag dependant #25

Maldivia opened this issue Dec 8, 2015 · 2 comments

Comments

@Maldivia
Copy link

Maldivia commented Dec 8, 2015

The dependants added in TagFileLoaderVisitor.visit() are invalid URLs, causing new URL(key) in Compiler.isOutDated() to fail with MalformedURLException, falling back to assuming that they are outdated.

Example path generated: "jar:/WEB-INF/lib/library.jar!/META-INF/sample.tld"
Causing the following exception:

DEBUG [org.apache.jasper.compiler] (default task-7) Problem accessing resource. Treat as outdated.: java.net.MalformedURLException: invalid url: /WEB-INF/lib/library.jar!/META-INF/sample.tld (java.net.MalformedURLException: no protocol: /WEB-INF/lib/library.jar)
    at java.net.URL.<init>(URL.java:620)
    at java.net.URL.<init>(URL.java:483)
    at java.net.URL.<init>(URL.java:432)
    at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:491)
    at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:406)
    (...)
@ctomc
Copy link
Contributor

ctomc commented Dec 8, 2015

Do you have some case how to reproduce this?

@Maldivia
Copy link
Author

Hi, sorry for the delay.

Here's a simple war file, containing a setup that showcase this:
https://www.dropbox.com/s/zc0p229dde4ti0s/tagfile.war

The test.Test class simply throws an exception if jsp or tag class was recompiled.

Easiest way to reproduce is to enable the development mode, and set org.apache.jasper.compiler logging to DEBUG, then simply deploy above and load http://localhost:8080/tagfile and refresh.

The refresh should show you an exception, indicating that the jsp or tag class was recompiled.
And in the server.log you'll see the MalformedURLException.

@Maldivia Maldivia reopened this Dec 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants