Hi everybody
I am using tomcat3.1 in windows98 machine
it works fine
But i was not able to compile these program
ServletUtil.java
package
test ;
public class ServletUtil {
public static final
String DOCTYPE = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";
public static String headWithTitle(String title){
return (DOCTYPE + "\n" +
"<HTML>\n" +
"<HEAD><TITLE>" + title + "</TITLE></HEAD>");
}
};
Hello.java
package test;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Hello extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException , IOException {
res.setContentType("text/html");
PrintWriter out = res.getWriter();
out.println(ServletUtil.headWithTitle(" Hello WWW ") + "\n" +
"<BODY>\n" +
"<H1> Hello WWW -- BY Siva </H1>\n" +
"</BODY></HTML>");
}
};
These two file are present in the c:\tomcat\source\test
I am generating the class files in
c:\tomcat\webapps...\classes\test
when i compiled ServletUtil it did well , but when i compiled Hello.java the compiler was sayin that it can't undestand
ServletUtil.headWithTitle(" Hello wwww");
can u pls help me in this
Thank you
rgds
Siva