Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

my tomcat is dead..
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


Report this thread to moderator Post Follow-up to this message
Old Post
Frances Del Rio
10-30-04 08:57 PM


Re: my tomcat is dead..
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.
--
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)

Report this thread to moderator Post Follow-up to this message
Old Post
Juha Laiho
11-01-04 01:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Help archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:21 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.