Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > status 500 error to call a servlet from a JSP page

Reply
Thread Tools

status 500 error to call a servlet from a JSP page

 
 
Matt
Guest
Posts: n/a
 
      06-09-2004
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??
 
Reply With Quote
 
 
 
 
Ryan Stewart
Guest
Posts: n/a
 
      06-09-2004
"Matt" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> '.' 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening new child window - Running servlet (JSP and Servlet) agapitolw@yahoo.es Java 4 08-27-2007 12:57 PM
Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException: getOutputStream() has already been called for this response javadev Java 5 11-16-2006 11:22 AM
Sending files from Servlet/JSP page to ASP Page Srini ASP General 1 10-29-2006 04:49 PM
HTTP 500 status error mahajan.vibhor@gmail.com Java 2 12-26-2005 01:44 AM
Servlet question(Tomcat, web.xml, servlet-class, servlet-name) circuit_breaker Java 2 04-04-2004 03:26 AM



Advertisments