• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Running JSP on TomCat

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am new to this. I am running TomCat4.1.18 version. I am trying to run a sample JSP.
I created a folder called "inc" in e:/jakarta-tomcat-4.1.18/webapps/ROOT/inc. I have included "index1.jsp" in this folder.
In folder e:/jakarta-tomcat-4.1.18/conf/server.xml file, I have added
<Context path="/inc" docBase="inc" debug="1" reloadable="true"/>
I restatred the server and
When I execute http://localhost:8080/inc/index1.jsp,
I get "HTTP:404" server error.
I am pretty sure, I am missing something here.... Please correct me..
Could ANYONE PLEASE HELP ME??
Thank You.
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look at the ROOT context:
<Context path="" docBase="ROOT" debug="0"/>

Anything that has no path is mapped to ROOT. So a request like:

http://localhost:8080/

will give you the ROOT application.
Your mapping is:
<Context path="/inc" docBase="inc" debug="1" reloadable="true"/>

So anything like:
http://localhost:8080/inc

will give you the inc application.

But your inc application is inside your ROOT application, so Tomcat can't find it.

Place 'inc' at the same level as ROOT, not inside it.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In your cross-post it appears that you have already done that. Follow the advice there about case-sensitivity.

And try not to cross-post either.
 
Gayathri Neti
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank You guys....I got it working. Now, I understand why it was not finding earlier.
reply
    Bookmark Topic Watch Topic
  • New Topic