Results 1 to 3 of 3

Thread: importing error

  1. #1
    rch572 is offline Member
    Join Date
    Apr 2011
    Location
    Hyderabad
    Posts
    2
    Rep Power
    0

    Unhappy importing error

    Hello
    this is Raghava

    i get a simple funny problem while compiling my srvlet program which implements javax.srvlet.Servlet ineterface.

    in program i overload all 5 methods of Servlet interface.Well
    problem arise while compiling

    if i use import statement for servlet api as

    javax.servlet.Servlet; it can't compile

    if i use javax.servlet.*;
    it succesfully compiled .

    why?

    please anybody send me the causes for this?

  2. #2
    victor8247 is offline Member
    Join Date
    Apr 2011
    Posts
    7
    Rep Power
    0

    Default

    show your compile error

  3. #3
    rch572 is offline Member
    Join Date
    Apr 2011
    Location
    Hyderabad
    Posts
    2
    Rep Power
    0

    Default errors

    Quote Originally Posted by victor8247 View Post
    show your compile error
    hai
    these are the errors while using javax.servlet.Servlet;
    if i use * insted of Servlet it is sucessfully compiled and o/p as well.:confused:


    C:\Documents and Settings\raghava\Desktop>javac HelloServlet.java
    HelloServlet.java:9: cannot find symbol
    symbol : class ServletConfig
    location: class HelloServlet
    public ServletConfig getServletConfig()
    ^
    HelloServlet.java:13: cannot find symbol
    symbol : class ServletConfig
    location: class HelloServlet
    public void init(ServletConfig config)
    ^
    HelloServlet.java:16: cannot find symbol
    symbol : class ServletRequest
    location: class HelloServlet
    public void service(ServletRequest request,ServletResponse response)
    ^
    HelloServlet.java:16: cannot find symbol
    symbol : class ServletResponse
    location: class HelloServlet
    public void service(ServletRequest request,ServletResponse response)
    ^
    4 errors

Similar Threads

  1. Replies: 6
    Last Post: 02-10-2011, 09:55 AM
  2. Error: Cannot find symbol during Importing package
    By sashi799 in forum New To Java
    Replies: 4
    Last Post: 07-21-2010, 10:36 AM
  3. Importing a .java
    By Kaito in forum New To Java
    Replies: 5
    Last Post: 09-24-2009, 01:33 AM
  4. Importing JXL API
    By ryanlbowen in forum New To Java
    Replies: 0
    Last Post: 07-17-2009, 07:17 PM
  5. Error when importing a web reference
    By sravyen in forum Eclipse
    Replies: 1
    Last Post: 04-06-2009, 06:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •