In a message dated 7/23/00 9:06:12 PM Central Daylight Time,
[EMAIL PROTECTED] writes:
> Subj: Servlet newbie question
> Date: 7/23/00 9:06:12 PM Central Daylight Time
> From: [EMAIL PROTECTED] (Amba Ayambem)
> Sender: [EMAIL PROTECTED] (A mailing list for discussion
about
> Sun Microsystem's Java Servlet API Technology.)
> Reply-to: [EMAIL PROTECTED] (A mailing list for discussion
about
> Sun Microsystem's Java Servlet API Technology.)
> To: [EMAIL PROTECTED]
>
> Greetings all. I am new to java servlets and have recently installed the
> jsdk2.1. I have also written the following HelloWorld.java servlet:
>
> -----------------------------------------------------------------------
> import javax.servlet.GenericServlet;
> import javax.servlet.ServletException;
> import javax.servlet.ServletResponse;
> import javax.servlet.ServletRequest;
> import javax.servlet.ServletOutputStream;
> import java.io.IOException;
>
> public class HelloWorld extends javax.servlet.GenericServlet {
> public void service(ServletRequest req, ServletResponse res)
> throws ServletException, IOException {
> res.setContentType("text/html");
> servletOutputStream out = res.getOutputStream();
Java is case sensitive. Therefore you should use
ServletOutputStream out = res.getOutputStream();
> out.println("Hello World");
> }
> }
> ----------------------------------------------------------------------
>
> The trouble is, when I try to compile it I get the following compiler
error:
>
> HelloWorld.java:12: cannot resolve symbol
> symbol : class servletOutputStream
> location : class HelloWorld
> servletOutputStream out = res.getOutputStream();
>
> I have finally thrown in the towel on trying to figure out what in the
> world the "symbol" is that the compiler can't resolve. I need help!
> My CLASS contains C:\jsdk2.1 and
> my CLASSPATH contains C:\jsdk2.1\server.jar;.;C:\jsdk2.0\lib\jsdk.jar
> Thanks for any help.
>
> ---amba---
>
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html