Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Adelina Fischer   on Aug 24 In Java Category.

  
Question Answered By: Alexis Castillo   on Aug 24

I found the solution of the problem. All i had to do is.. change
my web.xml file.


in my Webapps folder I create folder test

test/WEB-INF/
In Web-Inf I have folder classes/a1.java and a1.class file
I also have web.xml file  in WEB-INF folder

here is 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>

<display-name>Servlet 2.4 Examples</display-name>
<description>
Servlet 2.4 Examples.
</description>


<!-- Define servlets that are included in the example
application -->

<servlet>
<servlet-name>a1</servlet-name>
<servlet-class>a1</servlet-class>
</servlet>


<servlet-mapping>
<servlet-name>a1</servlet-name>
<url-pattern>/servlet/a1</url-pattern>
</servlet-mapping>
</web-app>

And I also add one line in tomcat/conf/server.xml
<Context path="/test" docBase="test" debug="0"/>
Add this life before </Host> tag

Share: 

 

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

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


Tagged: