Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Tomcat starts okay, but doesn't work
Tomcat starts okay, but doesn't work [message #163308] Wed, 08 March 2006 10:37 Go to next message
Eclipse UserFriend
Originally posted by: larry.stupidtuesday.com

Hi,

I've had a small stand-alone web app working with Tomcat 5.5.9 for quite
some time. I recently migrated my web app to eclipse 3.1.2 with WTP
1.0.1. In other words, everything is up to date on my Windows XP platform.

In Windows > Preferences > Server > Installed Runtimes I added Apache
Tomcat v5.5. Then I opened the "Servers" window and added Tomcat. I can
also add my web app to the recently-installed Tomcat container.

From the "Servers" window I can start and stop Tomcat without error; I
know this because the "Console" window doesn't report any. The Windows
Task Manager reports that "tomcat5w.exe" is indeed running.

The problem is that when I fire up the browser, Tomcat's local home page
(with the picture of the cat, JSP & servlet examples, etc.) doesn't
display. Same goes for my web app - it just tells me the requested
resource is not available. When I stop Tomcat from within eclipse and
start it "the normal way", i.e. as a service outside of eclipse
everything works fine.

I searched emails in this newsgroup and couldn't find anything that
addresses this particular problem. I am obviously doing something wrong.
Can anyone help me?

Thanks,
Larry
Re: Tomcat starts okay, but doesn't work [message #163318 is a reply to message #163308] Wed, 08 March 2006 16:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cebbens.gmail.com

Hi. Try opening the Tomcat configuration within Eclipse (double clicking on the server name located in the Server view), and uncheck "Run modules directly from the workspace (do not modify the Tomcat installation)". This will deploy your webapp directly in your Tomcat installation instead of eclipse's tomcat runtime (Server project under workspace).
I really don't know why it doesn't work with that option checked.
Hope this does the trick.
Bye.
Re: Tomcat starts okay, but doesn't work [message #163326 is a reply to message #163308] Wed, 08 March 2006 16:53 Go to previous messageGo to next message
Eclipse UserFriend
Larry,

I would recommend double-clicking on the Tomcat server in the Servers
view, then click on the "Open launch configuration" link on the
displayed Server configuration page. Finally, select the Arguments tab
of the launch configuration dialog and note the values in the VM
Arguments. By default, catalina.base != catalina.home. This is why the
standard webapps aren't available. You get an "empty" default webapp,
plus any projects you have added to the server.

This way, you can create multiple servers from the same installation
without modifying your Tomcat installation in any way. Also, if you
made sure your ports didn't conflict, you could run your service and do
testing at the same time.

In the Server configuration page, if you uncheck the "Run modules
directory from the workspace (do not modify the Tomcat installation)"
setting, then catalina.base will be set to the same value as
catalina.home and you will be running everything out of your Tomcat
installation. At this point, Eclipse kind of "owns" that Tomcat
installation. The "master" server.xml will be the one in the Servers
project in your Eclipse workspace. You could only run your service or
test from Eclipse, but not both at the same time. However, they would
both run the same configuration, which may be what you want.

There aren't enough clues to say why you webapp gave 404's, other than
to guess there was something wrong with the URL. Note that starting
Tomcat from Eclipse will use javaw.exe, rather than tomcat5w.exe which
is what your Tomcat service uses. I don't know if this is related to
your webapp not working.

Cheers,
Another Larry

P.S. I send this earlier (hours), but it seems to have gotten lost for
the moment. I'm not sure if it will still show up at some point.

Larry Hannay wrote:
> Hi,
>
> I've had a small stand-alone web app working with Tomcat 5.5.9 for quite
> some time. I recently migrated my web app to eclipse 3.1.2 with WTP
> 1.0.1. In other words, everything is up to date on my Windows XP platform.
>
> In Windows > Preferences > Server > Installed Runtimes I added Apache
> Tomcat v5.5. Then I opened the "Servers" window and added Tomcat. I can
> also add my web app to the recently-installed Tomcat container.
>
> From the "Servers" window I can start and stop Tomcat without error; I
> know this because the "Console" window doesn't report any. The Windows
> Task Manager reports that "tomcat5w.exe" is indeed running.
>
> The problem is that when I fire up the browser, Tomcat's local home page
> (with the picture of the cat, JSP & servlet examples, etc.) doesn't
> display. Same goes for my web app - it just tells me the requested
> resource is not available. When I stop Tomcat from within eclipse and
> start it "the normal way", i.e. as a service outside of eclipse
> everything works fine.
>
> I searched emails in this newsgroup and couldn't find anything that
> addresses this particular problem. I am obviously doing something wrong.
> Can anyone help me?
>
> Thanks,
> Larry
Re: Tomcat starts okay, but doesn't work [message #163491 is a reply to message #163326] Thu, 09 March 2006 15:14 Go to previous message
Eclipse UserFriend
Originally posted by: larry.stupidtuesday.com

Larry,

First off, thanks to you and Cristian for your answers. Your suggestions
(which were identical) solved the problem.

I'd like to supply a caveat for those who might have the same problem,
in case they search through these emails like I originally did.

