-
June 8th, 2008, 08:40 AM
#1
Java Query
Hi AO's
Well i am new to java programming
and i was writing a new program in java servlet which is
// Hello.java
import java.io.*;
import javax.servlet.*;
public class Hello extends GenericServlet {
public void service(ServletRequest request, ServletResponse response)
throws ServletException, IOException
{
response.setContentType("text/html");
PrintWriter pw = response.getWriter();
pw.println("Hello, world!");
pw.close();
}
}
and while compiling in CMDi got error as follows
C :\Program Files\Java\jdk1.6.0_06\bin>javac Hello.java
Hello.java:3: package javax.servlet does not exist
import javax.servlet.*;
^
Hello.java:5: cannot find symbol
symbol: class GenericServlet
public class Hello extends GenericServlet {
^
Hello.java:6: cannot find symbol
symbol : class ServletRequest
location: class Hello
public void service(ServletRequest request, ServletResponse response)
^
Hello.java:6: cannot find symbol
symbol : class ServletResponse
location: class Hello
public void service(ServletRequest request, ServletResponse response)
^
Hello.java:7: cannot find symbol
symbol : class ServletException
location: class Hello
throws ServletException, IOException
^
5 errors
C:\Program Files\Java\jdk1.6.0_06\bin>
what does this error resembles to
Last edited by kingkong; June 8th, 2008 at 08:41 AM.
Reason: modification
Question is not "Why are you Online"
Question is "Why are you Off line"
Similar Threads
-
By MrLinus in forum Cosmos
Replies: 4
Last Post: April 18th, 2004, 08:01 AM
-
By gore in forum Operating Systems
Replies: 3
Last Post: March 7th, 2004, 08:02 AM
-
By vozhan in forum AntiOnline's General Chit Chat
Replies: 1
Last Post: March 6th, 2004, 09:49 PM
-
By SonofGalen in forum The Security Tutorials Forum
Replies: 7
Last Post: February 9th, 2004, 11:14 AM
-
By Remote_Access_ in forum Security Archives
Replies: 4
Last Post: January 3rd, 2002, 11:11 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|