Link to home
Start Free TrialLog in
Avatar of Fernando44
Fernando44

asked on

Tomcat4 404 error:web.xml error

Hi rrz

I have opened a new question for the query with you.

Have reverted to default server.xml and yes it is Tomcat4.  I am still getting the same errors

Fernando
Avatar of rrz
rrz
Flag of United States of America image

I can't see the problem yet.  The only doubt I have is with  your port. Did you alter server.xml? Did you try the default 8080 ?
http://localhost:8080/peacBudget/cal1.jsp   

Is your JSP just simple file ?  like  

<%=hello from cal1.jsp%>    
I meant simple like
<%="hello from cal1.jsp"%>
can you give the link of your previous question?

Thank You.
Avatar of Fernando44
Fernando44

ASKER

Hi rrz

The fdn.jsp file is:
<%@ page import="java.util.*"%>
 <%= new Date()%>
As I said, it works fine on default Tomcat.

The only different thing I can think of is that I am using Hibernate and the
webapps/peacBudget/WEB-INF/classes directory contains all the *.hbm.xml mapping files
required by Hibernate.

Could this be clashing with Tomcat?

Fernando
>Could this be clashing with Tomcat?
Yes, it could explain the errors you are getting, but I have no experience with Hiberate.
Did you try making a simple web app ?
Did you get Tomcat's manager working ? It is helpful.  
http://tomcat.apache.org/tomcat-4.1-doc/manager-howto.html   
It is easy to get mangager to work for you just add  something like this
<user name="fernando" password="secret" roles="manager" />  
to  $CATALINA_HOME/conf/tomcat-users.xml
Hi rrz

I have deleted the .hbm.xml files but still get the 404 error message.

I will try the Tomcat Manger.

Thanks

Fernnado
Hi rrz

I have created a simple web app with the fdn.jsp file and it works fine.

Ye Gods!

Fernando
SOLUTION
Avatar of Siva Prasanna Kumar
Siva Prasanna Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>but still get the 404 error message.
There must be a basic error somewhere.  Please describe every step you have taken to make a simple web app. Give us your file structure, the url you are using in your browser, your environmental variables  and anything else you can think of.  Maybe someone will have an idea.      rrz
>I have created a simple web app with the fdn.jsp file and it works fine.
Good
Hi shivaspk

>just check if the above content is present in server.xml

I have hte following 2 connectors (straight from the Tomcat distribution):

<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8081 -->
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               port="9080"
               minProcessors="5" maxProcessors="75"
               enableLookups="true" redirectPort="9443"
               acceptCount="100" debug="0" connectionTimeout="20000"
               useURIValidationHack="false" disableUploadTimeout="true" />

<!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               port="9009" minProcessors="5" maxProcessors="75"
               enableLookups="true" redirectPort="8443"
               acceptCount="10" debug="0" connectionTimeout="20000"
               useURIValidationHack="false"
               protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>

Fernando
Hi shivaspk

>is this your problem???

I had the fdn.jsp file incorrectly in the webapps folder - once I moved it to the webapps /ROOT folder it worked OK.
This proved that the default Tomcat was working OK but that my peacBudget webapp was still faulty.

Thanks

Fernando
Hi rrz

>There must be a basic error somewhere

You are right. At least you guys have helped focus me on the "correct?" problem area.

I am going to build my webapp tonight step by step and I will come back to you guys tomorrow.

Cheers

Fernando
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi all

I have found what was breaking Tomcat: some jar file in the webapp lib folder.


.jar files in  C:\Tomcat4\webapps\peacBudget\WEB-INF\lib folder:

