This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Servlets and the fly likes Tomcat6 giving 404 on Ubuntu-12.04 LTS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Tomcat6 giving 404 on Ubuntu-12.04 LTS" Watch "Tomcat6 giving 404 on Ubuntu-12.04 LTS" New topic
Author

Tomcat6 giving 404 on Ubuntu-12.04 LTS

rohit k kumar
Greenhorn

Joined: Jan 25, 2013
Posts: 6
Hi,

I'm a newbie servlet developer. Please help.

I have created a servlet as follows:



And my DD file is:


The directory structure of my application under tomcat6 is:


And the directory structure of my development folder:


When a restart the tomcat6 container (/etc/init.d/tomcat6 restart), browsing to the URL: localhost:8080/ch1/Serv1 gives me 404 as follows:


Here is the machine configuration used:
Ubuntu 12.04 LTS 64bit
Tomcat6 (from repository)
Open-jdk-6 (from repository)

Now, that examples provided with tomcat works fine, only my servlet is giving 404. Please somebody help by providing step by step procdure.

Thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61105
    
  66

I'm not seeing anything overt on a quick inspection.

Have you checked the Tomcat manager application to make sure that the app is actually deployed?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 867
    
    5
Is the web application bound to /ch1 ?
harshvardhan ojha
Ranch Hand

Joined: Jul 26, 2007
Posts: 157
    
    1

There is some problem with your url. create a welcome file say index.jsp to check if your application is deployed properly.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61105
    
  66

harshvardhan ojha wrote:There is some problem with your url. create a welcome file say index.jsp to check if your application is deployed properly.

There is no need to create phony files to do this -- I've already suggested using the Tomcat manager application to see if the web app is up and running.
rohit k kumar
Greenhorn

Joined: Jan 25, 2013
Posts: 6
Bear Bibeault wrote:I'm not seeing anything overt on a quick inspection.

Have you checked the Tomcat manager application to make sure that the app is actually deployed?


Yes I checked in the tomcat manager, the application is listed there.
I also putted index.jsp in the root folder i.e /ch1 (as suggested by other members) and browsing to localhost:8080/ch1 works
and loads the index.jsp page but browsing to localhost:8080/ch1/Serv1 is giving the same 404 problem.
rohit k kumar
Greenhorn

Joined: Jan 25, 2013
Posts: 6
Ivan Jozsef Balazs wrote:Is the web application bound to /ch1 ?


how to do this?? please elaborate as per the directory structure shown in my post.
rohit k kumar
Greenhorn

Joined: Jan 25, 2013
Posts: 6
Hi, all thanks for your replies,
but it somehow started working, I did no changes and now the same servlet is working.
...cheers...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat6 giving 404 on Ubuntu-12.04 LTS