tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Brock <catc...@gmail.com>
Subject Re: Changing embedded Tomcat from v6 to v7 causes InitialContext lookup to fail
Date Wed, 04 May 2011 08:19:20 GMT
Ah, that was it - thanks.

Andrew


On 3 May 2011 21:57, Andrew Brock <catchwa@gmail.com> wrote:
> ---------- Forwarded message ----------
> From: Mark Thomas <markt@apache.org>
> Date: 3 May 2011 21:51
> Subject: Re: Changing embedded Tomcat from v6 to v7 causes
> InitialContext lookup to fail
> To: Tomcat Users List <users@tomcat.apache.org>
>
>
> On 03/05/2011 12:54, Andrew Brock wrote:
>> (Note: this question is also on StackExchange at
>> http://stackoverflow.com/questions/5866237/)
>>
>> I'm using JUnit test cases to exercise my web service using embedded
>> Tomcat. Under Tomcat 6 everything was working fine, but when I
>> switched my project to Tomcat 7 I'm coming unstuck.
>>
>> I've changed my code to use the new org.apache.catalina.startup.Tomcat
>> class (available in Tomcat 7) as follows:
>>
>> ******
>>
>> Tomcat tomcat = new Tomcat();
>> tomcat.setBaseDir("C:\\Program Files\\Apache Software
>> Foundation\\Tomcat 7.0.11");
>> tomcat.setPort(1234);
>> tomcat.addWebApp("/DecoderServiceTest",
>> System.getProperty("user.dir")+"/build/web");
>> tomcat.setHostname("localhost");
>> tomcat.start();
>
> Add the following before you start the instance:
>
> tomcat.enableNaming()
>
> Mark
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message