tipsy / j2html

Java to HTML generator. Enjoy typesafe HTML generation.

Home Page:https://j2html.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

styleWithInlineFile() et al fail when the file is in a jar

ylexus opened this issue · comments

  1. InlineStaticResource should be reading from a URL via URL.openStream() rather than trying to convert it file (which will fail if the resource is in a jar). It's pretty standard in java to have resources in jar files or somewhere else, but not as files in filesystem, and it's easy to support it (in fact will be less code than there is now).
  2. The whole static resource loading API better be re-branded "file"->"resource" to underline it's classpath resources it's dealing with, not files.
commented

If you can create a non-breaking PR (deprecate the old method), I would be happy to merge it.

commented

Fixed here @ylexus 3682413.

commented

Released as part of 1.2.1

<dependency>
    <groupId>com.j2html</groupId>
    <artifactId>j2html</artifactId>
    <version>1.2.1</version>
</dependency>

http://search.maven.org/#artifactdetails%7Ccom.j2html%7Cj2html%7C1.2.1%7Cjar