Path to find asciidoctor-default.css on Tomcat

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Path to find asciidoctor-default.css on Tomcat

goodfellas
Hi,

I used asciidoctorJ to convert adoc files to html on a Tomcat server and I have an issue with asciidoctor-default.css path: (Errno::ENOENT) P:/Program Files/Tomcat8/data/stylesheets/asciidoctor-default.css
It looks like trying to find default css on Tomcat filesystem instead of looking inside asciidoctorj-1.5.2.jar\gems\asciidoctor-1.5.2\data\stylesheets\

It works fine when launching tomcat embedded in my IDE

I follow asciidoctorJ documentation and create an Asciidoctor instance as follows (without doing this I got org.jruby.exceptions.RaiseException: (LoadError) no such file to load)

RubyInstanceConfig config = new RubyInstanceConfig();
config.setLoader(this.getClass().getClassLoader());
JavaEmbedUtils.initialize(Arrays.asList("META-INF/jruby.home/lib/ruby/2.0", "gems/asciidoctor-1.5.2/lib"),
                                config);
return Asciidoctor.Factory.create(this.getClass().getClassLoader());

I convert adoc files with the following options:

Attributes attributes = new Attributes();
attributes.setLinkCss(false);

return OptionsBuilder.options()
                .headerFooter(true)
                .safe(SafeMode.SAFE)
                .attributes(attributes);

Have you got an idea about this ?

Thanks in advance for your help