Solved

Tomcat embedded in Eclipse for EE Developers

Posted on 2009-05-06
2
617 Views
Last Modified: 2013-12-15
I just installed Eclipse IDE for EE developers. Of course it had support for Apache Tomcat server but the Tomcat itself had to be installed to make that "support in Eclipse" point to the installation folder of Aapache Tomcat. Piece of cake.

I made a servlet that   just displayed a line in the web browser available in Eclipse IDE for EE. I then tried to run that same servlet by opening up a browser in IE7 using http://localhost/p1/tyagi  where p1 is the name of my application and tyagi is the word that my servlet s1 maps to in web.xml.

It ran fine. Remember there is only 1 instance of Tomcat running from inside  Eclipse. All fine.

I then stopped the embedded server running in Eclipse IDE and started the Tomcat manually from installation directory. It started well but refused to display the servlet quoting a 500 error.

Why? Is it because without the support of Eclipse IDE, the barebones Tomcat is unable to function from command prompt as would a full fledged stand alone Tomcat server?

I tried something else but the results were not hard to understand. I started Tomcat both from command prompt and Eclipse and when I tried to run it, Eclipse would tell me the ports including 80 are occupied which is fine. My question is the paragraph before the current.


Also, please take a look at snapshots:

1).working_fine1.jpg: embedded tomcat running and I ran servlet inside browser in Eclipse

2).working_fine2.jpg:  embedded tomcat running and I ran the servlet in IE 7 outside Eclipse

3).problem_tomcat_eclipse.JPG: started tomcat from command prompt and then tried to start it from Eclipse IDE

4).servlet mapping_mapping.jpg:  servlet mapping in web.xml

For those who think I wrote too much here is the gist: why does embedded tomcat allow me to run my application from IE7 and that too only if started from inside Eclipse? Why shutting down Eclipse, starting Tomcat at command prompt would not allow me to run the same application in IE7 giving me a 500:Internal Server Error ?


Thanks in advance.
There is no real code in my servlet and not pertinent.

Open in new window

working--fine1.JPG
working-fine2.JPG
problem-tomcat-eclipse.JPG
errormsg-multiple-tomcat-instanc.jpg
servlet-mapping.JPG
0
Comment
Question by:perfect_tranquility
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:perfect_tranquility
ID: 24319028
my apologies,

when I switch off Eclipse Tomcat server but start the same Tomcat manually from command line, I dont get a 500 error. I get a 404 error. Attached is the snapshot: error_404.jpg

Thanks
error-404.JPG
0
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 24320886
have you deployed your webapp to (standalone) tomcat ?

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question