status 500 error to call a servlet from a JSP page

M

Matt

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??
 
R

Ryan Stewart

Matt said:
'.' 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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,166
Latest member
DollyBff32
Top