• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 244
  • Last Modified:

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
0
Fernando44
Asked:
Fernando44
  • 11
  • 9
  • 3
  • +1
6 Solutions
 
rrzCommented:
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%>    
0
 
rrzCommented:
I meant simple like
<%="hello from cal1.jsp"%>
0
 
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
can you give the link of your previous question?

Thank You.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Fernando44Author Commented:
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
0
 
Fernando44Author Commented:
0
 
Fernando44Author Commented:
Hi shivaspk

the link to the previous question is really:
http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_21824815.html

Sorry

Fernando
0
 
rrzCommented:
>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
0
 
Fernando44Author Commented:
Hi rrz

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

I will try the Tomcat Manger.

Thanks

Fernnado
0
 
Fernando44Author Commented:
Hi rrz

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

Ye Gods!

Fernando
0
 
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
*.hbm.xml  does not clas with TomCat don't worry about that.

<Connector className="org.apache.catalina.connector.http.HttpConnector"
  port="8080"
  minProcessors="5"
  maxProcessors="75"
  enableLookups="true"
  redirectPort="8443"
  acceptCount="10"
  debug="0"
  connectionTimeout="60000"/>

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

if you have surely set the port to 9080 the it will be like

port="9080" instead of port="8080"

and more on

is this your problem???

>>I have done it and the newly created file in examples (URL: http://localhost:9080/examples/fdn.jsp) works fine.

>>However the default webapps url generates hte same 404 serror (URL: http://localhost:9080/fdn.jsp)

Just check where exactly is the fdn.jsp if it is there in WEBAPPS folder directly the the second URL will work else if it s there in examples folder inside WebApps directory then the 1st URL is correct.

Thank You.

0
 
rrzCommented:
>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
0
 
rrzCommented:
>I have created a simple web app with the fdn.jsp file and it works fine.
Good
0
 
Fernando44Author Commented:
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
0
 
Fernando44Author Commented:
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
0
 
Fernando44Author Commented:
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
0
 
fargoCommented:
ok. For servlets and jsp, have the following tutorial as your reference
http://pdf.coreservlets.com/

Here is also a good tomcat configuration and installation guide
http://www.coreservlets.com/Apache-Tomcat-Tutorial/

Here is the basic tutorial for Hibernate (i too don't use Hibernate at the moment, but kept this link for later use)
http://www.developer.com/java/other/article.php/3559931

BTW, why do u use tomcat 4.x version and not tomcat 5.x or 5.5.x ??

0
 
Fernando44Author Commented:
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
0
 
Fernando44Author Commented:
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:
http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_21826578.html

Cheers

Fernando
0
 
rrzCommented:
For a start, look in  <yourTomcatHome>/common/lib   and take out from your web app's lib any jars that are the same package.  
Are we still dealing with the same original error message ?
0
 
rrzCommented:
What version of java are you using ?
0
 
fargoCommented:
first of all, all the xdoclet, jboss jars should be removed. (what is jboss jars doing if u are deploying the app in tomcat??) The problem definitely deals with xdoclet(i read somewhere..but don't remember where..)
0
 
fargoCommented:
ok. found it...the following link may be of help
http://www.mail-archive.com/xdoclet-user@lists.sourceforge.net/msg08148.html
0
 
rrzCommented:
>What version of java are you using ?
Oh I see in your first question, 1.5.

Why didn't you tell us about all these other complications from the start ? From your original question, I thought you were a newbie.    rrz
0
 
rrzCommented:
I agree with fargo, you should bump up to Tomcat 5.5.  It will only take a few minutes.
0
 
Fernando44Author Commented:
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
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

  • 11
  • 9
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now