ant-1.6.5.jar
ant-antlr-1.6.5.jar
ant-junit-1.6.5.jar
ant-launcher-1.6.5.jar
antlr.license.txt
antlr-2.7.6rc1.jar
ant-swing-1.6.5.jar
apache.license.txt
apache.license-2.0.txt
asm.jar
asm-attrs.jar
c3p0.license.txt
c3p0-0.9.0.jar
cglib-2.1.3.jar
checkstyle-all.jar
cleanimports.jar
commons-collections-2.0.jar
commons-collections-2.1.1.jar
commons-logging.jar
commons-logging-1.0.4.jar
concurrent-1.3.2.jar
connector.jar
connector.licence.txt
dom4j-1.6.1.jar
ehcache-1.1.jar
ejb3-persistence.jar
hibernate3.jar
hibernate-annotations.jar
hsqldb.jar
jaas.jar
jaas.licence.txt
jacc-1_0-fr.jar
javassist.jar
jaxen-1.1-beta-7.jar
jboss-cache.jar
jboss-common.jar
jboss-jmx.jar
jboss-system.jar
jdbc2_0-stdext.jar
jdbc2_0-stdext.licence.txt
jgroups-2.2.7.jar
jgroups-2.2.8.jar
jta.jar
jta.licence.txt
junit-3.8.1.jar
log4j.jar
log4j-1.2.11.jar
lucene-1.4.3.jar
maven-xdoclet-plugin-1.2.jar
oscache-2.1.jar
proxool-0.8.3.jar
swarmcache-1.0rc2.jar
syndiag2.jar
version.properties
versioncheck.jar
xdoclet-1.2.jar
xdoclet-apache-module-1.2.jar
xdoclet-base-locale-1.2.jar
xdoclet-bea-module-1.2.jar
xdoclet-borland-module-1.2.jar
xdoclet-caucho-module-1.2.jar
xdoclet-de-locale-1.2.jar
xdoclet-ejb-module-1.2.jar
xdoclet-exolab-module-1.2.jar
xdoclet-fr_FR-locale-1.2.jar
xdoclet-hibernate-module-1.2.jar
xdoclet-hp-module-1.2.jar
xdoclet-ibm-module-1.2.jar
xdoclet-java-module-1.2.jar
xdoclet-jboss-module-1.2.jar
xdoclet-jdo-module-1.2.jar
xdoclet-jmx-module-1.2.jar
xdoclet-libelis-module-1.2.jar
xdoclet-macromedia-module-1.2.jar
xdoclet-mockobjects-module-1.2.jar
xdoclet-mvcsoft-module-1.2.jar
xdoclet-mx4j-module-1.2.jar
xdoclet-objectweb-module-1.2.jar
xdoclet-oracle-module-1.2.jar
xdoclet-orion-module-1.2.jar
xdoclet-portlet-module-1.2.jar
xdoclet-pramati-module-1.2.jar
xdoclet-pt_BR-locale-1.2.jar
xdoclet-solarmetric-module-1.2.jar
xdoclet-sun-module-1.2.jar
xdoclet-sybase-module-1.2.jar
xdoclet-tjdo-module-1.2.jar
xdoclet-web-module-1.2.jar
xdoclet-webwork-module-1.2.jar
xdoclet-xdoclet-module-1.2.jar
xerces-2.6.2.jar
xjavadoc-1.0.2.jar
xml-apis.jar


I anybody knows offhand (before I have to painstakingly go one by one)
please let me know.

Fernando
Hi Fargo

>ok. For servlets and jsp, have the following tutorial as your reference
Thanks for the references.

>BTW, why do u use tomcat 4.x version and not tomcat 5.x or 5.5.x ??
I started on Tomcat4 and over one weekend had some problems getting 5.5 going so I have stuck with 4.
I think you are right though: I will set aside an afternoon (hopefully enough time!) to get myself going on 5.5.

Thanks again but if you're up to it I have hit a basic java problem that I am sure you can help me on at:
https://www.experts-exchange.com/questions/21826578/NoClassDefFoundError-in-IDE-and-Tomcat.html

Cheers

Fernando
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What version of java are you using ?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I agree with fargo, you should bump up to Tomcat 5.5.  It will only take a few minutes.
Hi rrz

>For a start, look in  <yourTomcatHome>/common/lib   and take out from your web app's lib
Thanks, that makes sense and yes this is still the same Tomcat error

>Why didn't you tell us about all these other complications from the start ?
Its a bit like the guy who goes to the doctor saying he cant breathe but doesn't say anything about the knife in his ribs.
And yes I am a newbie: this is my first app using Tomcat and I am losing much sleep over it.


Hi fargo

>first of all, all the xdoclet, jboss jars should be removed. (what is jboss jars doing if u
Thanks for the xDoclet link - I initially intended using xDoclet to generate hibernate mappings but changed my mind.
Heavens knows how jBoss crept in.
I will continue to eliminate more jars but thanks for the jump start.

Thanks guys

Fernando