Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Deployment on tomcat

  Asked By: Hondo    Date: Jun 26    Category: Java    Views: 538

i am new to jsp. i have written some jsp pages and prepared all
required files like .xml. i dont know how can i view them from my
browser. I have installed tomcat 4. i have been through the
documentation and no use. please help me and tell me where to place
the directories and files.



5 Answers Found

Answer #1    Answered By: Janis Hart     Answered On: Jun 26


this usally is it. All matter where you have saved your jsp  files

Answer #2    Answered By: Shiv Patel     Answered On: Jun 26

A couple more details here.

1. In tomcat's server.xml file in the conf
directory, there will be an entry something
like this:

<!-- Define the default virtual host -->
<Host name="localhost" debug="0" appBase="some-path" unpackWARs="true"

where "some-path" points to where Tomcat
expects to find the files. Actually,
that path needs a subdirectory ROOT,
and off of ROOT is where your JSP files
need to be.

2. Paths in your URL are case-sensitive, even
if you're running on a Windows system. That
messed me up for a while.

Answer #3    Answered By: Marnia Mian     Answered On: Jun 26

You can copy you jsp  folder to following directory

$Tomcat Install Home\webapps\ROOT

And access the page with the url :

http://<machine name>:<port>/<your directory name >/<your jsp page name>

Default port is 8080.

Answer #4    Answered By: Ayaz Hashmi     Answered On: Jun 26

Add the following to server.xml right under any other pair of

<Context path="/myapp" docBase="c:\...\myapp" debug="0">

myapp should be the base directory of your application. Place an HTML file
index.html in the myapp directory. Place a WEB-INF folder inside the myapp
directory with a web.xml file. Listed below is a minimal web.xml file. Start
tomcat by running startup.bat or startup.sh. Go to your browser and type in
"http://localhost:8080/myapp". You should see your index.html page. If this
works add in the rest of your application.

minimal web.xml file:

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

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


Answer #5    Answered By: Zane Thompson     Answered On: Jun 26

check this:

Configuring & Using Apache Tomcat 4


Didn't find what you were looking for? Find more on Deployment on tomcat Or get search suggestion and latest updates.