Every web application must be located in its own war file or directory. By
placing your application directly into webapps directory of your jetty
installation, you would likely break any number of webapp configuration
mechanisms. Also, you need to *COPY* rather when *MOVE* the required JAR
files from the lib directory to your application's WEB-INF/lib, they *MUST*
reside in both places for both Jetty and webapp to work properly.

-Michael

On Fri, May 27, 2011 at 3:47 AM, David Boucher <[email protected]> wrote:

> 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
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
>
_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to