Get Static Web File

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

Directory structure looks like:

/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.

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.

Got it! Thanks