<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"	>
<channel>
	<title>Comments on: Superceeded Article: Embedded Web Integration Testing with Jetty</title>
	<atom:link href="http://johannesbrodwall.com/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/feed/" rel="self" type="application/rss+xml" />
	<link>http://johannesbrodwall.com/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/</link>
	<description>Johannes Brodwall&#039;s Musings on Software Architecture and Programming</description>
	<lastBuildDate>Tue, 07 Sep 2010 16:25:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: OxfordjdlkKayla</title>
		<link>http://johannesbrodwall.com/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/comment-page-1/#comment-127093</link>
		<dc:creator>OxfordjdlkKayla</dc:creator>
		<pubDate>Mon, 05 Oct 2009 10:11:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.brodwall.com/johannes/blog/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/#comment-127093</guid>
		<description>In ffice right now will go through this latter.&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;marshel&lt;br&gt;______________________________________________&lt;br&gt;&lt;a href=&quot;http://www.oforu.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;aion gold&lt;/a&gt; &#124; &lt;a href=&quot;http://www.eing.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Aion Powerleveling&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>In ffice right now will go through this latter.</p>
<p>Thanks<br />marshel<br />______________________________________________<br /><a href="http://www.oforu.com" target="_blank" rel="nofollow">aion gold</a> | <a href="http://www.eing.com" target="_blank" rel="nofollow">Aion Powerleveling</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johannes Brodwall</title>
		<link>http://johannesbrodwall.com/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/comment-page-1/#comment-128291</link>
		<dc:creator>Johannes Brodwall</dc:creator>
		<pubDate>Thu, 08 Jan 2009 21:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.brodwall.com/johannes/blog/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/#comment-128291</guid>
		<description>Hi, zp bappi

My experience is that JNDI is something that is a little tricky to get
right, and I&#039;ve never used this approach with pre-released versions of
Jetty. I recommend that you try out using Jetty 6.1 or that you post a
question to the Jetty mailing lists, which you can find on
http://docs.codehaus.org/display/JETTY/Jetty+Wiki. I would also
recommend using Java rather than XML to set up Jetty. This will not
necessarily solve you problem, but your cycle time can be quicker.

Good luck.


