I am trying to compile this servlet which i kept at
c:/jakarta-tomcat-3.2.1/webapps/examples/web-inf/classes/Games.java
It is giving following error
Games.java:10: Package javax.activation not found in import
import javax.activation.*;
^
1 error
Thanks
subha
my autoexec.bat file is ................
SET
PATH=C:\DMI98\WIN32\BIN;C:\PROGRA~1\ULTRAE~1;c:\windows;c:\windows\command
SET WIN32DMIPATH=C:\DMI98\WIN32
path =
%path%C:\jdk1.1.8\jre\bin;c:\jdk1.1.8\bin;c:\java;c:\jakarta-tomcat-3.2.1
SET JAVA_HOME=C:\jdk1.1.8
SET TOMCAT_HOME=c:\jakarta-tomcat-3.2.1
SET
CLASSPATH=.;C:\jdk1.1.8\src.jar;C:\jdk1.1.8\lib\tools.jar;C:\jswdk-1.0.1\lib\servlet.jar;c:\jakarta-tomcat-3.2.1\lib\servlet.jar;c:\jakarta-tomcat-3.2.1\lib\jasper.jar;c:\jakarta-tomcat-3.2.1\lib\webserver.jar;c:\jakarta-tomcat-3.2.1\lib\xml.jar;c:\jakarta-tomcat-3.2.1\lib\ant.jar;c:\javamail-1.2\mail.jar;c:\jaf-1.0.1\activation.jar
rem SET CLASSPATH =
%CLASSPATH%;c:\javamail-1.2\mail.jar;c:\javamail-1.2\activation\activation.jar
the program is ...............
import java.io.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import javax.mail.*;
import javax.mail.event.*;
import javax.mail.internet.*;
import javax.activation.*;
public class Games extends HttpServlet
{
Connection con = null;
public void init(ServletConfig config) throws ServletException
{
super.init(config);
establishConnection();
}
public void doPost(HttpServletRequest request, HttpServletResponse
response)throws IOException, ServletException
{
doGet(request, response);
}
public void destroy()
{
if (con != null)
{
try
{
con.close();
} catch (SQLException ex) {}
}
}
private void establishConnection()
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); //loads the
driver
this.con =
DriverManager.getConnection("jdbc:odbc:GAMES","subha","subha");
} catch (ClassNotFoundException ex) {} catch (SQLException ex) {}
}
public void doGet(HttpServletRequest request, HttpServletResponse
response) throws IOException, ServletException
{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println(" <html> ");
out.println("<body>")
out.println("this is a test program");
out.println(" </body> ");
out.println(" </html> ");
}
}
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html