[fedora-java] F9/10: Eclipse & Tomcat 6

Daniel B. Thurman dant at cdkkt.com
Tue Jun 23 19:32:57 UTC 2009


I am having a bit of trouble with Eclipse & Tomcat 6...

Initially, I could not get tomcat6 (provided via Fedora), to run
because it was complaining that it could not find the servlet/jsp
jars. so I fixed this by manually adding links in /usr/share/tomcat6/lib:
1) jsp-api.jar
2) servlet-api.jar

and modifying file:
3) /etc/tomcat6/tomcat-users.xml
<tomcat-users>
  <role rolename="tomcat"/>
  <role rolename="manager"/>
  <role rolename="admin"/>
  <user username="tomcat"    password="foobar" roles="tomcat"/>
  <user username="manager"  password="foobar" roles="manager"/>
  <user username="admin"      password="foobar" roles="admin"/>

  <!-- Original
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <role rolename="manager"/>
  <role rolename="admin"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="role1"  password="tomcat" roles="role1"/>
  <user username="both"   password="tomcat" roles="tomcat,role1"/>
  -->

<!-- The host manager webapp is restricted to users with role "admin" -->
<!--<user name="tomcat" password="password" roles="admin" />-->
<!-- The manager webapp is restricted to users with role "manager" -->
<!--<user name="tomcat" password="password" roles="manager" />-->
</tomcat-users>

I then tested to see if tomcat6 would run standalone, by:
4) service tomcat6 start

5) Opened Firefox, and URL: http:localhost:8080
    Entered User: manager, password: foobar

And tomcat displayed its colorful page.  I was able to view
the status information and navigate everywhere except for
the following links, as they show blank pages:

Servlets Examples
JSP Examples

Not sure if this is a problem but I proceeded to:

6) service tomcat stop

Then I started up Eclipse, created a new Dynamic-Web
application, added a new file: index.html, added very
simple html code:

<html><title>Hello</title><body><p>Hello World</p></body></html>

saved it, and then ran 'Run As...' server, added tomcat6 server, committed
the configurations, and the internal browser fired up.

Unfortunately, I get this:

URL: http://localhost:8080/Hello/
===========================================
HTTP Status 404 - /Hello/
type Status report
message /Hello/

description The requested resource (/Hello/) is not available.
Apache Tomcat/6.0.18
===========================================

I then changed the URL to: http://localhost:8080/
and I get the same 404 error but with / instead of /Hello/

Am I missing something?

[FYI:
  I did go over the documentation, searched the Internet
  for help, but was not getting anywhere, hence this post.
]

Thanks-
Dan




More information about the fedora-devel-java-list mailing list