As described in your email below, I got eclipse to "own" the Tomcat
installation. You said the "master" server.xml would be the one in the
eclipse workspace. That did indeed happen, along with something
unexpected...

I thought the eclipse>server.xml would simply be used instead of the
tomcat>server.xml. It was, but in doing so it blew away the original
tomcat>server.xml - which happened to contain the <Context...> entry for
my existing webapp! And since (like a jerk) I hadn't backed up the
tomcat>server.xml I had to figure out the context and database resource
settings all over again.

Hope this warning will save some people some time.

Thanks again for your help,
Larry




Larry Isaacs wrote:
> Larry,
>
> I would recommend double-clicking on the Tomcat server in the Servers
> view, then click on the "Open launch configuration" link on the
> displayed Server configuration page. Finally, select the Arguments tab
> of the launch configuration dialog and note the values in the VM
> Arguments. By default, catalina.base != catalina.home. This is why the
> standard webapps aren't available. You get an "empty" default webapp,
> plus any projects you have added to the server.
>
> This way, you can create multiple servers from the same installation
> without modifying your Tomcat installation in any way. Also, if you
> made sure your ports didn't conflict, you could run your service and do
> testing at the same time.
>
> In the Server configuration page, if you uncheck the "Run modules
> directory from the workspace (do not modify the Tomcat installation)"
> setting, then catalina.base will be set to the same value as
> catalina.home and you will be running everything out of your Tomcat
> installation. At this point, Eclipse kind of "owns" that Tomcat
> installation. The "master" server.xml will be the one in the Servers
> project in your Eclipse workspace. You could only run your service or
> test from Eclipse, but not both at the same time. However, they would
> both run the same configuration, which may be what you want.
>
> There aren't enough clues to say why you webapp gave 404's, other than
> to guess there was something wrong with the URL. Note that starting
> Tomcat from Eclipse will use javaw.exe, rather than tomcat5w.exe which
> is what your Tomcat service uses. I don't know if this is related to
> your webapp not working.
>
> Cheers,
> Another Larry
>
> P.S. I send this earlier (hours), but it seems to have gotten lost for
> the moment. I'm not sure if it will still show up at some point.
>
Larry,

I would recommend double-clicking on the Tomcat server in the Servers
view, then click on the "Open launch configuration" link on the
displayed Server configuration page. Finally, select the Arguments tab
of the launch configuration dialog and note the values in the VM
Arguments. By default, catalina.base != catalina.home. This is why the
standard webapps aren't available. You get an "empty" default webapp,
plus any projects you have added to the server.

This way, you can create multiple servers from the same installation
without modifying your Tomcat installation in any way. Also, if you
made sure your ports didn't conflict, you could run your service and do
testing at the same time.

In the Server configuration page, if you uncheck the "Run modules
directory from the workspace (do not modify the Tomcat installation)"
setting, then catalina.base will be set to the same value as
catalina.home and you will be running everything out of your Tomcat
installation. At this point, Eclipse kind of "owns" that Tomcat
installation. The "master" server.xml will be the one in the Servers
project in your Eclipse workspace. You could only run your service or
test from Eclipse, but not both at the same time. However, they would
both run the same configuration, which may be what you want.

There aren't enough clues to say why you webapp gave 404's, other than
to guess there was something wrong with the URL. Note that starting
Tomcat from Eclipse will use javaw.exe, rather than tomcat5w.exe which
is what your Tomcat service uses. I don't know if this is related to
your webapp not working.

Cheers,
Another Larry

> Larry Hannay wrote:
>
>> Hi,
>>
>> I've had a small stand-alone web app working with Tomcat 5.5.9 for
>> quite some time. I recently migrated my web app to eclipse 3.1.2 with
>> WTP 1.0.1. In other words, everything is up to date on my Windows XP
>> platform.
>>
>> In Windows > Preferences > Server > Installed Runtimes I added Apache
>> Tomcat v5.5. Then I opened the "Servers" window and added Tomcat. I
>> can also add my web app to the recently-installed Tomcat container.
>>
>> From the "Servers" window I can start and stop Tomcat without error;
>> I know this because the "Console" window doesn't report any. The
>> Windows Task Manager reports that "tomcat5w.exe" is indeed running.
>>
>> The problem is that when I fire up the browser, Tomcat's local home
>> page (with the picture of the cat, JSP & servlet examples, etc.)
>> doesn't display. Same goes for my web app - it just tells me the
>> requested resource is not available. When I stop Tomcat from within
>> eclipse and start it "the normal way", i.e. as a service outside of
>> eclipse everything works fine.
>>
>> I searched emails in this newsgroup and couldn't find anything that
>> addresses this particular problem. I am obviously doing something
>> wrong. Can anyone help me?
>>
>> Thanks,
>> Larry
Previous Topic:eclipse corrupted after installing 1.5M5!
Next Topic:Shared classes across webapps when running Tomcat from Eclipse
Goto Forum:
  


Current Time: Wed Mar 19 03:17:33 EDT 2025

Powered by FUDForum. Page generated in 0.04232 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top