Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Hondo Chalthoum    on Jun 26 In Java Category.

  
Question Answered By: Ayaz Hashmi   on Jun 26

Add the following to server.xml right under any other pair of
<Context></Context>
tags:

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

myapp should be the base directory of your application. Place an HTML file
called
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
all
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"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
</web-app>

Share: 

 

This Question has 4 more answer(s). View Complete Question Thread

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


Tagged: