import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class HelloWorld extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("<html>"); out.println("<head>"); out.println("<title>Hello World!</title>"); out.println("</head>"); out.println("<body>"); out.println("<h1>Hello World!</h1>"); out.println("</body>"); out.println("</html>"); } } This is the file i tried to execute. I also set the class path for jsp-api.jar and servlet.jar files. But it did not work. Thanks. ===================================================== ----- Original Message ---- From: Mark Thomas <[EMAIL PROTECTED]> To: Tomcat Users List <users@tomcat.apache.org> Sent: Tuesday, December 19, 2006 5:39:07 PM Subject: Re: How to Run Servlet athula bogoda wrote: > I installed it and try to compile servlet file. But it gives an error"Cannot > find symbols." > > Thanks, A little more information would help. What did you try and compile and how did you try and compile it? Mark --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Send instant messages to your online friends http://uk.messenger.yahoo.com