Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

package javax.servlet error

 
Gayani Kanchana
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have developed a web application using netbeans 5.5(use jdk 1.6). when i tried to build it using apcahe tomcat 5.5 server it gives me this error
"package javax.servlet does not exist"

this is the stack trace

E:\newCRM\newCRM\CRM2\src\com\xont\crm\dao\IssueDAO.java:3: warning: com.sun.org.apache.regexp.internal.RESyntaxException is Sun proprietary API and may be removed in a future release
import com.sun.org.apache.regexp.internal.RESyntaxException;
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\CustomerSelectionServlet.java:6: package javax.servlet.http does not exist
import javax.servlet.http.HttpServlet;
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\CustomerSelectionServlet.java:7: package javax.servlet.http does not exist
import javax.servlet.http.HttpServletRequest;
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\CustomerSelectionServlet.java:8: package javax.servlet.http does not exist
import javax.servlet.http.HttpServletResponse;
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\CustomerSelectionServlet.java:9: package javax.servlet does not exist
import javax.servlet.ServletException;
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\CustomerSelectionServlet.java:10: package javax.servlet does not exist
import javax.servlet.RequestDispatcher;
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\CustomerSelectionServlet.java:30: cannot find symbol
symbol: class HttpServlet
public class CustomerSelectionServlet extends HttpServlet {
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\DisplayIssueDetailsServlet.java:6: package javax.servlet.http does not exist
import javax.servlet.http.HttpServlet;
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\DisplayIssueDetailsServlet.java:7: package javax.servlet.http does not exist
import javax.servlet.http.HttpServletRequest;
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\DisplayIssueDetailsServlet.java:8: package javax.servlet.http does not exist
import javax.servlet.http.HttpServletResponse;
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\DisplayIssueDetailsServlet.java:9: package javax.servlet does not exist
import javax.servlet.ServletException;
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\DisplayIssueDetailsServlet.java:10: package javax.servlet does not exist
import javax.servlet.RequestDispatcher;
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\DisplayIssueDetailsServlet.java:26: cannot find symbol
symbol: class HttpServlet
public class DisplayIssueDetailsServlet extends HttpServlet {
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\DisplayIssueDetailsServlet.java:31: cannot find symbol
symbol : class HttpServletRequest
location: class com.xont.crm.web.DisplayIssueDetailsServlet
public void doPost (HttpServletRequest request, HttpServletResponse response)
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\DisplayIssueDetailsServlet.java:31: cannot find symbol
symbol : class HttpServletResponse
location: class com.xont.crm.web.DisplayIssueDetailsServlet
public void doPost (HttpServletRequest request, HttpServletResponse response)
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\DisplayIssueDetailsServlet.java:32: cannot find symbol
symbol : class ServletException
location: class com.xont.crm.web.DisplayIssueDetailsServlet
throws ServletException, IOException {
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\EmployeeSelectionServlet.java:6: package javax.servlet.http does not exist
import javax.servlet.http.HttpServlet;
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\EmployeeSelectionServlet.java:7: package javax.servlet.http does not exist
import javax.servlet.http.HttpServletRequest;
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\EmployeeSelectionServlet.java:8: package javax.servlet.http does not exist
import javax.servlet.http.HttpServletResponse;
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\EmployeeSelectionServlet.java:9: package javax.servlet does not exist
import javax.servlet.ServletException;
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\EmployeeSelectionServlet.java:10: package javax.servlet does not exist
import javax.servlet.RequestDispatcher;
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\EmployeeSelectionServlet.java:26: cannot find symbol
symbol: class HttpServlet
public class EmployeeSelectionServlet extends HttpServlet {
E:\newCRM\newCRM\CRM2\src\com\xont\crm\web\EmployeeSelectionServlet.java:31: cannot find symbol
symbol : class HttpServletRequest
location: class com.xont.crm.web.EmployeeSelectionServlet
public void doPost (HttpServletRequest request, HttpServletResponse response)

pls help

thanks
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat doesn't build anything.

It sounds like you don't have your IDE configured correctly.
Specifically, it doesn't have servlet-api.jar in its classpath.

I'm going to move this to our IDEs forum which is the best place to discuss IDE configuration.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic