• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Eclipse managed Tomcat versus startup.bat  RSS feed

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks. Today I want to learn why when Eclipse starts up my webapp, I can't use the Tomcat Server admin page.

Using startup.bat
localhost:8080/
renders the admin page

But if I use "Run As" in Eclipse, it handles the config I understand but now I can't access my other apps that are in the Tomcat Server directory.

Eclipse is pointed to the Tomcat Server directory, not a custom one!

Thanks and hope I can contribute my knowledge here in return soon.
 
Marshal
Posts: 61766
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

That question is too scary for those “beginning”, so I shall move you to a different forum.

Please tell us what the directory structure you have Eclipse in is, and where the other folders are. Are you using a Windows® box or a Unix‑like system?
 
Chris Spencer
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Campbell Ritchie and thank you for the welcome. I guess I have a few things to learn about the forum!

I'm using Windows 10 atm

Eclipse exe
Drive2: Desktop\eclipse\eclipse.exe

Workspace and Project
Drive 2: Desktop\eclipse JEE\advwebCourse\Cookies

Tomcat
Drive 4: server\Tomcat 9.0

The Tomcat admin site
server\Tomcat 9.0\webapps\ROOT

My Project site
Desktop\eclipse JEE\advwebCourse\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Cookies


FEWF. So I used  
to find the actual path of this stuff but holy cow....

Anyway, I guess this raises more questions than answers
 
Rancher
Posts: 3757
40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you set Eclipse up to use that Tomcat deployment?

Can you see the deployed application in the webapps directory?

It looks to me like Eclipse is using its built in Tomcat.
 
Chris Spencer
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes actually my standard procedure is:

My Target Runtime is always set to this:


If We look at setting "New Runtime" you'll see it defaults to the only Tomcat directory available, the one I always use:



I went to the server view and noticed it says "metadata"


...so I switched locations




and my app still says its hosted from:
Desktop\eclipse JEE\advwebCourse\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps

NOTE its now tmp2 instead of tmp0. That's the only change.


So I guess its not deploying to my server/Tomcat 9.0/webapps or whatever with the rest of them which I guess explains it...



 
Bartender
Posts: 19993
95
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are actually several different ways to run Tomcat under Eclipse.

Probably the most powerful but least common is to simply launch a stand-alone Tomcat with the debugger enabled and attach from Eclipse as a Remote Debugging project. That's basically what a startup.bat launch would be.

More often, Tomcat is launched internally from Tomcat using an Eclipse plugin.

I know offhand of 2 different plugins. One is the one that comes with the JEE spin of Eclipseand it's absolutely horrible. The other is a third-party plugin originally from sysdeo, more recently renamed to mongrel and I'm not sure what it is now, since people aren't presently paying me for my Tomcat expertise.

The reason I despise the JEE spin's webapp server manager (WTP) is that it constructs a mangled Tomcat environment. It copies over some, but not all of the Tomcat runtime configuration into its own opaque internal storage, which then, in addition to being incomplete, has been prone to go stale and require extra work to update.

The reason why I prefer the sysdeo/mongrel plugin is that it uses the original Tomcat configuration and environment, so it doesn't lose any of the various add-ons that some of my more complex webapps have required.
 
Chris Spencer
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sweet post. Ill try both mongrel and this debug project method you've mentioned! Thanks a lot
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!