Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat6 giving 404 on Ubuntu-12.04 LTS

 
rohit k kumar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Ivan Jozsef Balazs
Rancher
Posts: 981
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the web application bound to /ch1 ?
 
harshvardhan ojha
Ranch Hand
Posts: 157
1
Android Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, all thanks for your replies,
but it somehow started working, I did no changes and now the same servlet is working.
...cheers...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic