Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / October 2004

Tip: Looking for answers? Try searching our database.

my tomcat is dead..

Thread view: 
Frances Del Rio - 30 Oct 2004 14:36 GMT
my tomcat is broken now, as of last night, I turn it on & when I go to
main page in browser (localhost) text is there but imgs are missing (but
imgs ARE there, I can see them in ROOT dir..) and whatever I try to run
I get a 404..  when I try to get to JSP or servlet examples that came
w/tomcat simply get a blank page..  when I'm turning on tomcat in DOS
shell (or is it tomcat shell?) one of the things I see that I think is
weird is this:

INFO: Missing application web.xml, using defaults only
StandardEngine[Catalina]
StandardHost[localhost].StandardContext[/cc]
Oct 30, 2004 9:25:53 AM org.apache.catalina.core.StandardHostDeployer
install

'Missing application web.xml'?  I don't understand, it's there,
everything still there where it should be..  would appreciate any
suggestions.. tomcat is truly driving me up the wall.. (version 5.0.27)
thank you very much..  Frances
Juha Laiho - 31 Oct 2004 22:09 GMT
Frances Del Rio <fdr58@yahoo.com> said:
>my tomcat is broken now, as of last night
...
>INFO: Missing application web.xml, using defaults only

'application web.xml' would mean WEB-INF/web.xml for a single
application -- and I think you mentioned removing web.xml in
another of your posts (where you wondered about the path to
invoke a servlet). So, could that still be missing?

>StandardHost[localhost].StandardContext[/cc]

And this might mean (no, Tomcat error messages definitely are not the
top in readability) that the WEB-INF/web.xml is missing from an
application whose application base directory is named 'cc'.

>'Missing application web.xml'?  I don't understand, it's there,
>everything still there where it should be..

The other possibility might be that the application web.xml is not
completely valid (f.ex. elements not in correct order); I seem to
recall spending quite some time resolving an issue with an application
web.xml file just to find out that the order of different elements
within the file is critical. Also, I seem to recall having seen a case
where Tomcat just wouldn't load an application that didn't have the
application web.xml file.

Here's a very minimal web.xml file:
-----
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
   PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
   "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
 <display-name>Welcome to Tomcat</display-name>
 <description>
    Welcome to Tomcat
 </description>
</web-app>
-----

No servlet mappings, no nothing. But this is enough to allow running
JSP pages and serving static resources (HTML, images). For servlets,
add the appropriate mappings:
-----
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
   PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
   "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
 <display-name>Welcome to Tomcat</display-name>
 <description>
    Welcome to Tomcat
 </description>
 <servlet>
   <servlet-name>JustANameForTheseMappings</servlet-name>
   <servlet-class>package.Class</servlet-class>
 </servlet>
 <servlet-mapping>
   <servlet-name>JustANameForTheseMappings</servlet-name>
   <url-pattern>/serv/let/url</url-pattern>
 </servlet-mapping>
</web-app>
-----

Note on the above: If you have multiple servlet classes in a single
application, you must first write _all_ the <servlet> -elements, and
only after all the <servlet> -elements, write the corresponding
<servlet-mapping> -elements. You cannot interleave the two. Also, if
you have any other elements than those listed above, find out the
correct place for them.
Signature

Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
        PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.