heng03
asked on
Java compilation error
Hi
I compiled a java program using javax.servlet & it has
error as below :-
Pls help me what is the problem & what need to do
to solve the problem.
I'm using jdk1.3.1 & Apache Tomcat 4.0.1.
Thanks
Heng03
Compiling C:\Java_Project_2\WEB-INF\ classes\Ch eckUser.ja va
C:\Java_Project_2\WEB-INF\ classes\Ch eckUser.ja va:8: package javax.servlet does not exist
import javax.servlet.*;
^
C:\Java_Project_2\WEB-INF\ classes\Ch eckUser.ja va:9: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
C:\Java_Project_2\WEB-INF\ classes\Ch eckUser.ja va:11: cannot resolve symbol
symbol : class HttpServlet
location: class CheckUser
public class CheckUser extends HttpServlet {
^
C:\Java_Project_2\WEB-INF\ classes\Ch eckUser.ja va:17: cannot resolve symbol
symbol : class ServletConfig
location: class CheckUser
public void init(ServletConfig config) throws ServletException {
I compiled a java program using javax.servlet & it has
error as below :-
Pls help me what is the problem & what need to do
to solve the problem.
I'm using jdk1.3.1 & Apache Tomcat 4.0.1.
Thanks
Heng03
Compiling C:\Java_Project_2\WEB-INF\
C:\Java_Project_2\WEB-INF\
import javax.servlet.*;
^
C:\Java_Project_2\WEB-INF\
import javax.servlet.http.*;
^
C:\Java_Project_2\WEB-INF\
symbol : class HttpServlet
location: class CheckUser
public class CheckUser extends HttpServlet {
^
C:\Java_Project_2\WEB-INF\
symbol : class ServletConfig
location: class CheckUser
public void init(ServletConfig config) throws ServletException {
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The points,please!
You need to install java 2 enterprise edition (j2ee):
http://java.sun.com/j2ee/download.html
The standard edition does not include support for servlets.
http://java.sun.com/j2ee/download.html
The standard edition does not include support for servlets.
No you did not. servlet.jar is included with the tomcat. You put servlet.jar (take it from the tomcat lib directory and put it to be an extension, or adjust yours system classpath to point to the current servlet.jar path)
Greetings all.
msterjev, can you please confirm for me that you did receive these points? I want to ensure there wasn't some sort of database problem, since points weren't deducted, per this information; before taking corrective action.
https://www.experts-exchange.com/questions/Q.20283650.html
Thanks,
Moondancer - EE Moderator
msterjev, can you please confirm for me that you did receive these points? I want to ensure there wasn't some sort of database problem, since points weren't deducted, per this information; before taking corrective action.
https://www.experts-exchange.com/questions/Q.20283650.html
Thanks,
Moondancer - EE Moderator