problem with package in servlet

package coreservlets; ******* it is compiled will **********

import javax.servlet.*;

import javax.servlet.http.*;

public class servletu

{

public static String DOCTYPE="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +

"Transitional//EN\">";

public static String hwt(String t)

{

return(DOCTYPE + "\n" +

"<HTML>\n" +

"<HEAD><TITLE>" + t + "</TITLE></HEAD>\n");

}

}

package coreservlets; ***** it is showing errors***********

import java.io.*;

import javax.servlet.*;

import coreservlets.*;

import javax.servlet.http.*;

public class hellow2 extends HttpServlet

{

public void doGet(HttpServletRequest req,HttpServletResponse res) throws ServletException ,IOException

{

res.setContentType("text/html");

PrintWriter out=res.getWriter();

servletu a=new servletu();

out.println(servletu.hwt("hello chakri")+"<body>hi chakri</body></html>");

}

}

the errors i got

hellow2.java:12: cannot resolve symbol

symbol : class servletu

location: class coreservlets.hellow2

servletu a=new servletu();

^

hellow2.java:12: cannot resolve symbol

symbol : class servletu

location: class coreservlets.hellow2

servletu a=new servletu();

^

hellow2.java:13: cannot resolve symbol

symbol : variable servletu

location: class coreservlets.hellow2

out.println(servletu.hwt("hello chakri")+"<body>hi chakri</body>

</html>");

^

3 errors

Press any key to continue . .

[1693 byte] By [chakribobbya] at [2007-10-3 0:36:30]
# 1

First you compile the servletu into a class file and then you add this class file to your classpath when you compile the hellow2 file. Usually you compile from the directory that contains the package structure (ie coreservlets directory) for all of the files you are compiling and can then add all of these files to your classpath by including a dot (".") to the classpath representing the current directory.

tolmanka at 2007-7-14 17:30:17 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...