getResourceAsStream in details

Here I am putting my analysis for retrieving file as resource stream
image
image

Comments

  1. good. all info in one place :)

    ReplyDelete
  2. If you find any conflict then lets update the post :)

    ReplyDelete
  3. Hi Yogesh.

    Thanks to your post I finally could load a resource stylesheet for my application: I spent more than 4 hours googling everywhere and not finding the right answer.

    My mistake was that I wrote:

    this.getClass().getResourceAsStream("stylesheet.xsl")

    But my file was located in WEB-INF/classes.

    Thanks to your post I changed to "/stylesheet.xsl" and now everything works fine.

    Thanks again!

    ReplyDelete
  4. @Frederic F. MONFILS You always Welcome :)

    ReplyDelete
  5. Life saver! Saved me a couple of hours as well.

    ReplyDelete

Post a Comment

Popular posts from this blog

Composite Design Pattern by example

State Design Pattern by Example

Eclipse command framework core expression: Property tester