package javax.servlet does not exists ?

Hello,

I am using JDK 1.3.1.06 and trying to compile a simple Servlet. But getting errors as javax package classes does not exits and cannot resolve symobol.

The following is the program I am trying to compile:

import javax.servlet.*;

import javax.servlet.http.*;

import java.io.*;

public class TestServlet extends HttpServlet

{

public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException

{

process(request, response);

}

public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException

{

process(request, response);

}

private void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException

{

PrintWriter out = response.getWriter();

out.println("Hello World !");

}

};

I am getting errors such as :

Package javax.servlet does not exists.

cannot resolve symbol

symbol : class HttpServlet

.

.

.

.

.

Please advice me of any solution asap. Deep trouble.

Thanking you,

Forumans.

[1222 byte] By [forumansa] at [2007-9-27 23:32:02]
# 1

Just a guess...

>JDK 1.3.1.06

This represents the Java language in the form of a JVM and the Java API (like java.lang.String.)

> Servlet

This is in J2EE, which if you look above was not mentioned.

If you look in the java docs for the JDK you will also find that javax.servlet does not exist.

I would guess however that you could start here - http://java.sun.com/j2ee/

However, keep in mind that your servlet still needs to run in something, so you better make sure that you are compiling against the correct J2EE server for what you are doing.

jschella at 2007-7-7 15:53:14 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...