# Get Static Web File

**URL:** <https://forum.inductiveautomation.com/t/get-static-web-file/12214>\
**Category:** 3rd Party Modules\
**Created:** [October 7, 2016, 4:21pm UTC](https://forum.inductiveautomation.com/t/get-static-web-file/12214 "2016-10-07T16:21:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cody.tamaki](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@cody.tamaki](https://forum.inductiveautomation.com/u/cody.tamaki)\
**Post date:** [October 7, 2016, 4:21pm UTC](https://forum.inductiveautomation.com/t/get-static-web-file/12214/1 "2016-10-07T16:21:02Z")

</div>

I’m trying to have a servlet return a .html file that I’ve bundled in my module.

Directory structure looks like:

```auto
/java/com.tamakicontrol.modules/GatewayHook.java
 ------------------------------/servlets/TestServlet.java
/resources/com.tamakicontrol.modules/test.properties
------------------------------------/web/index.html
```

I’ve tried packaging it with BundleUtil, and I can see the index.html file inside my unzipped module, but I don’t really know how to grab it out of there with my servlet.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 7, 2016, 4:26pm UTC](https://forum.inductiveautomation.com/t/get-static-web-file/12214/2 "2016-10-07T16:26:35Z")

</div>

You’d want to use something like Class.getResourceAsStream(), with a path (I think) relative to whatever class you actually use to make the call.

---

<div class="post-metadata">

**Author:** ![cody.tamaki](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@cody.tamaki](https://forum.inductiveautomation.com/u/cody.tamaki)\
**Post date:** [October 16, 2016, 3:36am UTC](https://forum.inductiveautomation.com/t/get-static-web-file/12214/3 "2016-10-16T03:36:22Z")

</div>

Got it! Thanks
