• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Tomcat6 giving 404 on Ubuntu-12.04 LTS

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67590
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Rancher
Posts: 1043
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the web application bound to /ch1 ?
 
Ranch Hand
Posts: 157
1
Android MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67590
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Men call me Jim. Women look past me to this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic