st = p.getContent().toString();
//st is a String, now containing a text/html email Part
Source source = new Source(st);
//the extracted plain text is rendered onto a web page
body.append(source.getRenderer().toString().replaceAll("\n", "<br>"));
but breaks by upgrading to 3.4; difficult to understand what's wrong as the web framework (stripes) swallows the servlet exception.
Any suggestion?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This works as expected with both version 3.3 and 3.4!
so it seems there is some weird problem between jericho-html and the stripes framework, which throws a servlet exception with version 3.4, on code that works fine with 3.3.
It would be nice to explain (and fix) this, but I'm guessing I should just stick with 3.3
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ah! - I move my custom exception handler out of the way and see:-
java.lang.UnsupportedClassVersionError: net/htmlparser/jericho/Source : Unsupported major.minor version 51.0 (unable to load class net.htmlparser.jericho.Source)
problem being I'm still on java 1.6
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I use jericho in the jwma project
this worked fine with version 3.3:-
but breaks by upgrading to 3.4; difficult to understand what's wrong as the web framework (stripes) swallows the servlet exception.
Any suggestion?
further investigation, basically the same code isolated in a simple test:-
This works as expected with both version 3.3 and 3.4!
so it seems there is some weird problem between jericho-html and the stripes framework, which throws a servlet exception with version 3.4, on code that works fine with 3.3.
It would be nice to explain (and fix) this, but I'm guessing I should just stick with 3.3
Ah! - I move my custom exception handler out of the way and see:-
java.lang.UnsupportedClassVersionError: net/htmlparser/jericho/Source : Unsupported major.minor version 51.0 (unable to load class net.htmlparser.jericho.Source)
problem being I'm still on java 1.6
You can create a java 1.6 compatible jar easily by changing the target argument in the build.bat file.