status 500 error to call a servlet from a JSP page

Discussion in 'Java' started by Matt, Jun 9, 2004.

  1. Matt

    Matt Guest

    I tried to call servlet from a JSP page, but it has the following
    status 500 runtime error:

    '.' expected
    [javac] import GenerateHTML ;


    <%@page import = "GenerateHTML " %>
    <%

    GenerateHTML obj = new GenerateHTML ();
    obj.service(request, response);

    %>

    public class GenerateHTML extends HttpServlet
    {
    public void service(HttpServletRequest request, HttpServletResponse
    response)
    throws ServletException, IOException
    {
    //etc...
    }
    }

    any ideas??
     
    Matt, Jun 9, 2004
    #1
    1. Advertising

  2. Matt

    Ryan Stewart Guest

    "Matt" <> wrote in message
    news:...
    > '.' expected
    > [javac] import GenerateHTML ;
    >
    >
    > <%@page import = "GenerateHTML " %>

    You appear to be attempting to import a class from the default package? You
    can't do that. Classes must be in explicit packages to be imported.
     
    Ryan Stewart, Jun 9, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. circuit_breaker
    Replies:
    2
    Views:
    2,014
    Jack Jia
    Apr 4, 2004
  2. Replies:
    2
    Views:
    694
    Roedy Green
    Dec 26, 2005
  3. James
    Replies:
    2
    Views:
    9,105
    Jacek Dziedzic
    Nov 3, 2004
  4. javadev
    Replies:
    5
    Views:
    12,923
    javadev
    Nov 16, 2006
  5. Replies:
    4
    Views:
    789
Loading...

Share This Page