I commented out the import java.util.* and import java.text.* packages. I left these alone: import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*;
That's all and compiled and I could see my simple output. talk to you later, Will -----Original Message----- From: Mark Galbreath [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 20, 2001 2:53 PM To: [EMAIL PROTECTED] Subject: Re: servlet and java web server "...comment out some packages...?" I'd be interested in what you did to make it work. Cheers! Mark ----- Original Message ----- From: "Kwan, William" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 20, 2001 5:36 PM Subject: Re: servlet and java web server > Hi Geeta, > > that didnt help. I had to actually comment out some packages and it worked. > > thanks, > Will > > > -----Original Message----- > From: Geeta Ramani [mailto:[EMAIL PROTECTED]] > Sent: Sunday, November 18, 2001 9:49 AM > To: [EMAIL PROTECTED] > Subject: Re: servlet and java web server > > > Hi Will: > > Write a "doGet(HttpServletRequest, HttpServletResponse)" method first and > then > the link should work. > > Regards, > Geeta > > "Kwan, William" wrote: > > > hi, > > > > I created a simple servlet something similar to Hello World. I placed the > > servlet in c:\javawebserver2.0\servlets directory. Here is how I call it: > > http://localhost:8080/servlet/SimpleServlet > > > > I get an Not Found(404) error. > > > > Is there something else I need to do?? I can run the examples that come > > with Java Web Server 2.0. > > > > Here is the code: > > import java.io.*; > > import java.util.*; > > import javax.servlet.*; > > import javax.servlet.http.*; > > > > public class SimpleServlet extends HttpServlet > > { > > public void doPost(HttpServletRequest request, HttpServletResponse > response) > > > > throws IOException, ServletException > > { > > response.setContentType("text/html"); > > PrintWriter out = response.getWriter(); > > > > try{ > > out.println("<html>"); > > out.println("hello World"); > > out.println("</html>"); > > out.close(); > > }catch(Exception e) {} > > } > > } > > > > thanks, > > Will > > > > > ___________________________________________________________________________ > > 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 > > ___________________________________________________________________________ > 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 > > ___________________________________________________________________________ > 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 > > ___________________________________________________________________________ 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 ___________________________________________________________________________ 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
