Static content with Maven Jetty Plugin?

Put your static contents under any folder below yourStaticApp/src/main/webapp -- say under yourStaticApp/src/main/webapp/static . When you will run Jetty these will be available as http://host:port/contextRoot/static/fileName.ext.

Up vote 1 down vote favorite share g+ share fb share tw.

How can I serve static content with maven jetty plugin (7. X) Thanks maven jetty maven-jetty-plugin link|improve this question asked Feb 21 '11 at 17:57Cemo3611214 67% accept rate.

Put your static contents under any folder below /yourStaticApp/src/main/webapp -- say under /yourStaticApp/src/main/webapp/static. When you will run Jetty these will be available as http://host:port/contextRoot/static/fileName. Ext Hmmm, unsure, if that's possible.

Eclipse Jetty Maven plugin documents a way to configure static source location, which boils down to the alternate location of webapps mentioned above. ... ... ${basedir}/src/staticfiles ... ... ... As the doc points out: –By default, this is set to ${basedir}/src/main/webapp. If your static sources are in a different location, set this parameter accordingly.

Refer: wiki.eclipse.org/Jetty/Feature/Jetty_Mav... Update: On some more reseach I found out that you can actually point the location of webdefault. Xml from in Jetty-maven plugin; and in webdefault. Xml you can configure the static content location.

In your Jetty Maven configuration, point the location of wendefault. Xml org.mortbay. Jetty maven-jetty-plugin ... /my/path/to/webdefault.

Xml ... Now, with webdefault. Xml in your hand you can put the configuration mentioned here: http://docs.codehaus.org/display/JETTY/Static+Content -- except the package Names has been changed from org.mortbay.jetty... to org.eclipse.jetty... see below: /javadoc /javadoc/ org.eclipse.jetty.servlet. DefaultServlet / refer: http://wiki.eclipse.org/Jetty/Reference/webdefault.xml I haven't tested/used the above.

But let me know, if you get this working. Or if anything else needed to get this done.

I don't mean this. I mean a directory to serve as a static content. Check this please.

I wanted such a solution with maven. Docs.codehaus.org/display/JETTY/Static+Content – Cemo Feb 21 '11 at 18:15 @Sessizlik updated the answer. – Nishant Feb 21 '11 at 18:59 it did not help me.

I am sure there is something else to configure. But I mostly interested in second solution at that page. IS this possible to configure in pom.

Xml like this blog.markfeeney.com/2009/12/… – Cemo Feb 21 '11 at 19:56.

I have such a configuration at my jetty.xml. I have just wanted to updated my question. /static ${static-resources-path} org.eclipse.jetty.servlet.DefaultServlet.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions