Deploying Jsp's on tomcat

Posted on 2002-06-19
Last Modified: 2013-11-24
We  have to create a web based application

1. we made a war fike of our application and when we unzipped it it created a folder in which all the classes,beans and jsp's existed.

2. We put a line in "server.xml" for the <context>
So now when we type..
It shows the directory listing.
This goes on till
When we click on docroot we get the index.html page
Also when we give
we get the page.

3.But still the pages which refer to servlets can't be displayed
I think the problem is with web.xml
There is one web.xml also for our package .. please lemme know what exactly should we put in it so that it can access the beans
Like there is
there are tld's.
so what exactly should we do.
Question by:akanksha

Accepted Solution

mraible earned 20 total points
ID: 7092734
Your web.xml should be in the WEB-INF directory.  You can define a welcome-file that you can point to your JSP.

Typically, here's how I structure my "webapps"


Good examples can be found by looking at some struts examples:

Here is the web.xml from the struts-example application:

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"


  <!-- Action Servlet Configuration -->

  <!-- Action Servlet Mapping -->

  <!-- The Welcome File List -->

  <!-- Application Tag Library Descriptor -->

  <!-- Struts Tag Library Descriptors -->





Expert Comment

ID: 7095251

whether this link is working for u will display the default home page of that u can see samples of jsp and servlets..adn u can try executing it...

    check whether this is working.....then there will be server.xml file inside conf directory .......that i will explain later....first check the above is working fine..

u can send mail to for any queries...

LVL 35

Expert Comment

ID: 8860565
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this
question is:

- points to mraible

Please leave any comments here within the
next seven days.


Cleanup Volunteer

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Cipher Configuration on Apache HTTPD 4 62
varialbe initialization 11 32
configure dependency in POM for new database 3 25
How to convert from xls to xlsx using java 7 35
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now