How to provide JS/HTML resources?

12 views
Skip to first unread message

Johannes Schneider

unread,
Nov 1, 2016, 7:35:10 AM11/1/16
to GWizard Discussion
Hi guys,

I am trying to play around with gwizard.
I have a "src/main/webapps" folder that contains several files that should be provided by the jetty instance (e.g. index.html).

Any hints how to configure the jetty server?



Thanks,

Johannes

jonathan....@plexxi.com

unread,
Nov 1, 2016, 11:21:59 AM11/1/16
to GWizard Discussion
I've never tried to set this up but guice has integrations with Struts2


In my personal project, I'm using nodeJS to host my web content and then proxying all requests under the `/api/` path to the java server.

Jeff Schnitzer

unread,
Nov 12, 2016, 4:00:41 PM11/12/16
to gwi...@googlegroups.com
There’s nothing currently builtin to gwizard for serving static content, but it’s just guice. You can mount servlets to serve static content from paths, or use whatever other mechanism you can imagine. You have control.

Maybe bundle your static content as resources in the jar and serve them up with getResourceAsStream()? It sounds reasonable, although I don’t know what performance would be like.

Jeff

--
You received this message because you are subscribed to the Google Groups "GWizard Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gwizard+unsubscribe@googlegroups.com.
To post to this group, send email to gwi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gwizard/2622805a-9a31-4618-a2ef-9e6bdbdef0ef%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages