Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] jetty with activemq JMS with http

Hi Michael,

Thank you for your answer, but I always have difficulties :-(
For my web app to work, I need jetty-server, jetty-util, jetty-http, jetty-io and jetty-servlet jar files.

I tried to put them into WEB-INF/lib (and removed them from jetty/lib), but now jetty does not start. It claims "NoClassDefFound" for the previous jars...

My Jetty's tree is the following :

/jetty
/lib
/etc
...
/webapps
/WEB-INF
/classes
/lib
web.xml

So, no directory between webapps and WEB-INF. Is this important ?

Sorry for all those questions, and thank you again.

David.

2011/5/26 Michael Gorovoy 
Greetings,
Your directory setup does not follow proper web app configuration. If you want to serve your application at root context, the directory structure for your web app should look like following. All your JAR files should go into WEB-INF/lib directory, including the jar files from Jetty distribution that your web app depends on. The reason for this is that servlet specification doesn't allow servlet containers to expose their internal classes to the servlets. 

/jetty
   /lib
   /etc
   ...
   /webapps
      /root
         /WEB-INF
          /classes
          /lib
          web.xml

-Michael
On Thu, May 26, 2011 at 10:42 AM, David Boucher  wrote:
Hi,

On my project, I use jetty 7.3.0. I start it with the command : jetty.sh start

I've got in $JETTY_HOME/webapps/WEB-INF a file server-servlet.xml. Inside it, I defined a JMS with address tcp://address:61616

All worked fine.

Now, for new reasons, I need to change this JMS to work with http, so I changed the address to http://address:8080

Inside my broker class, I need classes like jetty-server, jetty-util, jetty-http, ... All those classes are in jetty/lib, but my broker looks for them in jetty/webapps/WEB-INF/lib and don't see them from the jetty server.

What am I doing wrong ? How could I take them from the running jetty server ? Or where could I find a tutorial on JMS on http with Jetty ?

Thanks.
David.
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users



Back to the top