This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes 404 Error while trying to run my application in Tomcat 1.6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "404 Error while trying to run my application in Tomcat 1.6 " Watch "404 Error while trying to run my application in Tomcat 1.6 " New topic
Author

404 Error while trying to run my application in Tomcat 1.6

Hareendranath Babu Kotha
Ranch Hand

Joined: May 22, 2006
Posts: 40
Hi Everybody,

I am a new bee to Java Web applications. I am using Java 1.6 and Tomcate 1.6 to run one small example to start with .I am facing a problem while trying to run my application . This is the directory i am following "C:\Program Files\Tomcat 6.0\webapps\Testing"

Testing Folder contains WEB-INF folder and this WEB-INF contains web.xml and classes folder. I am able to see Tomcat home Page successfully ,and my application name is being listed with the lsit of default example applications. when i tried clicking on "Testing" . I am getting 404 Error. The thing is when i tried placing error-page tag in web.xml it is being redirected to respective page. Find below the piece of code in web.xml

<?xml version="1.0" encoding="ISO-8859-1" ?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<display-name>Testing</display-name>
<description>a basic application.</description>
<error-page>
<error-code>404</error-code>
<location>/indexing.html</location>
</error-page>
</web-app>

indexing.html is placed parallelly to WEB-INF.

Can any one help me What could be going wrong. i want see all the contents(jsps/htmls etc..) in "Testing" application.

Thanks in Advance ,

Hari.K,<br />+919886082889
Charles Owen
Ranch Hand

Joined: Aug 31, 2009
Posts: 61
Where are your web pages (jsp,html) for your application located? It's a good idea to have an index.jsp as your welcome page. You can specify your welcome page in the web.xml for your application.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60791
    
  65

Tomcat 1.6? I think not. What version are you really using?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Hareendranath Babu Kotha
Ranch Hand

Joined: May 22, 2006
Posts: 40
Bear Bibeault : Sorry its Tomcat 6.0

Charles Owen : "Where are your web pages (jsp,html) for your application located? It's a good idea to have an index.jsp as your welcome page. You can specify your welcome page in the web.xml for your application. "

i am getting 404 Status Error upon click on "Testing" application link in Tomcat Home Page. I tried wiht your idea. But it did not work !!!

Can anyone help me out please.

Thanks In Advance,
Hareendranath Babu Kotha
Ranch Hand

Joined: May 22, 2006
Posts: 40
Charles Owen : "Where are your web pages (jsp,html) for your application located? It's a good idea to have an index.jsp as your welcome page. You can specify your welcome page in the web.xml for your application. "

Thanks Now it is working with out getting 404 error with welcome page option. i did not kept relative path properly last time.

My question is cant i proceed with out mentioning the welcome page ?


banghead:

Thanks in advane :
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: 404 Error while trying to run my application in Tomcat 1.6
 
Similar Threads
custom tag handler
problem in displaying dropdown menu items in jsp with jstl
Unable to view application
Web.XMl in JSP
problem creating a URI for a tld in the web.xml