-
Notifications
You must be signed in to change notification settings - Fork 273
WAR load support #608
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
WAR load support #608
Conversation
a8b2c79
to
015a52f
Compare
@@ -0,0 +1 @@ | |||
https://tomcat.apache.org/tomcat-6.0-doc/appdev/sample/ |
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.
I very much appreciate that comment - but you might even place it in the test.desc file (so as not to create a non-standard file): you can place comments after another --
, see test.pl --help
src/java_bytecode/jar_file.cpp
Outdated
@@ -77,6 +78,11 @@ void jar_filet::open( | |||
assert(filename_length==filename_len); | |||
std::string file_name(filename_char); | |||
|
|||
// remove WAR class prefix | |||
const std::string war_class_prefix("WEB-INF/classes/"); |
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.
Would that also be the prefix on Windows?
src/java_bytecode/jar_file.cpp
Outdated
@@ -48,8 +77,27 @@ void jar_filet::open(const std::string &filename) | |||
mz_zip_reader_get_filename(&zip, i, filename_char, filename_length); | |||
assert(filename_length==filename_len); | |||
std::string file_name(filename_char); | |||
|
|||
// remove WAR class prefix | |||
const std::string war_class_prefix("WEB-INF/classes/"); |
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.
Would that also be the prefix on Windows?
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.
apparently, yes, cf. https://en.wikipedia.org/wiki/WAR_(file_format)
what's currently missing though, is loading of jars listed in WEB-INF/lib
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.
Ok, thanks!
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.
(Maybe worth adding that link as a comment in the source code.)
d3b91ff
to
4ae4273
Compare
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.
A nit pick about blank lines, but mainly my please-change-this request is about the url.txt file that I'd prefer to see go away. See comment.
src/java_bytecode/jar_file.cpp
Outdated
@@ -9,9 +9,9 @@ Author: Daniel Kroening, [email protected] | |||
#include <cstring> | |||
#include <cassert> | |||
#include <unordered_set> | |||
|
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.
I'd rather have more blank lines that fewer - is there a reason (such as IDEs doing automatic work) why this line is gone?
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.
re-added this line and one in front of documentation block for the function afterwards
no particular reason for having removed it
please note that this PR is not yet complete, as loading of jars in the war is not yet supported |
Should it be tagged do-not-merge? |
currently, yes, but I cannot do the tagging apparently |
2180ce1
to
4f42f7f
Compare
I brought this up to current |
I am going to close this PR as it appears that work on it has been inactive for an extended period of time. This is not any judgement on how worthwhile this work is. This is part of an effort to reduce the number of open PRs which are not being actively worked on. If you still think it would be worthwhile to get this merged then the branch should be re-based on the latest version of develop and the PR re-opened. |
This adds support to load class files from web application archive (WAR) files.
requires #604