This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes Unable to show Tomcat 7 start page in browser of Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Unable to show Tomcat 7 start page in browser of Eclipse" Watch "Unable to show Tomcat 7 start page in browser of Eclipse" New topic
Author

Unable to show Tomcat 7 start page in browser of Eclipse

Wolfgang Tintemann
Ranch Hand

Joined: Sep 11, 2010
Posts: 65

Here my beginner's problem which puzzles me a bit :

I installed a servlet in Eclipse and can successfully run it with Run As on Server.

But when I try to enter localhost:8080 in the address field of the opened browser
the expected start page of Tomcat 7 doesn't show up. Why ?
I also can't start the manager page of Tomcat from within Eclipse.

I am generally confused about what is different when I start Tomcat 7 under Eclipse and
when I start it via the bin/startup.bat script in the Tomcat directory.
When I start Tomcat via the startup.bat all works fine - start page and manager page showing up.


Time isn't Money, Money is Time.
The man who works looses his time ( spanish proverb )
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15962
    
  19

If you're using the WTP plugin for Eclipse to run Tomcat, WTP copies selected config files into a private directory in your workspace and uses them. And IT decides what config files get selected.

Which is why I prefer the sysdeo Tomcat plugin. You don't get it pre-bundled with the J2EE Eclipse download, but sysdeo uses the ORIGINAL Tomcat config files, exactly the same way that running Tomcat stand-alone does.


Customer surveys are for companies who didn't pay proper attention to begin with.
Wolfgang Tintemann
Ranch Hand

Joined: Sep 11, 2010
Posts: 65

Thank you very much for your hint.

I installed the plugin and now I have some Tomcat icons in the toolbar and a Tomcat tab.
So : something happened at least and it seemed to be successful.

I can select the "start Tomcat" icon and on the console the server starts up successfully.
But I noticed that on the Servers tab there was an old entry which told me that this Tomcat
server was still in stopped mode. So I was confused. I simply deleted the server on the
Servers tab.

Now when I start Tomcat and then Run my servlet "on Server" I get an error message telling me
that there is a server already running and listening on port 8080.
When I don't start Tomcat and run the servlet then the server starts automatically and the servlet
works fine.

But when I enter localhost:8080/manager I still get :

HTTP Status 404 - /manager
--------------------------------------------------------------------------------
type Status report
message /manager
description The requested resource (/manager) is not available.
--------------------------------------------------------------------------------
Apache Tomcat/7.0.11

Is this WTP plugin still active and has somehow to be deleted ?
Hauke Ingmar Schmidt
Rancher

Joined: Nov 18, 2008
Posts: 433
    
    2
After creating a Tomcat server with WTP you can configure it to NOT take over control over Tomcat (i.e. using the original config). Just doubleclick the server in the Servers view for this property to set. May be easier than integrating other plugins (the JBoss tools offer server controls, too).

If you want to know if WTP runs a server look at the server window. It displays the state there. If you don't use it, delete the server config there.

(Or use Maven & jetty:run.)
Wolfgang Tintemann
Ranch Hand

Joined: Sep 11, 2010
Posts: 65

Hauke Ingmar Schmidt wrote:After creating a Tomcat server with WTP you can configure it to NOT take over control over Tomcat (i.e. using the original config). Just doubleclick the server in the Servers view for this property to set. May be easier than integrating other plugins (the JBoss tools offer server controls, too).


Sorry, I am a beginner !
If I double-click the server a page opens named OVERVIEW. What I find here is a CONFIGURATION PATH which can be modified.
Did you talk about this ?

If you want to know if WTP runs a server look at the server window. It displays the state there. If you don't use it, delete the server config there.
(Or use Maven & jetty:run.)


Where is the "server Window" ? Where do I find it ?
Do you mean the console output on server startup or the "Servers tab" ? On the Servers tab is only the server and my servlet shown.
I don't find the information whether WTP is running... :confused:
Hauke Ingmar Schmidt
Rancher

Joined: Nov 18, 2008
Posts: 433
    
    2
Wolfgang Tintemann wrote:
Sorry, I am a beginner !
If I double-click the server a page opens named OVERVIEW. What I find here is a CONFIGURATION PATH which can be modified.
Did you talk about this ?


Right. And within the same configuration block, above the server path are the three radioboxes that control how Eclipse plays together with Tomcat.


Where is the "server Window" ? Where do I find it ?
Do you mean the console output on server startup or the "Servers tab" ? On the Servers tab is only the server and my servlet shown.
I don't find the information whether WTP is running... :confused:


I am sorry, I used different words for this view within a few sentences. I was talking about the "Server view" (Menu Window, Show View, [Other..., Server if you are in Java perspective, directly accessible in J2EE perspective], Servers). Right after the server name in the tree view the status will be shown ([Started], [Stopped], [Starting]...), the control icons in the upper right will look accordingly.

It is the server's status you are looking for, not WTP's. WTP as plugin is running quasi all the time; it is activated when your project has the facet "Dynamic Web Project". But you should still be able to control the server without removing this facet, i.e. without "turning off" WTP. I would not advise it. But it is possible; after all it's just a bunch of Java and XML files, it is just a little more convenient.
 
 
subject: Unable to show Tomcat 7 start page in browser of Eclipse
 
Similar Threads
-security option on tomcat 5 when run as service
why my tomcat disappears
JBuilder 6 - Problem with running HelloWorld example
Unable to launch Tomcat from eclipse
tomcat5, server not found