~Johannes</description>
		<content:encoded><![CDATA[<p>Hi, zp bappi</p>
<p>My experience is that JNDI is something that is a little tricky to get<br />
right, and I&#8217;ve never used this approach with pre-released versions of<br />
Jetty. I recommend that you try out using Jetty 6.1 or that you post a<br />
question to the Jetty mailing lists, which you can find on<br />
<a href="http://docs.codehaus.org/display/JETTY/Jetty+Wiki" rel="nofollow">http://docs.codehaus.org/display/JETTY/Jetty+Wiki</a>. I would also<br />
recommend using Java rather than XML to set up Jetty. This will not<br />
necessarily solve you problem, but your cycle time can be quicker.</p>
<p>Good luck.</p>
<p>~Johannes</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jhannes</title>
		<link>http://johannesbrodwall.com/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/comment-page-1/#comment-102497</link>
		<dc:creator>jhannes</dc:creator>
		<pubDate>Thu, 08 Jan 2009 19:12:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.brodwall.com/johannes/blog/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/#comment-102497</guid>
		<description>Hi, zp bappi&lt;br&gt;&lt;br&gt;My experience is that JNDI is something that is a little tricky to get right, and I&#039;ve never used this approach with pre-released versions of Jetty. I recommend that you try out using Jetty 6.1 or that you post a question to the Jetty mailing lists, which you can find on &lt;a href=&quot;http://docs.codehaus.org/display/JETTY/Jetty+Wiki&quot; rel=&quot;nofollow&quot;&gt;http://docs.codehaus.org/display/JETTY/Jetty+Wiki&lt;/a&gt;. I would also recommend using Java rather than XML to set up Jetty. This will not necessarily solve you problem, but your cycle time can be quicker.</description>
		<content:encoded><![CDATA[<p>Hi, zp bappi</p>
<p>My experience is that JNDI is something that is a little tricky to get right, and I&#39;ve never used this approach with pre-released versions of Jetty. I recommend that you try out using Jetty 6.1 or that you post a question to the Jetty mailing lists, which you can find on <a href="http://docs.codehaus.org/display/JETTY/Jetty+Wiki" rel="nofollow">http://docs.codehaus.org/display/JETTY/Jetty+Wiki</a>. I would also recommend using Java rather than XML to set up Jetty. This will not necessarily solve you problem, but your cycle time can be quicker.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zp bappi</title>
		<link>http://johannesbrodwall.com/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/comment-page-1/#comment-102496</link>
		<dc:creator>zp bappi</dc:creator>
		<pubDate>Thu, 08 Jan 2009 14:52:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.brodwall.com/johannes/blog/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/#comment-102496</guid>
		<description>hi,&lt;br&gt;&lt;br&gt;i am new to jetty. may be thats why i could not make the datasource work :(. well, i tried everything i clould. please help me.&lt;br&gt;&lt;br&gt;here is my detail:&lt;br&gt;OS: windows vista ultimate&lt;br&gt;jetty : 7.0.0.pre5&lt;br&gt;web application base location: $jetty.home/webapps-plus/LSRTest1&lt;br&gt;database: mysql&lt;br&gt;command line: java -DOPTIONS=plus,jsp,ext,default -jar start.jar etc/jetty.xml etc/jetty-plus.xml&lt;br&gt;&lt;br&gt;my jetty-plus.xml:&lt;br&gt;&lt;?xml version=&quot;1.0&quot;?&gt;&lt;br&gt;&lt;!DOCTYPE Configure PUBLIC &quot;-//Mort Bay Consulting//DTD Configure//EN&quot; &quot;http://jetty.mortbay.org/configure.dtd&quot;&gt;&lt;br&gt;&lt;Configure id=&quot;Server&quot; class=&quot;org.mortbay.jetty.Server&quot;&gt;&lt;br&gt;  &lt;Array id=&quot;plusConfig&quot; type=&quot;java.lang.String&quot;&gt;&lt;br&gt;    &lt;Item&gt;org.mortbay.jetty.webapp.WebInfConfiguration&lt;/Item&gt;&lt;br&gt;    &lt;Item&gt;org.mortbay.jetty.plus.webapp.EnvConfiguration&lt;/Item&gt;&lt;br&gt;    &lt;Item&gt;org.mortbay.jetty.plus.webapp.Configuration&lt;/Item&gt;&lt;br&gt;    &lt;Item&gt;org.mortbay.jetty.webapp.JettyWebXmlConfiguration&lt;/Item&gt;&lt;br&gt;    &lt;Item&gt;org.mortbay.jetty.webapp.TagLibConfiguration&lt;/Item&gt;&lt;br&gt;  &lt;/Array&gt;&lt;br&gt;    &lt;Call name=&quot;addLifeCycle&quot;&gt;&lt;br&gt;      &lt;Arg&gt;&lt;br&gt;        &lt;New class=&quot;org.mortbay.jetty.deployer.WebAppDeployer&quot;&gt;&lt;br&gt;          &lt;Set name=&quot;contexts&quot;&gt;&lt;Ref id=&quot;Contexts&quot;/&gt;&lt;/Set&gt;&lt;br&gt;          &lt;Set name=&quot;webAppDir&quot;&gt;&lt;SystemProperty name=&quot;jetty.home&quot; default=&quot;.&quot;/&gt;/webapps-plus&lt;/Set&gt;&lt;br&gt;          &lt;Set name=&quot;parentLoaderPriority&quot;&gt;false&lt;/Set&gt;&lt;br&gt;          &lt;Set name=&quot;extract&quot;&gt;true&lt;/Set&gt;&lt;br&gt;          &lt;Set name=&quot;allowDuplicates&quot;&gt;false&lt;/Set&gt;&lt;br&gt;          &lt;Set name=&quot;defaultsDescriptor&quot;&gt;&lt;SystemProperty name=&quot;jetty.home&quot; default=&quot;.&quot;/&gt;/etc/webdefault.xml&lt;/Set&gt;&lt;br&gt;          &lt;Set name=&quot;configurationClasses&quot;&gt;&lt;Ref id=&quot;plusConfig&quot;/&gt;&lt;/Set&gt;&lt;br&gt;        &lt;/New&gt;&lt;br&gt;      &lt;/Arg&gt;&lt;br&gt;    &lt;/Call&gt;&lt;br&gt;&lt;/Configure&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;my context file ($jetty.home/context/LSRTest1.xml):&lt;br&gt;&lt;?xml version=&quot;1.0&quot;  encoding=&quot;ISO-8859-1&quot;?&gt;&lt;br&gt;&lt;!DOCTYPE Configure PUBLIC &quot;-//Mort Bay Consulting//DTD Configure//EN&quot; &quot;http://jetty.mortbay.org/configure.dtd&quot;&gt;&lt;br&gt;&lt;Configure id=&#039;wac&#039; class=&quot;org.mortbay.jetty.webapp.WebAppContext&quot;&gt;&lt;br&gt;  &lt;Set name=&quot;contextPath&quot;&gt;/LSRTest1&lt;/Set&gt;&lt;br&gt;  &lt;Set name=&quot;war&quot;&gt;&lt;SystemProperty name=&quot;jetty.home&quot; default=&quot;.&quot;/&gt;/webapps-plus/LSRTest1&lt;/Set&gt;&lt;br&gt;  &lt;Set name=&quot;descriptor&quot;&gt;&lt;SystemProperty name=&quot;jetty.home&quot; default=&quot;.&quot;/&gt;/webapps-plus/LSRTest1/WEB-INF/web.xml&lt;/Set&gt;&lt;br&gt;  &lt;Set name=&quot;extractWAR&quot;&gt;false&lt;/Set&gt;&lt;br&gt;  &lt;Set name=&quot;copyWebDir&quot;&gt;false&lt;/Set&gt;&lt;br&gt;  &lt;New id=&quot;lsrdb&quot; class=&quot;org.mortbay.jetty.plus.naming.Resource&quot;&gt;&lt;br&gt;    &lt;Arg&gt;&lt;Ref id=&#039;wac&#039;/&gt;&lt;/Arg&gt;&lt;br&gt;    &lt;Arg&gt;java:/comp/env/jdbc/LSRDB&lt;/Arg&gt;&lt;br&gt;    &lt;Arg&gt;&lt;br&gt;      &lt;New class=&quot;com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource&quot;&gt;&lt;br&gt;        &lt;Set name=&quot;Url&quot;&gt;jdbc:mysql://localhost:3306/lsrdb?autoReconnect=true&lt;/Set&gt;&lt;br&gt;        &lt;Set name=&quot;User&quot;&gt;root&lt;/Set&gt;&lt;br&gt;        &lt;Set name=&quot;Password&quot;&gt;zp123&lt;/Set&gt;&lt;br&gt;      &lt;/New&gt;&lt;br&gt;    &lt;/Arg&gt;&lt;br&gt;  &lt;/New&gt;&lt;br&gt;&lt;/Configure&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;my web.xml file ($jetty.home/webapps-plus/LSRTest1/WEB-INF/web.xml):&lt;br&gt;&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;&lt;br&gt;&lt;web-app&lt;br&gt; xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot;&lt;br&gt; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;br&gt; xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/javaee &lt;a href=&quot;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd%22&quot; rel=&quot;nofollow&quot;&gt;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot;&lt;/a&gt;&lt;br&gt; version=&quot;2.5&quot;&gt;&lt;br&gt;  &lt;display-name&gt;LSR Test1 WebApp&lt;/display-name&gt;&lt;br&gt;  &lt;context-param&gt;&lt;br&gt;    &lt;param-name&gt;org.mortbay.jetty.servlet.ManagedAttributes&lt;/param-name&gt;&lt;br&gt;    &lt;param-value&gt;org.cometd.bayeux,dojox.cometd.bayeux&lt;/param-value&gt;&lt;br&gt;  &lt;/context-param&gt;&lt;br&gt;  &lt;listener&gt;&lt;br&gt;    &lt;listener-class&gt;lsr.cometd.listener.BayeuxServicesListener&lt;/listener-class&gt;&lt;br&gt;  &lt;/listener&gt;&lt;br&gt;  &lt;servlet&gt;&lt;br&gt;    &lt;servlet-name&gt;prechat&lt;/servlet-name&gt;&lt;br&gt;    &lt;servlet-class&gt;lsr.prechat.PreChatServlet&lt;/servlet-class&gt;&lt;br&gt;    &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;&lt;br&gt;  &lt;/servlet&gt;&lt;br&gt;  &lt;servlet&gt;&lt;br&gt;    &lt;servlet-name&gt;initchat&lt;/servlet-name&gt;&lt;br&gt;    &lt;servlet-class&gt;lsr.initchat.InitChatServlet&lt;/servlet-class&gt;&lt;br&gt;    &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;&lt;br&gt;  &lt;/servlet&gt;&lt;br&gt;  &lt;servlet&gt;&lt;br&gt;    &lt;servlet-name&gt;chat&lt;/servlet-name&gt;&lt;br&gt;    &lt;servlet-class&gt;org.mortbay.cometd.SuspendingCometdServlet&lt;/servlet-class&gt;&lt;br&gt;    &lt;init-param&gt;&lt;br&gt;      &lt;param-name&gt;timeout&lt;/param-name&gt;&lt;br&gt;      &lt;param-value&gt;120000&lt;/param-value&gt;&lt;br&gt;    &lt;/init-param&gt;&lt;br&gt;    &lt;init-param&gt;&lt;br&gt;      &lt;param-name&gt;interval&lt;/param-name&gt;&lt;br&gt;      &lt;param-value&gt;0&lt;/param-value&gt;&lt;br&gt;    &lt;/init-param&gt;&lt;br&gt;    &lt;init-param&gt;&lt;br&gt;      &lt;param-name&gt;maxInterval&lt;/param-name&gt;&lt;br&gt;      &lt;param-value&gt;10000&lt;/param-value&gt;&lt;br&gt;    &lt;/init-param&gt;&lt;br&gt;    &lt;init-param&gt;&lt;br&gt;      &lt;param-name&gt;multiFrameInterval&lt;/param-name&gt;&lt;br&gt;      &lt;param-value&gt;2000&lt;/param-value&gt;&lt;br&gt;    &lt;/init-param&gt;&lt;br&gt;    &lt;init-param&gt;&lt;br&gt;      &lt;param-name&gt;logLevel&lt;/param-name&gt;&lt;br&gt;      &lt;param-value&gt;0&lt;/param-value&gt;&lt;br&gt;    &lt;/init-param&gt;&lt;br&gt;    &lt;init-param&gt;&lt;br&gt;      &lt;param-name&gt;directDeliver&lt;/param-name&gt;&lt;br&gt;      &lt;param-value&gt;true&lt;/param-value&gt;&lt;br&gt;    &lt;/init-param&gt;&lt;br&gt;    &lt;init-param&gt;&lt;br&gt;      &lt;param-name&gt;refsThreshold&lt;/param-name&gt;&lt;br&gt;      &lt;param-value&gt;10&lt;/param-value&gt;&lt;br&gt;    &lt;/init-param&gt;&lt;br&gt;    &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;&lt;br&gt;  &lt;/servlet&gt;&lt;br&gt;  &lt;servlet-mapping&gt;&lt;br&gt;    &lt;servlet-name&gt;prechat&lt;/servlet-name&gt;&lt;br&gt;    &lt;url-pattern&gt;/prechat/*&lt;/url-pattern&gt;&lt;br&gt;  &lt;/servlet-mapping&gt;&lt;br&gt;  &lt;servlet-mapping&gt;&lt;br&gt;    &lt;servlet-name&gt;initchat&lt;/servlet-name&gt;&lt;br&gt;    &lt;url-pattern&gt;/init/*&lt;/url-pattern&gt;&lt;br&gt;  &lt;/servlet-mapping&gt;&lt;br&gt;  &lt;servlet-mapping&gt;&lt;br&gt;    &lt;servlet-name&gt;chat&lt;/servlet-name&gt;&lt;br&gt;    &lt;url-pattern&gt;/chat/*&lt;/url-pattern&gt;&lt;br&gt;  &lt;/servlet-mapping&gt;&lt;br&gt;  &lt;resource-ref&gt;&lt;br&gt;    &lt;res-ref-name&gt;jdbc/LSRDB&lt;/res-ref-name&gt;&lt;br&gt;    &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;&lt;br&gt;    &lt;res-auth&gt;Container&lt;/res-auth&gt;&lt;br&gt;  &lt;/resource-ref&gt;&lt;br&gt;&lt;/web-app&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;i did not modify any other file like etc/jetty.xml. also, i dont have any jetty-web.xml or jetty-env.xml file in $jetty.home/webapps-plus/LSRTest1/WEB-INF directory.&lt;br&gt;&lt;br&gt;when i use java code like:&lt;br&gt;InitialContext ctx = new InitialContext();&lt;br&gt;DataSource ds = (DataSource) ctx.lookup(&quot;java:comp/env/jdbc/LSRDB&quot;);&lt;br&gt;&lt;br&gt;i get the following exception:&lt;br&gt;javax.naming.NameNotFoundException; remaining name &#039;env/jdbc/LSRDB&#039;&lt;br&gt;        at org.mortbay.naming.NamingContext.lookup(NamingContext.java:634)&lt;br&gt;        at org.mortbay.naming.NamingContext.lookup(NamingContext.java:665)&lt;br&gt;        at org.mortbay.naming.NamingContext.lookup(NamingContext.java:680)&lt;br&gt;        at org.mortbay.naming.java.javaRootURLContext.lookup(javaRootURLContext.java:112)&lt;br&gt;        at javax.naming.InitialContext.lookup(Unknown Source)&lt;br&gt;        at lsr.util.DBConnection.&lt;init&gt;(DBConnection.java:26)&lt;br&gt;        at lsr.initchat.InitChatServlet.getDomainInfo(InitChatServlet.java:126)&lt;br&gt;        at lsr.initchat.InitChatServlet.doGet(InitChatServlet.java:43)&lt;br&gt;        at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)&lt;br&gt;        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)&lt;br&gt;        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)&lt;br&gt;        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)&lt;br&gt;        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)&lt;br&gt;        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:822)&lt;br&gt;        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:229)&lt;br&gt;        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)&lt;br&gt;        at org.mortbay.jetty.Server.handle(Server.java:324)&lt;br&gt;        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:550)&lt;br&gt;        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:876)&lt;br&gt;        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:535)&lt;br&gt;        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)&lt;br&gt;        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:407)&lt;br&gt;        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:421)&lt;br&gt;        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)&lt;br&gt;&lt;br&gt;&lt;br&gt;according to any documentation i find on internet, the above setup is correct. but, i dont know what is wrong here. i am stuck here for 3 days... trying different methods. but, failed in all. please help.&lt;br&gt;&lt;br&gt;regards,&lt;br&gt;zp bappi.</description>
		<content:encoded><![CDATA[<p>hi,</p>
<p>i am new to jetty. may be thats why i could not make the datasource work :(. well, i tried everything i clould. please help me.</p>
<p>here is my detail:<br />OS: windows vista ultimate<br />jetty : 7.0.0.pre5<br />web application base location: $jetty.home/webapps-plus/LSRTest1<br />database: mysql<br />command line: java -DOPTIONS=plus,jsp,ext,default -jar start.jar etc/jetty.xml etc/jetty-plus.xml</p>
<p>my jetty-plus.xml:<br />&lt;?xml version=&#8221;1.0&#8243;?&gt;<br />&lt;!DOCTYPE Configure PUBLIC &#8220;-//Mort Bay Consulting//DTD Configure//EN&#8221; &#8220;http://jetty.mortbay.org/configure.dtd&#8221;&gt;<br />&lt;Configure id=&#8221;Server&#8221; class=&#8221;org.mortbay.jetty.Server&#8221;&gt;<br />  &lt;Array id=&#8221;plusConfig&#8221; type=&#8221;java.lang.String&#8221;&gt;<br />    &lt;Item&gt;org.mortbay.jetty.webapp.WebInfConfiguration&lt;/Item&gt;<br />    &lt;Item&gt;org.mortbay.jetty.plus.webapp.EnvConfiguration&lt;/Item&gt;<br />    &lt;Item&gt;org.mortbay.jetty.plus.webapp.Configuration&lt;/Item&gt;<br />    &lt;Item&gt;org.mortbay.jetty.webapp.JettyWebXmlConfiguration&lt;/Item&gt;<br />    &lt;Item&gt;org.mortbay.jetty.webapp.TagLibConfiguration&lt;/Item&gt;<br />  &lt;/Array&gt;<br />    &lt;Call name=&#8221;addLifeCycle&#8221;&gt;<br />      &lt;Arg&gt;<br />        &lt;New class=&#8221;org.mortbay.jetty.deployer.WebAppDeployer&#8221;&gt;<br />          &lt;Set name=&#8221;contexts&#8221;&gt;&lt;Ref id=&#8221;Contexts&#8221;/&gt;&lt;/Set&gt;<br />          &lt;Set name=&#8221;webAppDir&#8221;&gt;&lt;SystemProperty name=&#8221;jetty.home&#8221; default=&#8221;.&#8221;/&gt;/webapps-plus&lt;/Set&gt;<br />          &lt;Set name=&#8221;parentLoaderPriority&#8221;&gt;false&lt;/Set&gt;<br />          &lt;Set name=&#8221;extract&#8221;&gt;true&lt;/Set&gt;<br />          &lt;Set name=&#8221;allowDuplicates&#8221;&gt;false&lt;/Set&gt;<br />          &lt;Set name=&#8221;defaultsDescriptor&#8221;&gt;&lt;SystemProperty name=&#8221;jetty.home&#8221; default=&#8221;.&#8221;/&gt;/etc/webdefault.xml&lt;/Set&gt;<br />          &lt;Set name=&#8221;configurationClasses&#8221;&gt;&lt;Ref id=&#8221;plusConfig&#8221;/&gt;&lt;/Set&gt;<br />        &lt;/New&gt;<br />      &lt;/Arg&gt;<br />    &lt;/Call&gt;<br />&lt;/Configure&gt;</p>
<p>my context file ($jetty.home/context/LSRTest1.xml):<br />&lt;?xml version=&#8221;1.0&#8243;  encoding=&#8221;ISO-8859-1&#8243;?&gt;<br />&lt;!DOCTYPE Configure PUBLIC &#8220;-//Mort Bay Consulting//DTD Configure//EN&#8221; &#8220;http://jetty.mortbay.org/configure.dtd&#8221;&gt;<br />&lt;Configure id=&#39;wac&#39; class=&#8221;org.mortbay.jetty.webapp.WebAppContext&#8221;&gt;<br />  &lt;Set name=&#8221;contextPath&#8221;&gt;/LSRTest1&lt;/Set&gt;<br />  &lt;Set name=&#8221;war&#8221;&gt;&lt;SystemProperty name=&#8221;jetty.home&#8221; default=&#8221;.&#8221;/&gt;/webapps-plus/LSRTest1&lt;/Set&gt;<br />  &lt;Set name=&#8221;descriptor&#8221;&gt;&lt;SystemProperty name=&#8221;jetty.home&#8221; default=&#8221;.&#8221;/&gt;/webapps-plus/LSRTest1/WEB-INF/web.xml&lt;/Set&gt;<br />  &lt;Set name=&#8221;extractWAR&#8221;&gt;false&lt;/Set&gt;<br />  &lt;Set name=&#8221;copyWebDir&#8221;&gt;false&lt;/Set&gt;<br />  &lt;New id=&#8221;lsrdb&#8221; class=&#8221;org.mortbay.jetty.plus.naming.Resource&#8221;&gt;<br />    &lt;Arg&gt;&lt;Ref id=&#39;wac&#39;/&gt;&lt;/Arg&gt;<br />    &lt;Arg&gt;java:/comp/env/jdbc/LSRDB&lt;/Arg&gt;<br />    &lt;Arg&gt;<br />      &lt;New class=&#8221;com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource&#8221;&gt;<br />        &lt;Set name=&#8221;Url&#8221;&gt;jdbc:mysql://localhost:3306/lsrdb?autoReconnect=true&lt;/Set&gt;<br />        &lt;Set name=&#8221;User&#8221;&gt;root&lt;/Set&gt;<br />        &lt;Set name=&#8221;Password&#8221;&gt;zp123&lt;/Set&gt;<br />      &lt;/New&gt;<br />    &lt;/Arg&gt;<br />  &lt;/New&gt;<br />&lt;/Configure&gt;</p>
<p>my web.xml file ($jetty.home/webapps-plus/LSRTest1/WEB-INF/web.xml):<br />&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;ISO-8859-1&#8243;?&gt;<br />&lt;web-app<br /> xmlns=&#8221;http://java.sun.com/xml/ns/javaee&#8221;<br /> xmlns:xsi=&#8221;http://www.w3.org/2001/XMLSchema-instance&#8221;<br /> xsi:schemaLocation=&#8221;http://java.sun.com/xml/ns/javaee <a href="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd%22" rel="nofollow"></a><a href="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" rel="nofollow">http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd</a>&#8220;<br /> version=&#8221;2.5&#8243;&gt;<br />  &lt;display-name&gt;LSR Test1 WebApp&lt;/display-name&gt;<br />  &lt;context-param&gt;<br />    &lt;param-name&gt;org.mortbay.jetty.servlet.ManagedAttributes&lt;/param-name&gt;<br />    &lt;param-value&gt;org.cometd.bayeux,dojox.cometd.bayeux&lt;/param-value&gt;<br />  &lt;/context-param&gt;<br />  &lt;listener&gt;<br />    &lt;listener-class&gt;lsr.cometd.listener.BayeuxServicesListener&lt;/listener-class&gt;<br />  &lt;/listener&gt;<br />  &lt;servlet&gt;<br />    &lt;servlet-name&gt;prechat&lt;/servlet-name&gt;<br />    &lt;servlet-class&gt;lsr.prechat.PreChatServlet&lt;/servlet-class&gt;<br />    &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;<br />  &lt;/servlet&gt;<br />  &lt;servlet&gt;<br />    &lt;servlet-name&gt;initchat&lt;/servlet-name&gt;<br />    &lt;servlet-class&gt;lsr.initchat.InitChatServlet&lt;/servlet-class&gt;<br />    &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;<br />  &lt;/servlet&gt;<br />  &lt;servlet&gt;<br />    &lt;servlet-name&gt;chat&lt;/servlet-name&gt;<br />    &lt;servlet-class&gt;org.mortbay.cometd.SuspendingCometdServlet&lt;/servlet-class&gt;<br />    &lt;init-param&gt;<br />      &lt;param-name&gt;timeout&lt;/param-name&gt;<br />      &lt;param-value&gt;120000&lt;/param-value&gt;<br />    &lt;/init-param&gt;<br />    &lt;init-param&gt;<br />      &lt;param-name&gt;interval&lt;/param-name&gt;<br />      &lt;param-value&gt;0&lt;/param-value&gt;<br />    &lt;/init-param&gt;<br />    &lt;init-param&gt;<br />      &lt;param-name&gt;maxInterval&lt;/param-name&gt;<br />      &lt;param-value&gt;10000&lt;/param-value&gt;<br />    &lt;/init-param&gt;<br />    &lt;init-param&gt;<br />      &lt;param-name&gt;multiFrameInterval&lt;/param-name&gt;<br />      &lt;param-value&gt;2000&lt;/param-value&gt;<br />    &lt;/init-param&gt;<br />    &lt;init-param&gt;<br />      &lt;param-name&gt;logLevel&lt;/param-name&gt;<br />      &lt;param-value&gt;0&lt;/param-value&gt;<br />    &lt;/init-param&gt;<br />    &lt;init-param&gt;<br />      &lt;param-name&gt;directDeliver&lt;/param-name&gt;<br />      &lt;param-value&gt;true&lt;/param-value&gt;<br />    &lt;/init-param&gt;<br />    &lt;init-param&gt;<br />      &lt;param-name&gt;refsThreshold&lt;/param-name&gt;<br />      &lt;param-value&gt;10&lt;/param-value&gt;<br />    &lt;/init-param&gt;<br />    &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;<br />  &lt;/servlet&gt;<br />  &lt;servlet-mapping&gt;<br />    &lt;servlet-name&gt;prechat&lt;/servlet-name&gt;<br />    &lt;url-pattern&gt;/prechat/*&lt;/url-pattern&gt;<br />  &lt;/servlet-mapping&gt;<br />  &lt;servlet-mapping&gt;<br />    &lt;servlet-name&gt;initchat&lt;/servlet-name&gt;<br />    &lt;url-pattern&gt;/init/*&lt;/url-pattern&gt;<br />  &lt;/servlet-mapping&gt;<br />  &lt;servlet-mapping&gt;<br />    &lt;servlet-name&gt;chat&lt;/servlet-name&gt;<br />    &lt;url-pattern&gt;/chat/*&lt;/url-pattern&gt;<br />  &lt;/servlet-mapping&gt;<br />  &lt;resource-ref&gt;<br />    &lt;res-ref-name&gt;jdbc/LSRDB&lt;/res-ref-name&gt;<br />    &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;<br />    &lt;res-auth&gt;Container&lt;/res-auth&gt;<br />  &lt;/resource-ref&gt;<br />&lt;/web-app&gt;</p>
<p>i did not modify any other file like etc/jetty.xml. also, i dont have any jetty-web.xml or jetty-env.xml file in $jetty.home/webapps-plus/LSRTest1/WEB-INF directory.</p>
<p>when i use java code like:<br />InitialContext ctx = new InitialContext();<br />DataSource ds = (DataSource) ctx.lookup(&#8220;java:comp/env/jdbc/LSRDB&#8221;);</p>
<p>i get the following exception:<br />javax.naming.NameNotFoundException; remaining name &#39;env/jdbc/LSRDB&#39;<br />        at org.mortbay.naming.NamingContext.lookup(NamingContext.java:634)<br />        at org.mortbay.naming.NamingContext.lookup(NamingContext.java:665)<br />        at org.mortbay.naming.NamingContext.lookup(NamingContext.java:680)<br />        at org.mortbay.naming.java.javaRootURLContext.lookup(javaRootURLContext.java:112)<br />        at javax.naming.InitialContext.lookup(Unknown Source)<br />        at lsr.util.DBConnection.&lt;init&gt;(DBConnection.java:26)<br />        at lsr.initchat.InitChatServlet.getDomainInfo(InitChatServlet.java:126)<br />        at lsr.initchat.InitChatServlet.doGet(InitChatServlet.java:43)<br />        at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)<br />        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)<br />        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)<br />        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)<br />        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)<br />        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:822)<br />        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:229)<br />        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)<br />        at org.mortbay.jetty.Server.handle(Server.java:324)<br />        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:550)<br />        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:876)<br />        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:535)<br />        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)<br />        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:407)<br />        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:421)<br />        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)</p>
<p>according to any documentation i find on internet, the above setup is correct. but, i dont know what is wrong here. i am stuck here for 3 days&#8230; trying different methods. but, failed in all. please help.</p>
<p>regards,<br />zp bappi.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johannes Brodwall</title>
		<link>http://johannesbrodwall.com/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/comment-page-1/#comment-3026</link>
		<dc:creator>Johannes Brodwall</dc:creator>
		<pubDate>Thu, 15 Mar 2007 23:50:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.brodwall.com/johannes/blog/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/#comment-3026</guid>
		<description>Hi, Suresh.

I was not aware of this issue. Thanks for the heads-up and the good feedback. I will have to work on how to integrate it into the text, but I have updated the source code in SVN.


~Johannes</description>
		<content:encoded><![CDATA[<p>Hi, Suresh.</p>
<p>I was not aware of this issue. Thanks for the heads-up and the good feedback. I will have to work on how to integrate it into the text, but I have updated the source code in SVN.</p>
<p>~Johannes</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johannes Brodwall</title>
		<link>http://johannesbrodwall.com/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/comment-page-1/#comment-84348</link>
		<dc:creator>Johannes Brodwall</dc:creator>
		<pubDate>Thu, 15 Mar 2007 21:50:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.brodwall.com/johannes/blog/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/#comment-84348</guid>
		<description>Hi, Suresh.&lt;br&gt;&lt;br&gt;I was not aware of this issue. Thanks for the heads-up and the good feedback. I will have to work on how to integrate it into the text, but I have updated the source code in SVN.&lt;br&gt;&lt;br&gt;&lt;br&gt;~Johannes</description>
		<content:encoded><![CDATA[<p>Hi, Suresh.</p>
<p>I was not aware of this issue. Thanks for the heads-up and the good feedback. I will have to work on how to integrate it into the text, but I have updated the source code in SVN.</p>
<p>~Johannes</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: suresh</title>
		<link>http://johannesbrodwall.com/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/comment-page-1/#comment-3017</link>
		<dc:creator>suresh</dc:creator>
		<pubDate>Thu, 15 Mar 2007 06:35:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.brodwall.com/johannes/blog/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/#comment-3017</guid>
		<description>Thanks for the article. I ran into an issue with Jetty classloading when running on a linux platform.

The code which retrieves Springs WebApplicatonContext using the jetty server&#039;s servlet context was failing. Specifically, the following code was throwing a ClassCastException:

            ApplicationContext appctx = WebApplicationContextUtils
                .getRequiredWebApplicationContext(servletContext);

The reason being that the Spring&#039;s application context was loaded by Jetty&#039;s own classloader, hence cannot be used here.

The work around was to set the parentLoaderPriority to true while creating the Jetty server as described here: http://docs.codehaus.org/display/JETTY/Classloading

eg:
        WebAppContext context = new WebAppContext();
        context.setParentLoaderPriority(true);
        context.setContextPath(&quot;/&quot;);
        context.setWar(&quot;path/to/war/or/exploded/war&quot;);
        jettyServer.setHandler(context);

The errors happens didnt happen on a Windows XP box. But while running our CI builds on a Redhat EL4 box, the classcast exception was thrown.

Redhat EL4
JDK 1.5_07-b3
Jetty-6.1.1
Spring-Framework-2.0.2

Hope this might help someone who runs into the same problem.


-- suresh --</description>
		<content:encoded><![CDATA[<p>Thanks for the article. I ran into an issue with Jetty classloading when running on a linux platform.</p>
<p>The code which retrieves Springs WebApplicatonContext using the jetty server&#8217;s servlet context was failing. Specifically, the following code was throwing a ClassCastException:</p>
<p>            ApplicationContext appctx = WebApplicationContextUtils<br />
                .getRequiredWebApplicationContext(servletContext);</p>
<p>The reason being that the Spring&#8217;s application context was loaded by Jetty&#8217;s own classloader, hence cannot be used here.</p>
<p>The work around was to set the parentLoaderPriority to true while creating the Jetty server as described here: <a href="http://docs.codehaus.org/display/JETTY/Classloading" rel="nofollow">http://docs.codehaus.org/display/JETTY/Classloading</a></p>
<p>eg:<br />
        WebAppContext context = new WebAppContext();<br />
        context.setParentLoaderPriority(true);<br />
        context.setContextPath(&#8220;/&#8221;);<br />
        context.setWar(&#8220;path/to/war/or/exploded/war&#8221;);<br />
        jettyServer.setHandler(context);</p>
<p>The errors happens didnt happen on a Windows XP box. But while running our CI builds on a Redhat EL4 box, the classcast exception was thrown.</p>
<p>Redhat EL4<br />
JDK 1.5_07-b3<br />
Jetty-6.1.1<br />
Spring-Framework-2.0.2</p>
<p>Hope this might help someone who runs into the same problem.</p>
<p>&#8211; suresh &#8211;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: suresh</title>
		<link>http://johannesbrodwall.com/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/comment-page-1/#comment-84347</link>
		<dc:creator>suresh</dc:creator>
		<pubDate>Thu, 15 Mar 2007 04:35:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.brodwall.com/johannes/blog/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/#comment-84347</guid>
		<description>Thanks for the article. I ran into an issue with Jetty classloading when running on a linux platform.&lt;br&gt;&lt;br&gt;The code which retrieves Springs WebApplicatonContext using the jetty server&#039;s servlet context was failing. Specifically, the following code was throwing a ClassCastException:&lt;br&gt;&lt;br&gt;            ApplicationContext appctx = WebApplicationContextUtils&lt;br&gt;                .getRequiredWebApplicationContext(servletContext);&lt;br&gt;&lt;br&gt;The reason being that the Spring&#039;s application context was loaded by Jetty&#039;s own classloader, hence cannot be used here.&lt;br&gt;&lt;br&gt;The work around was to set the parentLoaderPriority to true while creating the Jetty server as described here: &lt;a href=&quot;http://docs.codehaus.org/display/JETTY/Classloading&quot;&gt;http://docs.codehaus.org/display/JETTY/Classloa...&lt;/a&gt;&lt;br&gt;&lt;br&gt;eg:&lt;br&gt;        WebAppContext context = new WebAppContext();&lt;br&gt;        context.setParentLoaderPriority(true);&lt;br&gt;        context.setContextPath(&quot;/&quot;);&lt;br&gt;        context.setWar(&quot;path/to/war/or/exploded/war&quot;);&lt;br&gt;        jettyServer.setHandler(context);&lt;br&gt;&lt;br&gt;The errors happens didnt happen on a Windows XP box. But while running our CI builds on a Redhat EL4 box, the classcast exception was thrown.&lt;br&gt;&lt;br&gt;Redhat EL4&lt;br&gt;JDK 1.5_07-b3&lt;br&gt;Jetty-6.1.1&lt;br&gt;Spring-Framework-2.0.2&lt;br&gt;&lt;br&gt;Hope this might help someone who runs into the same problem.&lt;br&gt;&lt;br&gt;&lt;br&gt;-- suresh --</description>
		<content:encoded><![CDATA[<p>Thanks for the article. I ran into an issue with Jetty classloading when running on a linux platform.</p>
<p>The code which retrieves Springs WebApplicatonContext using the jetty server&#39;s servlet context was failing. Specifically, the following code was throwing a ClassCastException:</p>
<p>            ApplicationContext appctx = WebApplicationContextUtils<br />                .getRequiredWebApplicationContext(servletContext);</p>
<p>The reason being that the Spring&#39;s application context was loaded by Jetty&#39;s own classloader, hence cannot be used here.</p>
<p>The work around was to set the parentLoaderPriority to true while creating the Jetty server as described here: <a href="http://docs.codehaus.org/display/JETTY/Classloading"></a><a href="http://docs.codehaus.org/display/JETTY/Classloa.." rel="nofollow">http://docs.codehaus.org/display/JETTY/Classloa..</a>.</p>
<p>eg:<br />        WebAppContext context = new WebAppContext();<br />        context.setParentLoaderPriority(true);<br />        context.setContextPath(&#8220;/&#8221;);<br />        context.setWar(&#8220;path/to/war/or/exploded/war&#8221;);<br />        jettyServer.setHandler(context);</p>
<p>The errors happens didnt happen on a Windows XP box. But while running our CI builds on a Redhat EL4 box, the classcast exception was thrown.</p>
<p>Redhat EL4<br />JDK 1.5_07-b3<br />Jetty-6.1.1<br />Spring-Framework-2.0.2</p>
<p>Hope this might help someone who runs into the same problem.</p>
<p>&#8211; suresh &#8211;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johannes Brodwall</title>
		<link>http://johannesbrodwall.com/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/comment-page-1/#comment-2440</link>
		<dc:creator>Johannes Brodwall</dc:creator>
		<pubDate>Wed, 28 Feb 2007 15:18:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.brodwall.com/johannes/blog/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/#comment-2440</guid>
		<description>Hi, Martin

I am pretty sure it is correct. But make sure that you use the latest version of this article: http://www.brodwall.com/johannes/blog/2007/02/04/updated-article-embedded-web-integration-testing-with-jetty/

The code for this particular bit is here: http://svn.brodwall.com/demo/insanejava/trunk/web-demo/src/test/java/no/brodwall/web/integration/JettyTestServer.java

If you still don&#039;t have any success, feel free to post the problem here, or send me an email.</description>
		<content:encoded><![CDATA[<p>Hi, Martin</p>
<p>I am pretty sure it is correct. But make sure that you use the latest version of this article: <a href="http://www.brodwall.com/johannes/blog/2007/02/04/updated-article-embedded-web-integration-testing-with-jetty/" rel="nofollow">http://www.brodwall.com/johannes/blog/2007/02/04/updated-article-embedded-web-integration-testing-with-jetty/</a></p>
<p>The code for this particular bit is here: <a href="http://svn.brodwall.com/demo/insanejava/trunk/web-demo/src/test/java/no/brodwall/web/integration/JettyTestServer.java" rel="nofollow">http://svn.brodwall.com/demo/insanejava/trunk/web-demo/src/test/java/no/brodwall/web/integration/JettyTestServer.java</a></p>
<p>If you still don&#8217;t have any success, feel free to post the problem here, or send me an email.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Gilday</title>
		<link>http://johannesbrodwall.com/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/comment-page-1/#comment-2439</link>
		<dc:creator>Martin Gilday</dc:creator>
		<pubDate>Wed, 28 Feb 2007 15:01:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.brodwall.com/johannes/blog/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/#comment-2439</guid>
		<description>Thanks for the article,  been very useful in setting up our end to end tests.  
I am however having problems with getting JNID working within Jetty.  Can you confirm the quoted code is correct?</description>
		<content:encoded><![CDATA[<p>Thanks for the article,  been very useful in setting up our end to end tests.<br />
I am however having problems with getting JNID working within Jetty.  Can you confirm the quoted code is correct?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
