Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

compiler error  RSS feed

 
shabbir zakir
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
import java.io.*;
import javax.servlet.*;
import javax.httpservlet.*;
public class HelloServlet extends GenericServlet {

public void service(ServletRequest request,ServletResponse response)
throws ServletException,IOException {
response.setContentType("text/html");
PrintWriter pw = response.getWriter();
pw.println("<b>Hello!");
pw.close();
}
}
when i compile this code the compiler gives me the following error.

An exception has occured in the compiler(1.3.0_02).please file a bug at the java developerconnection.
 
Bosun Bello
Ranch Hand
Posts: 1512
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not understand your compile error. But you need to change your third import statement to "javax.servlet.http"

Bosun
 
Jimi Rock
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Strange error!
I remember that I have seen a link to some thing related to bugs on the sun site . may be this is a java compiler bug, I need also to know what is this error exactly, any one?
 
shabbir zakir
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi!
It giving me the same error again again. i changed my code ,but in vain. Should i again download java servlets api.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!