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

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top