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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
micro services vs rest web services 16 86
Securing Jmx Console and web console 2 65
Java Loop 6 49
Opening PDF on button click and fill new document 2 21
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

895 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

16 Experts available now in Live!

Get 1:1 Help Now